Merge "Add code/api documentation"
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import fileinput
|
||||
import fnmatch
|
||||
|
||||
sys.path.insert(0, os.path.abspath('../..'))
|
||||
# -- General configuration ----------------------------------------------------
|
||||
@@ -30,6 +32,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.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.
|
||||
source_suffix = '.rst'
|
||||
|
||||
|
||||
@@ -16,6 +16,14 @@ Contents:
|
||||
usage
|
||||
contributing
|
||||
|
||||
Code Documentation
|
||||
==================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
api/autoindex
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
|
||||
@@ -46,4 +46,10 @@ input_file = oslo.concurrency/locale/oslo.concurrency.pot
|
||||
[extract_messages]
|
||||
keywords = _ gettext ngettext l_ lazy_gettext
|
||||
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