From 5e75819f59401ee7e7d9eb8e41a5bb7b3a97f65b Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 10 Jun 2020 16:10:06 +0200 Subject: [PATCH] Switch to newer openstackdocstheme version Switch to openstackdocstheme 2.2.1 version. Using this version will allow especially: * Linking from HTML to PDF document * Allow parallel building of documents * Fix some rendering problems Update Sphinx version as well. Disable openstackdocs_auto_version to not auto-version the documents. 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. 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 Enable warnings now that the repo has one idea. Change-Id: I821ae47ced7542d7d5cbd554a4bc6919cf5d181c --- doc/source/conf.py | 14 ++++++++++++-- doc/source/index.rst | 1 + test-requirements.txt | 4 ++-- tox.ini | 6 ++---- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 2087ffe..1b79c81 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -57,6 +57,16 @@ master_doc = 'index' project = u'OpenStack Ideas' copyright = u'2020, OpenStack Foundation' +# openstackdocstheme options +openstackdocs_repo_name = 'openstack/ideas' +openstackdocs_auto_name = False +openstackdocs_auto_version = False +openstackdocs_bug_project = '' +openstackdocs_bug_tag = '' + +version = '' +release = '' + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None @@ -87,7 +97,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 = [] @@ -130,7 +140,7 @@ html_short_title = 'Ideas' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +# html_static_path = ['_static'] # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/doc/source/index.rst b/doc/source/index.rst index b59d965..6d9fcb3 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -94,4 +94,5 @@ Proposed ideas :glob: ideas/*/index +.. remove this lilne once there's content.. ideas/* diff --git a/test-requirements.txt b/test-requirements.txt index 813d28c..1260ac0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,5 +2,5 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. # needed for doc build -openstackdocstheme>=1.31.2 # Apache-2.0 -sphinx>=1.5.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD diff --git a/tox.ini b/tox.ini index cdaf54b..9147753 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = docs -minversion = 1.6 +minversion = 3.2.0 skipsdist = True [testenv] @@ -12,6 +12,4 @@ deps = -r{toxinidir}/test-requirements.txt commands = {posargs} [testenv:docs] -# TODO: Upgrade to -W when we have at least one idea merged. -commands = sphinx-build -v -b html -d doc/build/doctrees doc/source doc/build/html -#commands = sphinx-build -v -W -b html -d doc/build/doctrees doc/source doc/build/html +commands = sphinx-build -v -W -b html -d doc/build/doctrees doc/source doc/build/html