From 62031d8a7c3987f8987adf3a546275f5beb0e007 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 May 2020 13:01:34 +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: Ic888f31814431683d8cd71e1ab25c0dc63bcc8ef --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 9 +++++---- lower-constraints.txt | 4 ---- releasenotes/source/conf.py | 9 +++++---- test-requirements.txt | 3 --- tox.ini | 9 +++++---- 6 files changed, 18 insertions(+), 22 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 88197922..45a68d61 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>=2.0.0 # 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>=2.0.0,!=2.1.0 # BSD +sphinx>=2.0.0,!=2.1.0 # BSD ddt>=1.0.1 # MIT fixtures>=3.0.0 # Apache-2.0/BSD oslotest>=3.2.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 33663855..66172d1e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -28,9 +28,10 @@ extensions = [ ] # openstackdocstheme options -repository_name = 'openstack/manila-ui' -bug_project = 'manila-ui' -bug_tag = 'docs' +openstackdocs_repo_name = 'openstack/manila-ui' +openstackdocs_pdf_link = True +openstackdocs_bug_project = 'manila-ui' +openstackdocs_bug_tag = 'docs' # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. @@ -54,7 +55,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 a5b5507e..610a5789 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -45,7 +45,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 @@ -85,7 +84,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 @@ -95,8 +93,6 @@ semantic-version==2.6.0 simplejson==3.13.2 six==1.10.0 snowballstemmer==1.2.1 -Sphinx==2.0.0 -sphinxcontrib-websupport==1.0.1 stevedore==1.28.0 testrepository==0.0.18 testscenarios==0.4 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 4af6cf19..97b3a56c 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -43,9 +43,10 @@ extensions = [ ] # openstackdocsthem options -repository_name = 'openstack/manila-ui' -bug_project = 'manila-ui' -bug_tag = 'release notes' +openstackdocs_repo_name = 'openstack/manila-ui' +openstackdocs_auto_name = False +openstackdocs_bug_project = 'manila-ui' +openstackdocs_bug_tag = 'release notes' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -98,7 +99,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 af6f39e0..398eec02 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,13 +6,10 @@ hacking>=3.0.1,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT python-subunit>=1.0.0 # Apache-2.0/BSD -openstackdocstheme>=2.0.0 # Apache-2.0 -sphinx>=2.0.0,!=2.1.0 # BSD pytest>=5.3.5 # MIT testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT -reno>=2.5.0 # Apache-2.0 # integration tests requirements selenium>=2.50.1 # Apache-2.0 xvfbwrapper>=0.1.3 #license: MIT diff --git a/tox.ini b/tox.ini index af4ee39a..20fd8d1e 100644 --- a/tox.ini +++ b/tox.ini @@ -47,17 +47,18 @@ commands = {posargs} commands = {toxinidir}/tools/cover.sh {posargs} [testenv:docs] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt whitelist_externals = rm commands = rm -rf doc/build sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] +deps={[testenv:docs]deps} usedevelop = True -deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/requirements.txt - -r{toxinidir}/doc/requirements.txt whitelist_externals = make