From 676b38a9ad738a36a5a5c64b5f34d617e7d63825 Mon Sep 17 00:00:00 2001 From: gujin Date: Fri, 1 Nov 2019 11:39:07 +0800 Subject: [PATCH] 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 exists folder before run sphinx-build command [1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045 Change-Id: I1b1b45bf3ae104defbb16282e18995a28f67f649 --- doc/requirements.txt | 3 +-- lower-constraints.txt | 2 +- tox.ini | 12 +++++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index def8f6d..64bb34b 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -10,6 +10,5 @@ mock>=2.0.0 # BSD openstackdocstheme>=1.18.1 # Apache-2.0 reno>=2.5.0 # 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.1.0 # BSD sphinxcontrib-apidoc>=0.2.0 # BSD diff --git a/lower-constraints.txt b/lower-constraints.txt index 0e607b7..e3b9c6e 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -89,7 +89,7 @@ semantic-version==2.6.0 simplejson==3.13.2 six==1.11.0 snowballstemmer==1.2.1 -Sphinx==1.6.2 +Sphinx==1.8.0 sphinxcontrib-apidoc===0.2.0 sphinxcontrib-websupport==1.0.1 stevedore==1.28.0 diff --git a/tox.ini b/tox.ini index 88526ac..0ab6b3e 100644 --- a/tox.ini +++ b/tox.ini @@ -83,11 +83,14 @@ commands = [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 + rm -rf doc/build + sphinx-build -W --keep-going -b html doc/source doc/build/html [testenv:pdf-docs] basepython = python3 @@ -96,7 +99,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 [testenv:docs-local] @@ -109,10 +112,13 @@ commands= [testenv:releasenotes] basepython = python3 +whitelist_externals = + rm deps = {[testenv:docs]deps} commands = - sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html + rm -rf releasenotes/build + sphinx-build -a -E -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html [testenv:lower-constraints] basepython = python3