From 1a81faf86a7cc644c761dcf43ed19e6c2db0033d Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 15 May 2020 20:12:15 +0200 Subject: 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. openstackdocstheme renames some variables, so follow the renames. A couple of variables are also not needed anymore, remove them. Set openstackdocs_auto_name to use project as name. 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. 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: I2cc022495b162bec1424ec69611acb879900c005 --- doc/requirements.txt | 6 +++--- doc/source/conf.py | 11 +++++------ lower-constraints.txt | 2 +- releasenotes/source/conf.py | 14 +++++--------- test-requirements.txt | 2 +- 5 files changed, 15 insertions(+), 20 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index f0f258f..dad0837 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,6 +2,6 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. # These are needed for docs generation -openstackdocstheme>=1.20.0 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 1e0fa4a..282a881 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -14,7 +14,6 @@ import os import sys -import openstackdocstheme sys.setrecursionlimit(4000) @@ -67,7 +66,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 -------------------------------------------------- @@ -90,10 +89,10 @@ man_pages = [ # -- Options for openstackdocstheme ------------------------------------------- -repository_name = 'openstack/python-cinderclient' -bug_project = 'python-cinderclient' -bug_tag = 'doc' - +openstackdocs_repo_name = 'openstack/python-cinderclient' +openstackdocs_bug_project = 'python-cinderclient' +openstackdocs_bug_tag = 'doc' +openstackdocs_pdf_link = True # -- Options for LaTeX output ------------------------------------------------- diff --git a/lower-constraints.txt b/lower-constraints.txt index 740ac5a..69a231f 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -46,7 +46,7 @@ python-mimeparse==1.6.0 python-subunit==1.0.0 pytz==2013.6 PyYAML==3.12 -reno==2.5.0 +reno==3.1.0 requests-mock==1.2.0 requests==2.14.2 rfc3986==0.3.1 diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index cff4496..58ed268 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -56,6 +56,7 @@ master_doc = 'index' # General information about the project. project = u'Cinder Client 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 = [] @@ -141,11 +142,6 @@ html_static_path = ['_static'] # directly to the root of the documentation. # html_extra_path = [] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True @@ -273,6 +269,6 @@ texinfo_documents = [ locale_dirs = ['locale/'] # -- Options for openstackdocstheme ------------------------------------------- -repository_name = 'openstack/python-cinderclient' -bug_project = 'cinderclient' -bug_tag = '' +openstackdocs_repo_name = 'openstack/python-cinderclient' +openstackdocs_bug_project = 'cinderclient' +openstackdocs_bug_tag = '' diff --git a/test-requirements.txt b/test-requirements.txt index 562d2cd..210ad76 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,7 +8,7 @@ coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD -reno>=2.5.0 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 requests-mock>=1.2.0 # Apache-2.0 tempest>=17.1.0 # Apache-2.0 testtools>=2.2.0 # MIT -- cgit v1.2.1