From edc70974161877b94510074b81df372819183755 Mon Sep 17 00:00:00 2001 From: Nguyen Hai Date: Thu, 22 Mar 2018 17:56:59 +0900 Subject: [PATCH] Follow the new PTI for document build For compliance with the Project Testing Interface as described in: https://governance.openstack.org/tc/reference/project-testing-interface.html http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Remove the '[build_sphinx]' section as described in: http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html Change-Id: Ia8e8d6b4e23c2737a9e948e7c4b682dca697f6a4 --- doc/requirements.txt | 8 ++++++++ setup.cfg | 6 ------ test-requirements.txt | 5 ----- tox.ini | 27 +++++++++++++++++++++------ 4 files changed, 29 insertions(+), 17 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000000..31a1639dcc --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,8 @@ +# 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. +openstackdocstheme>=1.18.1 # Apache-2.0 +os-api-ref>=1.4.0 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 +sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +sphinxcontrib-httpdomain>=1.3.0 # BSD diff --git a/setup.cfg b/setup.cfg index 6d31ac5ea8..38f2b84d3b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -85,12 +85,6 @@ oslo.config.opts.defaults = oslo.policy.policies = sahara = sahara.common.policies:list_rules -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source -warning-is-error = 1 - [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg diff --git a/test-requirements.txt b/test-requirements.txt index 653c0c9acf..c1a5dc76d3 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,15 +11,10 @@ coverage!=4.4,>=4.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD mock>=2.0.0 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 -os-api-ref>=1.4.0 # Apache-2.0 os-testr>=1.0.0 # Apache-2.0 psycopg2>=2.6.2 # LGPL/ZPL pylint==1.4.5 # GPLv2 -reno>=2.5.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -sphinxcontrib-httpdomain>=1.3.0 # BSD testresources>=2.0.0 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index afd0324727..103453df80 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,11 @@ basepython = python3.5 commands = oslo_debug_helper -t sahara/tests/unit {posargs} [testenv:pep8] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/doc/requirements.txt commands = flake8 {posargs} doc8 doc/source @@ -47,22 +52,26 @@ sitepackages = True commands = {posargs} [testenv:docs] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/html doc/build rm -rf api-ref/build api-ref/html rm -rf doc/source/apidoc doc/source/api - python setup.py build_sphinx + sphinx-build -W -b html doc/source doc/build/html sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html -whitelist_externals = - rm +whitelist_externals = rm [testenv:api-ref] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/doc/requirements.txt install_command = pip install -U --force-reinstall {opts} {packages} commands = rm -rf api-ref/build api-ref/html sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html -whitelist_externals = - rm +whitelist_externals = rm [testenv:pylint] @@ -75,7 +84,13 @@ commands = --output-file etc/sahara/sahara.conf.sample [testenv:releasenotes] -commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -r{toxinidir}/doc/requirements.txt +commands = + rm -rf releasenotes/build releasenotes/html + sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html +whitelist_externals = rm [testenv:pip-missing-reqs] # do not install test-requirements as that will pollute the virtualenv for