From 4d85bab46b1baba71200191c98080b3ee35fa297 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 12:43:10 +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. 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: Ie14b87a1e67a7b4351f17a2f0687bcfe5a4b2133 --- doc/requirements.txt | 4 ++-- doc/source/conf.py | 10 ++++++---- lower-constraints.txt | 4 ---- releasenotes/source/conf.py | 9 +++++---- test-requirements.txt | 4 ---- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index f85dcc8..50d1565 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,5 +2,5 @@ # 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 -sphinx>=1.8.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 12d2bf5..952ea00 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -68,7 +68,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 man page output -------------------------------------------- @@ -116,6 +116,8 @@ latex_elements = { # intersphinx_mapping = {'http://docs.python.org/': None} # openstackdocstheme options -repository_name = 'openstack/watcher-dashboard' -bug_project = 'watcher-dashboard' -bug_tag = '' +openstackdocs_repo_name = 'openstack/watcher-dashboard' +openstackdocs_pdf_link = True +openstackdocs_auto_name = False +openstackdocs_bug_project = 'watcher-dashboard' +openstackdocs_bug_tag = '' diff --git a/lower-constraints.txt b/lower-constraints.txt index 90dedb5..fd8cb9a 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -43,7 +43,6 @@ msgpack==0.5.6 munch==2.2.0 netaddr==0.7.19 netifaces==0.10.6 -openstackdocstheme==1.31.2 openstacksdk==0.12.0 os-client-config==1.29.0 os-service-types==1.2.0 @@ -78,7 +77,6 @@ python-watcherclient==1.1.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 @@ -87,8 +85,6 @@ selenium==2.50.1 semantic-version==2.6.0 simplejson==3.13.2 snowballstemmer==1.2.1 -Sphinx==1.6.2 -sphinxcontrib-websupport==1.0.1 stevedore==1.28.0 testscenarios==0.4 testtools==2.2.0 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index e2fad91..f26a2bc 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -93,7 +93,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 = [] @@ -109,9 +109,10 @@ pygments_style = 'sphinx' html_theme = 'openstackdocs' # openstackdocstheme options -repository_name = 'openstack/watcher-dashboard' -bug_project = 'watcher-dashboard' -bug_tag = '' +openstackdocs_repo_name = 'openstack/watcher-dashboard' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'watcher-dashboard' +openstackdocs_bug_tag = '' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/test-requirements.txt b/test-requirements.txt index 5f77ba6..fb1ca6c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,7 +12,3 @@ testtools>=2.2.0 # MIT # This also needs xvfb library installed on your OS xvfbwrapper>=0.1.3 #license: MIT -# Doc requirements -openstackdocstheme>=1.31.2 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD -reno>=2.5.0 # Apache-2.0