From 0350db11d4aa7dd211c55a68a9e1eff9bf3c8f0a Mon Sep 17 00:00:00 2001 From: caoyuan Date: Thu, 24 Oct 2019 14:09:59 +0800 Subject: [PATCH] tox: Keeping going with docs 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. [1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045 Change-Id: Idec07bdb441a2f30351267686f2f74888655a6df --- doc/requirements.txt | 4 ++-- tox.ini | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index cdbebdb..cd6e8b7 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # 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.6.6,!=1.6.7,>=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 openstackdocstheme>=1.18.1 # Apache-2.0 reno>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index f9f2ef5..25acc21 100644 --- a/tox.ini +++ b/tox.ini @@ -17,14 +17,18 @@ commands = {posargs} [testenv:docs] basepython = python3 +whitelist_externals = + rm deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt -commands = sphinx-build -W -b html doc/source doc/build/html +commands = + rm -rf doc/build + sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:spelling] deps = -r{toxinidir}/requirements.txt sphinxcontrib-spelling PyEnchant -commands = sphinx-build -b spelling doc/source doc/build/spelling +commands = sphinx-build --keep-going -b spelling doc/source doc/build/spelling