From 592772b85f936ecf0add112f34edf9566ecbbaae Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 14 May 2020 21:49:41 +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 * parallelizing building of documents Update Sphinx version as well. 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. A couple of variables are also not needed anymore, remove them. Set openstackdocs_pdf_link to link to PDF file. 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. See also http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html Change-Id: I3544c1f95dd3ce510c00bfeda4f3ced87a3cd60c --- api-ref/source/conf.py | 8 ++++---- doc/requirements.txt | 6 +++--- doc/source/conf.py | 9 +++++---- lower-constraints.txt | 6 +----- releasenotes/source/conf.py | 9 +++++---- test-requirements.txt | 2 +- 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index b87ad95a300..5c5686a798e 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -57,9 +57,9 @@ master_doc = 'index' copyright = u'OpenStack Foundation' # openstackdocstheme options -repository_name = 'openstack/cinder' -bug_project = 'cinder' -bug_tag = 'api-ref' +openstackdocs_repo_name = 'openstack/cinder' +openstackdocs_bug_project = 'cinder' +openstackdocs_bug_tag = 'api-ref' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -88,7 +88,7 @@ add_module_names = False show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # -- Options for man page output ---------------------------------------------- diff --git a/doc/requirements.txt b/doc/requirements.txt index 8f984b5656a..a7d9c2ea3bb 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,9 +1,9 @@ # 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 -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=2.0.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD os-api-ref>=1.5.0 # Apache-2.0 sphinxcontrib-apidoc>=0.2.0 # BSD sphinx-feature-classification>=0.1.0 # Apache 2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index b45669ec47d..0bb6810bcef 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -85,9 +85,10 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -repository_name = 'openstack/cinder' -bug_project = 'cinder' -bug_tag = 'doc' +openstackdocs_repo_name = 'openstack/cinder' +openstackdocs_bug_project = 'cinder' +openstackdocs_bug_tag = 'doc' +openstackdocs_pdf_link = True copyright = u'2010-present, OpenStack Foundation' # The language for content autogenerated by Sphinx. Refer to documentation @@ -120,7 +121,7 @@ add_module_names = False 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 = ['cinder.'] diff --git a/lower-constraints.txt b/lower-constraints.txt index eb9067fc17c..68b1717ddf7 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -62,7 +62,6 @@ netaddr==0.7.19 netifaces==0.10.7 networkx==1.11 oauth2client==1.5.0 -openstackdocstheme==2.0.0 os-api-ref==1.4.0 os-brick==2.2.0 os-client-config==1.29.0 @@ -121,7 +120,7 @@ python-swiftclient==3.2.0 pytz==2013.6 pyudev==0.21.0 PyYAML==5.1 -reno==2.5.0 +reno==3.1.0 repoze.lru==0.7 requests==2.14.2 requestsexceptions==1.4.0 @@ -133,9 +132,6 @@ rtslib-fb==2.1.65 six==1.10.0 smmap2==2.0.3 snowballstemmer==1.2.1 -Sphinx==2.0.0 -sphinx-feature-classification==0.1.0 -sphinxcontrib-websupport==1.0.1 sqlalchemy-migrate==0.11.0 SQLAlchemy==1.3.0 SQLAlchemy-Utils==0.36.1 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 307f84eaaed..f88b58a6943 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -52,10 +52,11 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -repository_name = 'openstack/cinder' -bug_project = 'cinder' -bug_tag = 'doc' +openstackdocs_repo_name = 'openstack/cinder' +openstackdocs_bug_project = 'cinder' +openstackdocs_bug_tag = 'doc' project = u'Cinder Release Notes' +openstackdocs_auto_name = False copyright = u'2015, Cinder Developers' # Release notes are version independent, no need to set version and release @@ -92,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 = [] diff --git a/test-requirements.txt b/test-requirements.txt index de1f87ab743..5c94b00d00e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -23,5 +23,5 @@ oslo.versionedobjects[fixtures]>=1.31.2 # Apache-2.0 # so we need to pin it here to a known working version bandit==1.6.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 Pygments>=2.2.0 # BSD license