From db12a8954eb1f081e403b8b004bc67f891eb669c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 20 May 2020 08:14:27 +0200 Subject: [PATCH] Switch to newer openstackdocstheme and reno versions Switch to openstackdocstheme 2.2.0 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. Set openstackdocs_auto_name to use 'project' 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. 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. Change-Id: If38c88e27f6991c816a272e423ed25b19393815f --- doc/requirements.txt | 3 ++- doc/source/conf.py | 9 +++++---- lower-constraints.txt | 4 ---- releasenotes/source/conf.py | 9 +++++---- test-requirements.txt | 3 --- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 9fd27a6..e36a73f 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,2 +1,3 @@ -openstackdocstheme>=2.0.0 # Apache-2.0 +openstackdocstheme>=2.2.0 # Apache-2.0 sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD +reno>=3.1.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index cfedf30..879dcb0 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -28,9 +28,10 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack/designate-dashboard' -bug_project = 'designate-dashboard' -bug_tag = '' +openstackdocs_repo_name = 'openstack/designate-dashboard' +openstackdocs_pdf_link = True +openstackdocs_bug_project = 'designate-dashboard' +openstackdocs_bug_tag = '' html_theme = 'openstackdocs' # autodoc generation is a bit aggressive and a ndashboardsance when doing heavy @@ -55,7 +56,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 f58f35f..30a2a2e 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -48,7 +48,6 @@ msgpack==0.5.6 munch==2.2.0 netaddr==0.7.19 netifaces==0.10.6 -openstackdocstheme==2.0.0 openstacksdk==0.12.0 os-client-config==1.29.0 os-service-types==1.2.0 @@ -89,7 +88,6 @@ python-swiftclient==3.5.0 pytz==2018.3 PyYAML==3.12 rcssmin==1.0.6 -reno==2.5.0 requests==2.18.4 requestsexceptions==1.4.0 rfc3986==1.1.0 @@ -98,8 +96,6 @@ semantic-version==2.6.0 simplejson==3.13.2 six==1.11.0 snowballstemmer==1.2.1 -Sphinx==2.0.0 -sphinxcontrib-websupport==1.0.1 stevedore==1.28.0 termcolor==1.1.0 testrepository==0.0.18 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 4755d7f..d77b089 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -31,9 +31,10 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack/designate-dashboard' -bug_project = 'designate-dashboard' -bug_tag = '' +openstackdocs_repo_name = 'openstack/designate-dashboard' +openstackdocs_bug_project = 'designate-dashboard' +openstackdocs_bug_tag = '' +openstackdocs_auto_name = False html_theme = 'openstackdocs' # Add any paths that contain templates here, relative to this directory. @@ -94,7 +95,7 @@ exclude_patterns = [] # 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 974adf2..0b55773 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,6 +10,3 @@ pylint==1.4.5 # GPLv2 testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT unittest2>=1.1.0 # BSD -sphinx>=2.0.0,!=2.1.0 # BSD -openstackdocstheme>=2.0.0 # Apache-2.0 -reno>=2.5.0 # Apache-2.0