From 3f036b5f72a9616575b968788aa3d46dcfb1dedc Mon Sep 17 00:00:00 2001 From: gujin Date: Fri, 1 Nov 2019 14:30:28 +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. cleanup the exists folder before run sphinx-build command [1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045 Change-Id: I6f53d424612af8788818d23ea43460444afc2172 --- CONTRIBUTING.rst | 6 +++--- doc/requirements.txt | 2 +- tox.ini | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 12e2925..9a73738 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -9,14 +9,14 @@ Contributor guidelines If you would like to contribute to the development of OpenStack, you must follow the steps in this page: - http://docs.openstack.org/infra/manual/developers.html + https://docs.openstack.org/infra/manual/developers.html If you already have a good understanding of how the system works and your OpenStack accounts are set up, you can skip to the development workflow section of this documentation to learn how changes to OpenStack should be submitted for review via the Gerrit tool: - http://docs.openstack.org/infra/manual/developers.html#development-workflow + https://docs.openstack.org/infra/manual/developers.html#development-workflow Filing bugs or issues --------------------- @@ -36,6 +36,6 @@ Submitting code --------------- Changes to the project should be submitted for review via the Gerrit tool, following -the workflow documented at: "http://docs.openstack.org/infra/manual/developers.html#development-workflow" +the workflow documented at: "https://docs.openstack.org/infra/manual/developers.html#development-workflow" Pull requests submitted through GitHub will be ignored and closed without regard. diff --git a/doc/requirements.txt b/doc/requirements.txt index f2f684b..f8369f8 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. -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD openstackdocstheme>=1.18.1 # Apache-2.0 # releasenotes reno>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index f55094b..3acbde6 100644 --- a/tox.ini +++ b/tox.ini @@ -27,13 +27,16 @@ deps = -r{toxinidir}/doc/requirements.txt commands = bash -c "rm -rf doc/build" doc8 doc - sphinx-build -b html doc/source doc/build/html + sphinx-build --keep-going -b html doc/source doc/build/html [doc8] extensions = .rst [testenv:releasenotes] basepython = python3 +whitelist_externals = + rm deps = {[testenv:docs]deps} commands = - sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html + rm -rf releasenotes/build + sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html