diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-09-06 09:05:25 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-09-06 09:05:25 +0000 |
commit | 7cb65fa7f9efebdb31219e5456250aefeea305a5 (patch) | |
tree | d89e0b7764259f23241ebac9aff398a96546707d | |
parent | cc13b5581042314fac84da55bb2fb44a134eaca9 (diff) | |
parent | ffd9a6de0cc946f946833a9a6ebde816dc30bcb3 (diff) | |
download | oslo-vmware-7cb65fa7f9efebdb31219e5456250aefeea305a5.tar.gz |
Merge "Add docs target and generate api docs"
-rw-r--r-- | doc/source/conf.py | 19 | ||||
-rw-r--r-- | doc/source/index.rst | 8 | ||||
-rw-r--r-- | setup.cfg | 3 | ||||
-rw-r--r-- | test-requirements.txt | 2 | ||||
-rw-r--r-- | tox.ini | 3 |
5 files changed, 34 insertions, 1 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 1567379..4342b35 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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' diff --git a/doc/source/index.rst b/doc/source/index.rst index acb1078..a120c1a 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -11,6 +11,14 @@ Contents: usage contributing +Code Documentation +================== + +.. toctree:: + :maxdepth: 1 + + api/autoindex + Indices and tables ================== @@ -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 diff --git a/test-requirements.txt b/test-requirements.txt index a43b746..f5bc50e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 @@ -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 = |