Merge "Add docs target and generate api docs"

This commit is contained in:
Jenkins 2014-09-06 09:05:25 +00:00 committed by Gerrit Code Review
commit 7cb65fa7f9
5 changed files with 34 additions and 1 deletions

View File

@ -13,6 +13,8 @@
import os
import sys
import fileinput
import fnmatch
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------
@ -29,6 +31,23 @@ extensions = [
# 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 = [
'api/tests.*', # avoid of docs generation from tests
'api/oslo.vmware.openstack.common.*', # skip common modules
'api/oslo.vmware._*', # skip private modules
]
# Prune the excluded patterns from the autoindex
for line in fileinput.input('api/autoindex.rst', inplace=True):
found = False
for pattern in exclude_patterns:
if fnmatch.fnmatch(line, '*' + pattern[4:]):
found = True
if not found:
print line,
# The suffix of source filenames.
source_suffix = '.rst'

View File

@ -11,6 +11,14 @@ Contents:
usage
contributing
Code Documentation
==================
.. toctree::
:maxdepth: 1
api/autoindex
Indices and tables
==================

View File

@ -46,3 +46,6 @@ input_file = oslo.vmware/locale/oslo.vmware.pot
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = oslo.vmware/locale/oslo.vmware.pot
[pbr]
autodoc_index_modules = 1

View File

@ -21,5 +21,5 @@ testtools>=0.9.34
coverage>=3.6
# this is required for the docs build jobs
sphinx>=1.1.2,!=1.2.0,<1.3
oslosphinx>=2.2.0.0a2
sphinx>=1.1.2,!=1.2.0,<1.3

View File

@ -15,6 +15,9 @@ commands = flake8
[testenv:pylint]
commands = pylint oslo
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =