From d926c5f13d91d36559cf2330f59100c0a26d357e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 3 Jun 2020 20:48:42 +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. 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 Remove also now obsolete sections from setup.cfg and cleanup tox.ini. Change-Id: I861983389f7dc57d229a2c87e28ff3deb91a4a63 --- doc/source/conf.py | 7 ++++--- setup.cfg | 9 --------- test-requirements.txt | 4 ++-- tox.ini | 7 ++----- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index a059501..1db448b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -44,8 +44,9 @@ source_suffix = '.rst' #source_encoding = 'utf-8-sig' # Setting for openstackdocstheme: -repository_name = "openstack/ossa" -bug_project = 'ossa' +openstackdocs_repo_name = "openstack/ossa" +openstackdocs_auto_name = False +openstackdocs_bug_project = 'ossa' # The master toctree document. master_doc = 'index' @@ -84,7 +85,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 = [] diff --git a/setup.cfg b/setup.cfg index c5241cf..d85e784 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,12 +7,3 @@ description-file = author = OpenStack Vulnerability Management Team author-email = openstack-discuss@lists.openstack.org home-page = http://www.openstack.org/ - -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source -warning-is-error = 1 - -[pbr] -warnerrors = True diff --git a/test-requirements.txt b/test-requirements.txt index 9f84d56..b8088e6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,5 @@ # needed for doc build Jinja2>=2.7.3 PyYAML==3.11 -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.19.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 diff --git a/tox.ini b/tox.ini index c6ade09..6fca2cd 100644 --- a/tox.ini +++ b/tox.ini @@ -4,16 +4,13 @@ minversion = 1.6 skipsdist = True [testenv] +basepython = python3 +deps = -r{toxinidir}/test-requirements.txt usedevelop = True -install_command = pip install {opts} {packages} setenv = VIRTUAL_ENV={envdir} [testenv:docs] -basepython = python3 -deps = -r{toxinidir}/test-requirements.txt commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html [testenv:venv] -basepython = python3 -deps = -r{toxinidir}/test-requirements.txt commands = {[testenv:docs]commands}