From 21b106dc15d74ef0cf786e5185b56aa9dfa0dad1 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 19 May 2020 08:05:52 +0200 Subject: [PATCH] Switch to newer openstackdocstheme version Switch to openstackdocstheme 2.2.0. Using the version 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. 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 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. See also http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html Change-Id: I58edf52ff891328b14edecc9e6e990b34cb730b7 --- doc/requirements.txt | 4 ++-- doc/source/conf.py | 21 +++++---------------- lower-constraints.txt | 3 --- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 4f54b42..5c09c7f 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -openstackdocstheme>=1.32.1 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD sphinxcontrib-apidoc>=0.2.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index ce417f0..5436ee6 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,8 +12,6 @@ # limitations under the License. -from watcherclient import version as watcherclient_version - # -- General configuration ---------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be @@ -47,16 +45,6 @@ master_doc = 'index' project = u'python-watcherclient' copyright = u'OpenStack Foundation' -# 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. -# -# The short X.Y version. -# The full version, including alpha/beta/rc tags. -release = watcherclient_version.version_info.release_string() -# The short X.Y version. -version = watcherclient_version.version_info.version_string() - # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['watcherclient.'] @@ -68,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 -------------------------------------------------- @@ -108,9 +96,10 @@ latex_elements = { } # openstackdocstheme options -repository_name = 'openstack/python-watcherclient' -bug_project = 'python-watcherclient' -bug_tag = '' +openstackdocs_repo_name = 'openstack/python-watcherclient' +openstackdocs_pdf_link = True +openstackdocs_bug_project = 'python-watcherclient' +openstackdocs_bug_tag = '' #html_theme_options = {"show_other_versions": "True"} diff --git a/lower-constraints.txt b/lower-constraints.txt index 4ab467f..df181dc 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -37,7 +37,6 @@ msgpack-python==0.4.0 munch==2.2.0 netaddr==0.7.19 netifaces==0.10.6 -openstackdocstheme==1.32.1 openstacksdk==0.12.0 os-client-config==1.29.0 os-service-types==1.2.0 @@ -73,8 +72,6 @@ rfc3986==0.3.1 simplejson==3.13.2 six==1.11.0 snowballstemmer==1.2.1 -Sphinx==1.6.5 -sphinxcontrib-websupport==1.0.1 stestr==2.0.0 stevedore==1.28.0 tempest==17.1.0