From 6baebba0324176b3043cb82519f935c202a3ce1e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 24 May 2020 15:11:28 +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. Disable openstackdocs_auto_name to use 'project' variable as name. 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. 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: I92d494b7579a7d9c131985f67c53bed20fb69048 --- doc/source/conf.py | 7 ++++--- lower-constraints.txt | 6 +++--- releasenotes/source/conf.py | 7 ++++++- test-requirements.txt | 6 +++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 2e7dbec0..4c8e06ed 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,8 +27,9 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack/sushy-tools' -use_storyboard = True +openstackdocs_repo_name = 'openstack/sushy-tools' +openstackdocs_pdf_link = True +openstackdocs_use_storyboard = True # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. @@ -51,7 +52,7 @@ add_function_parentheses = True add_module_names = True # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # -- Options for HTML output -------------------------------------------------- diff --git a/lower-constraints.txt b/lower-constraints.txt index 6ddda64b..ecba25a5 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -32,7 +32,7 @@ mock==2.0.0 mox3==0.20.0 munch==2.1.0 netifaces==0.10.9 -openstackdocstheme==1.20.0 +openstackdocstheme==2.2.1 openstacksdk==0.13.0 os-client-config==2.1.0 os-service-types==1.7.0 @@ -47,12 +47,12 @@ python-mimeparse==1.6.0 python-subunit==1.0.0 pytz==2013.6 PyYAML==3.12 -reno==2.5.0 +reno==3.1.0 requests==2.14.2 requestsexceptions==1.2.0 six==1.14.0 snowballstemmer==1.2.1 -Sphinx==1.6.2 +Sphinx==2.0.0 sphinxcontrib-websupport==1.0.1 stestr==1.0.0 stevedore==1.20.0 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 086a4403..e5681707 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -57,6 +57,11 @@ master_doc = 'index' project = u'sushy-tools Release Notes' copyright = u'2018, Sushy Developers' +# openstackdocstheme options +openstackdocs_repo_name = 'openstack/sushy-tools' +openstackdocs_use_storyboard = True +openstackdocs_auto_name = False + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. @@ -97,7 +102,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 = [] diff --git a/test-requirements.txt b/test-requirements.txt index 8cedfa62..6c24f356 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,8 +8,8 @@ coverage!=4.4,>=4.0 # Apache-2.0 # used by libvirt driver libvirt-python!=4.1.0,>=3.7.0 # LGPLv2+ python-subunit>=1.0.0 # Apache-2.0/BSD -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.20.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 # used by nova driver openstacksdk>=0.13.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 @@ -17,6 +17,6 @@ stestr>=1.0.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT munch>=2.1.0 # MIT -reno>=2.5.0 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 flake8-import-order>=0.17.1 # LGPLv3