From eac3eae35aa80ba56929bffe424d96a8ee70718a Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Thu, 22 Mar 2018 06:46:10 +0900 Subject: [PATCH] Follow the new PTI for document build The detail is described in the following links: https://governance.openstack.org/tc/reference/project-testing-interface.html http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html doc8 command is dropped from docs and releasenotes tox envs. We run doc8 in pep8 tox env, so this hurts nothing. Change-Id: I24271b527258b1de4cf26ca7efd625954eb834de --- doc/requirements.txt | 13 +++++++++++++ doc/source/conf.py | 1 + setup.cfg | 6 ------ test-requirements.txt | 3 --- tox.ini | 16 ++++++++++++++-- 5 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000000..71e8cb920e --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,13 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +# Order matters to the pip dependency resolver, so sorting this file +# changes how packages are installed. New dependencies should be +# added in alphabetical order, however, some dependencies may need to +# be installed in a specific order. +openstackdocstheme>=1.18.1 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD + +# The below is rewquired to build testing module reference +mock>=2.0.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 97a6bb1e6c..d086700d3b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -34,6 +34,7 @@ import django # Ignore warnings from openstack_dashboard.settings in the doc build. # This can be dropped once Sphinx correctly ignore such warnings. logging.getLogger('openstack_dashboard.settings').setLevel(logging.ERROR) +logging.getLogger('horizon.test.helpers').setLevel(logging.ERROR) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) diff --git a/setup.cfg b/setup.cfg index 1ad4e3393f..0c9ff408ae 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,12 +32,6 @@ packages = openstack_dashboard openstack_auth -[build_sphinx] -all-files = 1 -warning-is-error = 1 -build-dir = doc/build -source-dir = doc/source - [nosetests] verbosity=2 detailed-errors=1 diff --git a/test-requirements.txt b/test-requirements.txt index e29d610849..f33cc2afee 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -21,11 +21,8 @@ nose-exclude>=0.3.0 # LGPL nosexcover>=1.0.10 # BSD nosehtmloutput>=0.0.3 # Apache-2.0 openstack.nose-plugin>=0.7 # Apache-2.0 -openstackdocstheme>=1.18.1 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 requests>=2.14.2 # Apache-2.0 selenium>=2.50.1 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT # This also needs xvfb library installed on your OS diff --git a/tox.ini b/tox.ini index 8c37f8b837..53c8d2b353 100644 --- a/tox.ini +++ b/tox.ini @@ -46,6 +46,10 @@ commands = bash {toxinidir}/tools/unit_tests.sh {envpython} {toxinidir} {posargs} [testenv:pep8] +# sphinx (precisely Pygments) needs to be installed to make doc8 work properly +deps = + {[testenv]deps} + -r{toxinidir}/doc/requirements.txt commands = flake8 {posargs} {envpython} {toxinidir}/manage.py extract_messages --verbosity 0 --check-only @@ -117,13 +121,21 @@ commands = {[unit_tests]commands} [testenv:docs] +# We need to install horizon dependecies to build module references +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt commands = - doc8 doc/source sphinx-build -W -b html doc/source doc/build/html [testenv:releasenotes] +# There is no need to install horizon. +usedevelop = False +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/doc/requirements.txt commands = - doc8 releasenotes/source releasenotes/notes sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:manage]