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

Change-Id: Ie46ce87264a60072769649b8ffdc027261370ac8
This commit is contained in:
malei 2018-03-21 03:12:02 +08:00 committed by melissaml
parent e0360c3a1f
commit e0a703f038
5 changed files with 12 additions and 20 deletions

3
doc/requirements.txt Normal file
View File

@ -0,0 +1,3 @@
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
sphinxcontrib-apidoc>=0.2.0 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0

View File

@ -21,9 +21,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',
#'sphinx.ext.intersphinx',
'openstackdocstheme'
'openstackdocstheme',
'sphinxcontrib.apidoc'
]
# openstackdocstheme options
@ -31,6 +30,11 @@ repository_name = 'openstack/python-congressclient'
bug_project = 'python-congressclient'
bug_tag = ''
# sphinxcontrib.apidoc options
apidoc_module_dir = '../../congressclient'
apidoc_output_dir = 'reference/api'
apidoc_separate_modules = True
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'

View File

@ -57,20 +57,6 @@ openstack.congressclient.v1 =
congress_driver_list = congressclient.osc.v1.driver:ListDrivers
congress_version_list = congressclient.osc.v1.api_versions:ListAPIVersions
[pbr]
autodoc_index_modules = True
api_doc_dir = reference/api
warnerrors = True
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html
[compile_catalog]
directory = congressclient/locale
domain = python-congressclient

View File

@ -5,8 +5,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
mock>=2.0.0 # BSD

View File

@ -25,7 +25,8 @@ commands = {posargs}
commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[hacking]
import_exceptions = congressclient.i18n