From 542aedaf3a0b119c2c925fa522e67e6c3adaf010 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 1 Jun 2020 15:35:24 +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 Remove py27 job, py27 fails and not supported anymore in OpenStack since Ussuri. Remove unneeded setup.cfg cruft. Change-Id: Ie22a24f1465420898c0a20efb2773cce2ed6e039 --- .zuul.yaml | 7 ++++++- doc/source/conf.py | 8 +++++++- requirements.txt | 7 +++---- setup.cfg | 5 ----- tox.ini | 13 ++++--------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 488fab5..2baaeb6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,4 +1,9 @@ - project: templates: - - openstack-python-jobs - publish-openstack-docs-pti + check: + jobs: + - openstack-tox-pep8 + gate: + jobs: + - openstack-tox-pep8 diff --git a/doc/source/conf.py b/doc/source/conf.py index 4e65f2f..0256583 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -50,6 +50,12 @@ master_doc = 'index' project = u'Performance Docs' copyright = u'2015, OpenStack Foundation' +# openstackdocstheme options +openstackdocs_repo_name = 'openstack/performance-docs' +openstackdocs_bug_project = 'rally' +openstackdocs_bug_tag = 'performance-docs' +openstackdocs_auto_version = False + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. @@ -89,7 +95,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/requirements.txt b/requirements.txt index 4016b7c..5bcb4f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ -openstackdocstheme>=1.11.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD -sphinx!=1.6.6,!=1.6.7;python_version>='3.4' # BSD +openstackdocstheme>=2.2.1 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD six>=1.9.0 sphinxcontrib-httpdomain -sphinx_rtd_theme + diff --git a/setup.cfg b/setup.cfg index 6f298e4..2f6f2e5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,8 +16,3 @@ classifier = packages = performance_docs -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source - diff --git a/tox.ini b/tox.ini index 37aa44b..bb22160 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,12 @@ [tox] -envlist = docs,py27,pep8 -minversion = 2.0 +envlist = docs,pep8 +minversion = 3.1.1 skipsdist = True +ignore_basepython_conflict = True [testenv] +basepython = python3 usedevelop = True -# --ignore-installed is added to workaround problem with pip 8.0 and argparse -# https://github.com/pypa/pip/issues/3404 and -# https://github.com/pypa/pip/issues/3384 -install_command = pip install --ignore-installed -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} LANG=en_US.UTF-8 LANGUAGE=en_US:en @@ -20,15 +18,12 @@ commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:venv] -basepython = python3 commands = {posargs} [testenv:pep8] -basepython = python3 commands = flake8 [testenv:docs] -basepython = python3 commands = sphinx-build -b html doc/source doc/build/html [testenv:pdf]