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

For more detials information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I4b1b023ff2c40f5b31429584fc1a77c0315ed2d9
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
ZhongShengping 2018-03-02 09:00:54 +08:00 committed by Stephen Finucane
parent f8882547a6
commit 7274bc23f1
6 changed files with 37 additions and 51 deletions

1
.gitignore vendored
View File

@ -48,6 +48,7 @@ output/*/index.html
# Sphinx # Sphinx
doc/build doc/build
doc/source/reference/api
# pbr generates these # pbr generates these
AUTHORS AUTHORS

9
doc/requirements.txt Normal file
View File

@ -0,0 +1,9 @@
# 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.
# 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
fixtures>=3.0.0 # Apache-2.0/BSD
sphinxcontrib-apidoc>=0.2.0 # BSD

View File

@ -12,17 +12,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ---------------------------------------------------- # -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.autodoc',
'sphinxcontrib.apidoc',
'openstackdocstheme', 'openstackdocstheme',
'oslo_config.sphinxext', 'oslo_config.sphinxext',
] ]
@ -31,18 +27,6 @@ extensions = [
repository_name = 'openstack/oslo.concurrency' repository_name = 'openstack/oslo.concurrency'
bug_project = 'oslo.concurrency' bug_project = 'oslo.concurrency'
bug_tag = '' bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# 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
# A list of glob-style patterns that should be excluded when looking for source
# files.
exclude_patterns = []
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document. # The master toctree document.
master_doc = 'index' master_doc = 'index'
@ -61,26 +45,18 @@ add_module_names = True
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx' pygments_style = 'sphinx'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with # -- Options for HTML output -------------------------------------------------
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
html_theme = 'openstackdocs' html_theme = 'openstackdocs'
# html_static_path = ['static']
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
# Grouping the document tree into LaTeX files. List of tuples # -- sphinxcontrib.apidoc configuration --------------------------------------
# (source start file, target name, title, author, documentclass
# [howto/manual]). apidoc_module_dir = '../../'
latex_documents = [ apidoc_output_dir = 'reference/api'
('index', apidoc_excluded_paths = [
'%s.tex' % project, 'oslo_concurrency/tests',
u'%s Documentation' % project, 'oslo_concurrency/_*',
u'OpenStack Foundation', 'manual'), 'setup.py',
] ]
# Example configuration for intersphinx: refer to the Python standard library.
# intersphinx_mapping = {'http://docs.python.org/': None}

View File

@ -10,3 +10,4 @@
opts opts
processutils processutils
watchdog watchdog
api/modules

View File

@ -9,11 +9,6 @@ futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0
# These are needed for docs generation
openstackdocstheme>=1.18.1 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
reno>=2.5.0 # Apache-2.0
eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT
# Bandit security code scanner # Bandit security code scanner

View File

@ -32,6 +32,9 @@ commands = {posargs}
[testenv:docs] [testenv:docs]
basepython = python3 basepython = python3
whitelist_externals = rm whitelist_externals = rm
deps =
{[testenv]deps}
-r{toxinidir}/doc/requirements.txt
commands = commands =
rm -fr doc/build rm -fr doc/build
sphinx-build -W -b html doc/source doc/build/html {posargs} sphinx-build -W -b html doc/source doc/build/html {posargs}
@ -57,6 +60,7 @@ import_exceptions =
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3 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 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints] [testenv:lower-constraints]