Follow the new PTI for document build

For compliance with the Project Testing Interface as described in:
[1] https://governance.openstack.org/tc/reference/project-testing-interface.html
[2] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
[3] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: Iebd3fe6731b2e9a6fe4d4cc4d2c4d07d648549cb
This commit is contained in:
Nguyen Hai 2018-08-20 11:24:58 +01:00
parent ac0e0e75c4
commit b0cbf66d49
6 changed files with 27 additions and 20 deletions

7
doc/requirements.txt Normal file
View File

@ -0,0 +1,7 @@
# 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.
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
reno>=2.5.0 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD

View File

@ -4,4 +4,4 @@ Python Mistral bindings class refrence
.. toctree::
:maxdepth: 1
api/autoindex
api/modules

View File

@ -18,13 +18,21 @@ sys.path.insert(0, os.path.abspath('./'))
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.apidoc',
'openstackdocstheme',
]
# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_templates']
# sphinxcontrib.apidoc options
apidoc_module_dir = '../../mistralclient'
apidoc_output_dir = 'api'
apidoc_excluded_paths = [
'test',
'tests/*']
apidoc_separate_modules = True
# The suffix of source filenames.
source_suffix = '.rst'

View File

@ -22,16 +22,6 @@ home-page = https://docs.openstack.org/python-mistralclient/latest/
packages =
mistralclient
[build_sphinx]
builders = html,man
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html
[entry_points]
console_scripts =
mistral = mistralclient.shell:main
@ -123,7 +113,3 @@ cover-package = mistralclient
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
[pbr]
autodoc_index_modules = True
warnerrors = True

View File

@ -3,12 +3,10 @@
# process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
python-openstackclient>=3.12.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0
osprofiler>=1.4.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0
docutils>=0.11 # BSD

10
tox.ini
View File

@ -40,10 +40,14 @@ commands = {posargs}
[testenv:docs]
basepython = python3
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 =
rm -rf doc/html doc/build
rm -rf doc/source/apidoc doc/source/api
python setup.py build_sphinx
sphinx-build -W -b html doc/source doc/build/html
[flake8]
# H106: Dont put vim configuration in source files
@ -55,6 +59,10 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
[testenv:releasenotes]
basepython = python3
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 = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]