diff --git a/doc/source/conf.py b/doc/source/conf.py index 76f19d5f..085779f9 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -34,8 +34,7 @@ extensions = [ 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.graphviz', - # 'sphinx.ext.autodoc' causes gate failures, enable as soon as sorted out - # TODO(trebskit) + 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', # TODO(trebskit) enable as soon as we get configgen in place # 'oslo_config.sphinxconfiggen' diff --git a/doc/source/contributor/.gitignore b/doc/source/contributor/.gitignore new file mode 100644 index 00000000..d7f336d8 --- /dev/null +++ b/doc/source/contributor/.gitignore @@ -0,0 +1,3 @@ +# codebase documentation is autogenerated +# so we do not want to track it in the tree +api/ diff --git a/doc/source/contributor/code.rst b/doc/source/contributor/code.rst new file mode 100644 index 00000000..f8fa03f6 --- /dev/null +++ b/doc/source/contributor/code.rst @@ -0,0 +1,18 @@ +.. _codedocs: + +====================== +Codebase documentation +====================== + +Following section contains codebase documenation generated with, a little +bit of assistance, `sphinx.ext.autodoc`_. + +.. _`sphinx.ext.autodoc`: http://www.sphinx-doc.org/en/stable/ext/autodoc.html + +Modules +======= + +.. toctree:: + :maxdepth: 2 + + api/autoindex.rst diff --git a/doc/source/contributor/index.rst b/doc/source/contributor/index.rst index 45bbb9b0..1866fc8b 100644 --- a/doc/source/contributor/index.rst +++ b/doc/source/contributor/index.rst @@ -26,11 +26,12 @@ Developer reference :maxdepth: 1 tox + code Changelog --------- .. toctree:: - :maxdepth: 1 + :maxdepth: 1 - history + history diff --git a/setup.cfg b/setup.cfg index 8b480648..f27af57e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -72,11 +72,13 @@ tag_svn_revision = 0 [wheel] universal = 1 -# NOTE(trebskit) autodoc is failling in gate for now -# enable that as soon as bug is sorted out -# [pbr] -# autodoc_index_modules = True -# autodoc_exclude_modules = -# monasca_log_api.tests.* -# monasca_log_api_tempest.* -# api_doc_dir = contributor/api +[pbr] +autodoc_index_modules = True +autodoc_exclude_modules = + monasca_log_api.app.wsgi* + # NOTE(trebskit) we cannot document that because of side-effect + # of trying to load entire application and inability to find + # config files. + monasca_log_api.tests.* + monasca_log_api_tempest.* +api_doc_dir = contributor/api diff --git a/tox.ini b/tox.ini index c9e2502a..9efa6dcb 100644 --- a/tox.ini +++ b/tox.ini @@ -113,6 +113,7 @@ commands = description = Builds developer documentation commands = rm -rf doc/build + rm -rf doc/source/contributor/api {[testenv:checkjson]commands} python setup.py build_sphinx