From 6a3769e0770d5c71622652e7a61898745cf94510 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 19 May 2020 08:37:44 +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_auto_name to use 'project' as name. 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. Create separate doc/requirements.txt file and use it, this allows to continue testing with py35 and build docs that require py36. 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: Ic97beaec35ff633380688beb93318273ab6ca15c --- doc/requirements.txt | 7 +++++++ doc/source/conf.py | 8 ++++---- releasenotes/source/conf.py | 14 +++++--------- test-requirements.txt | 3 --- tox.ini | 2 ++ 5 files changed, 18 insertions(+), 16 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..bb94d5c --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,7 @@ +# 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. + +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 3c39592..9a9f6d7 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -48,12 +48,12 @@ add_function_parentheses = True add_module_names = True # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'native' # openstackdocstheme options -repository_name = 'openstack-dev/bashate' -bug_project = 'bashate' -bug_tag = '' +openstackdocs_repo_name = 'openstack-dev/bashate' +openstackdocs_bug_project = 'bashate' +openstackdocs_bug_tag = '' # Grouping the document tree for man pages. # List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 14edff8..5eed97b 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -94,7 +94,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 = [] @@ -103,9 +103,10 @@ pygments_style = 'sphinx' # keep_warnings = False # openstackdocstheme options -repository_name = 'openstack-dev/bashate' -bug_project = 'bashate' -bug_tag = '' +openstackdocs_repo_name = 'openstack-dev/bashate' +openstackdocs_bug_project = 'bashate' +openstackdocs_bug_tag = '' +openstackdocs_auto_name = False # -- Options for HTML output ---------------------------------------------- @@ -147,11 +148,6 @@ html_theme = 'openstackdocs' # 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 diff --git a/test-requirements.txt b/test-requirements.txt index e2e2c3c..1e241ee 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,8 +9,5 @@ coverage>=3.6 discover fixtures>=1.3.1 python-subunit>=0.0.18 -sphinx!=1.6.6,!=1.6.7,!=2.1.0 # BSD -openstackdocstheme>=1.31.2 # Apache-2.0 testtools>=2.2.0 stestr>=1.0.0 # Apache-2.0 -reno!=2.3.1,>=1.8.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 9dfc001..844dce7 100644 --- a/tox.ini +++ b/tox.ini @@ -19,6 +19,7 @@ commands = commands = flake8 [testenv:docs] +deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -W -E -b html doc/source doc/build/html [testenv:venv] @@ -37,6 +38,7 @@ commands = coverage report [testenv:releasenotes] +deps = {[testenv:docs]deps} commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [flake8]