Merge "Add code/api documentation"
This commit is contained in:
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import fileinput
|
||||||
|
import fnmatch
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('../..'))
|
sys.path.insert(0, os.path.abspath('../..'))
|
||||||
# -- General configuration ----------------------------------------------------
|
# -- General configuration ----------------------------------------------------
|
||||||
@@ -30,6 +32,23 @@ extensions = [
|
|||||||
# text edit cycles.
|
# text edit cycles.
|
||||||
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
# 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.concurrency.openstack.common.*', # skip common modules
|
||||||
|
'api/oslo.concurrency._*', # 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.
|
# The suffix of source filenames.
|
||||||
source_suffix = '.rst'
|
source_suffix = '.rst'
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,14 @@ Contents:
|
|||||||
usage
|
usage
|
||||||
contributing
|
contributing
|
||||||
|
|
||||||
|
Code Documentation
|
||||||
|
==================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
api/autoindex
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|||||||
@@ -47,3 +47,9 @@ input_file = oslo.concurrency/locale/oslo.concurrency.pot
|
|||||||
keywords = _ gettext ngettext l_ lazy_gettext
|
keywords = _ gettext ngettext l_ lazy_gettext
|
||||||
mapping_file = babel.cfg
|
mapping_file = babel.cfg
|
||||||
output_file = oslo.concurrency/locale/oslo.concurrency.pot
|
output_file = oslo.concurrency/locale/oslo.concurrency.pot
|
||||||
|
|
||||||
|
[pbr]
|
||||||
|
# NOTE(dims): uncomment ``warnerrors`` line, when
|
||||||
|
# want to treat sphinx warnings as errors
|
||||||
|
# warnerrors = True
|
||||||
|
autodoc_index_modules = True
|
||||||
|
|||||||
Reference in New Issue
Block a user