Merge "Add docs target and generate api docs"
This commit is contained in:
commit
7cb65fa7f9
@ -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'
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user