From 1b59e1dbb05dc62ee962b46235afeea87c450184 Mon Sep 17 00:00:00 2001 From: caoyuan Date: Thu, 24 Oct 2019 20:04:10 +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: I041acd7c63cf56ec9e90177a82ac0b37e15d4b12 --- doc/requirements.txt | 4 ++-- lower-constraints.txt | 2 +- tox.ini | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 8b11e59..92f8ab6 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,5 +3,5 @@ # process, which may cause wedges in the gate later. openstackdocstheme>=1.18.1 # Apache-2.0 -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 diff --git a/lower-constraints.txt b/lower-constraints.txt index ff17a2f..1213f42 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -69,7 +69,7 @@ rfc3986==0.3.1 simplejson==3.5.1 six==1.10.0 snowballstemmer==1.2.1 -Sphinx==1.6.5 +Sphinx==1.8.0 sphinxcontrib-websupport==1.0.1 stevedore==1.20.0 stestr==2.0.0 diff --git a/tox.ini b/tox.ini index 8b8c6bd..bb15c12 100644 --- a/tox.ini +++ b/tox.ini @@ -51,8 +51,12 @@ commands = [testenv:docs] basepython = python3 +whitelist_externals = + rm deps = -r{toxinidir}/doc/requirements.txt -commands = sphinx-build -b html doc/source doc/build/html +commands = + rm -rf doc/build + sphinx-build --keep-going -b html doc/source doc/build/html [flake8] ignore = E123,E126,E128,E241,E265,E713,H202,H405,H238