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: I06d510a44b9e8c0024f5e41f10f4446e18bf86cc
This commit is contained in:
Nguyen Hai 2018-07-07 11:07:38 +09:00
parent 0c3a15618b
commit b65459e69d
6 changed files with 21 additions and 23 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
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinxcontrib-apidoc>=0.2.0 # BSD

View File

@ -23,7 +23,8 @@ 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', 'openstackdocstheme']
extensions = ['openstackdocstheme',
'sphinxcontrib.apidoc']
# openstackdocstheme options
repository_name = 'openstack/glance_store'
@ -31,6 +32,14 @@ bug_project = 'glance-store'
bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# sphinxcontrib.apidoc options
apidoc_module_dir = '../../glance_store'
apidoc_output_dir = 'reference/api'
apidoc_excluded_paths = [
'test',
'tests/*']
apidoc_separate_modules = True
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable

View File

@ -5,4 +5,4 @@
.. toctree::
:maxdepth: 1
api/autoindex
api/modules

View File

@ -64,21 +64,6 @@ cinder =
oslo.rootwrap>=5.8.0 # Apache-2.0
oslo.privsep>=1.23.0 # Apache-2.0
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[pbr]
autodoc_index_modules = True
api_doc_dir = reference/api
autodoc_exclude_modules =
glance_store.tests.*
[upload_sphinx]
upload-dir = doc/build/html
[compile_catalog]
directory = glance_store/locale
domain = glance_store

View File

@ -19,11 +19,6 @@ oslotest>=3.2.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
bandit>=1.1.0 # Apache-2.0
# this is required for the docs build jobs
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
# Dependencies for each of the optional stores
oslo.vmware>=2.17.0 # Apache-2.0
httplib2>=0.9.1 # MIT

View File

@ -15,10 +15,12 @@ commands = ostestr --slowest {posargs}
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/.doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]