From 9296424e448b32665ab4fabf42c5f9f127de9b16 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 13:00:26 +0200 Subject: [PATCH] Switch to newer openstackdocstheme and reno versions Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using these versions will allow especially: * Linking from HTML to PDF document * Allow parallel building of documents * Fix some rendering problems Update Sphinx version as well. Set openstackdocs_pdf_link to link to PDF file. Note that the link to the published document only works on docs.openstack.org where the PDF file is placed in the top-level html directory. The site-preview places the PDF in a pdf directory. Change pygments_style to 'native' since old theme version always used 'native' and the theme now respects the setting and using 'sphinx' can lead to some strange rendering. Remove docs requirements from lower-constraints, they are not needed during install or test but only for docs building. openstackdocstheme renames some variables, so follow the renames before the next release removes them. A couple of variables are also not needed anymore, remove them. See also http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html Change-Id: I6635fbab5d4cf60be6bc317061cdac2118cebc25 --- api-ref/source/conf.py | 8 ++++---- doc/requirements.txt | 6 +++--- doc/source/conf.py | 9 +++++---- lower-constraints.txt | 3 --- releasenotes/source/conf.py | 8 ++++---- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index 75040e5440..a3236d0f26 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -70,9 +70,9 @@ master_doc = 'index' copyright = u'2010-present, OpenStack Foundation' # openstackdocstheme options -repository_name = 'openstack/manila' -bug_project = 'manila' -bug_tag = 'api-ref' +openstackdocs_repo_name = 'openstack/manila' +openstackdocs_bug_project = 'manila' +openstackdocs_bug_tag = 'api-ref' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -108,7 +108,7 @@ add_module_names = False show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] diff --git a/doc/requirements.txt b/doc/requirements.txt index 145c4e4171..399823e26a 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,10 +1,10 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -openstackdocstheme>=1.31.2 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 +openstackdocstheme>=2.2.1 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD +sphinx>=2.0.0,!=2.1.0 # BSD mock>=2.0.0 # BSD os-api-ref>=1.4.0 # Apache-2.0 ddt>=1.0.1 # MIT diff --git a/doc/source/conf.py b/doc/source/conf.py index 9964332470..b243fe57e2 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -65,9 +65,10 @@ policy_generator_config_file = ( sample_policy_basename = '_static/manila' # openstackdocstheme options -repository_name = 'openstack/manila' -bug_project = 'manila' -bug_tag = 'docs' +openstackdocs_repo_name = 'openstack/manila' +openstackdocs_pdf_link = True +openstackdocs_bug_project = 'manila' +openstackdocs_bug_tag = 'docs' todo_include_todos = True @@ -123,7 +124,7 @@ add_module_names = False show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['manila.'] diff --git a/lower-constraints.txt b/lower-constraints.txt index 7a0105b092..dfe831df14 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -51,7 +51,6 @@ msgpack==0.5.6 munch==2.2.0 netaddr==0.7.18 netifaces==0.10.6 -openstackdocstheme==1.31.2 openstacksdk==0.12.0 os-api-ref==1.4.0 os-client-config==1.29.0 @@ -114,8 +113,6 @@ Routes==2.3.1 simplejson==3.13.2 six==1.10.0 snowballstemmer==1.2.1 -Sphinx==1.6.5 -sphinxcontrib-websupport==1.0.1 SQLAlchemy==1.0.10 sqlalchemy-migrate==0.11.0 sqlparse==0.2.4 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 3b07c5bc67..46393d0dde 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -42,9 +42,9 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack/manila' -bug_project = 'manila' -bug_tag = 'release notes' +openstackdocs_repo_name = 'openstack/manila' +openstackdocs_bug_project = 'manila' +openstackdocs_bug_tag = 'release notes' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -91,7 +91,7 @@ exclude_patterns = [] # show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = []