tox: Keeping going with docs

1. Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
2. Remove the unnecessary blank line for tox.ini

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: I5be44aec352223a8df69eefe79f0909dc0d04fec
This commit is contained in:
jacky06 2019-10-23 23:14:47 +08:00
parent 61a6c177a2
commit 655d265df7
2 changed files with 5 additions and 32 deletions

View File

@ -3,8 +3,8 @@
# process, which may cause wedges in the gate later.
# this is required for the docs build jobs
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
openstackdocstheme>=1.29.2 # Apache-2.0
reno>=2.11.3 # Apache-2.0

33
tox.ini
View File

@ -3,7 +3,6 @@ minversion = 2.0
skipsdist = True
envlist = linters,docs,releasenotes,inventory,py3-inventory
[testenv]
usedevelop = True
basepython = python2.7
@ -36,8 +35,6 @@ setenv =
TEST_PLAYBOOK={toxinidir}/tests/bootstrap-aio.yml {toxinidir}/playbooks/setup-everything.yml
ANSIBLE_LINT_PARAMS=--exclude={homedir}/.ansible/roles
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
@ -45,12 +42,10 @@ commands =
doc8 doc
docstheme-build-translated.sh
[testenv:deploy-guide]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html
commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html
[testenv:pdf-docs]
basepython = python3
@ -58,7 +53,7 @@ deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[doc8]
@ -66,15 +61,11 @@ commands =
extensions = .rst
ignore = D001
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
# environment used by the -infra templated docs job
[testenv:venv]
@ -82,30 +73,22 @@ basepython = python3
commands =
{posargs}
[testenv:pep8]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-pep8.sh"
[flake8]
# Ignores the following rules due to how ansible modules work in general
# F403 'from ansible.module_utils.basic import *' used;
# unable to detect undefined names
ignore=F403
[testenv:bashate]
basepython = python3
commands =
bash -c "{toxinidir}/tests/common/test-bashate.sh"
# The deps URL should be set to the appropriate git URL.
# In the tests repo itself, the variable is uniquely set to
# the toxinidir so that the role is able to test itself, but
@ -122,8 +105,6 @@ deps =
-r{toxinidir}/global-requirement-pins.txt
-rhttps://opendev.org/openstack/openstack-ansible-tests/raw/test-ansible-deps.txt
[testenv:ansible-syntax]
basepython = python3
deps =
@ -131,8 +112,6 @@ deps =
commands =
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
[testenv:ansible-lint]
basepython = python3
deps =
@ -140,8 +119,6 @@ deps =
commands =
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
[testenv:inventory]
basepython = python3
# Use a fixed seed since some inventory tests rely on specific ordering
@ -157,8 +134,6 @@ commands =
coverage run -a {toxinidir}/tests/test_filesystem.py
coverage report --show-missing --include={toxinidir}/inventory/*,{toxinidir}/osa_toolkit/*
[testenv:py3-inventory]
basepython = python3.5
setenv =
@ -166,8 +141,6 @@ setenv =
commands =
{[testenv:inventory]commands}
[testenv:linters]
basepython = python3
deps =