From e265141db88777eeffc92d3d2d12613876210cd9 Mon Sep 17 00:00:00 2001 From: Doug Hellmann <doug@doughellmann.com> Date: Thu, 24 Sep 2015 18:55:40 +0000 Subject: [PATCH] auto-generate API documentation Tell pbr to automatically generate the API documentation and remove the hand-curated file doing the same. Move the new API documentation section to a separate toctree to allow us to only show one level of nodes in the table of contents. Change-Id: I8edd36090688a607685d5708f99a78fd235defed --- .gitignore | 3 ++- doc/source/api.rst | 51 -------------------------------------------- doc/source/conf.py | 1 + doc/source/index.rst | 9 +++++++- setup.cfg | 1 + 5 files changed, 12 insertions(+), 53 deletions(-) delete mode 100644 doc/source/api.rst diff --git a/.gitignore b/.gitignore index 1399c98..cc4c84e 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ output/*/index.html # Sphinx doc/build +/doc/source/api/ # pbr generates these AUTHORS @@ -48,4 +49,4 @@ ChangeLog # Editors *~ -.*.swp \ No newline at end of file +.*.swp diff --git a/doc/source/api.rst b/doc/source/api.rst deleted file mode 100644 index fbd3965..0000000 --- a/doc/source/api.rst +++ /dev/null @@ -1,51 +0,0 @@ -===== - API -===== - -oslotest.base -============= - -.. automodule:: oslotest.base - -.. autoclass:: oslotest.base.BaseTestCase - :members: - -oslotest.createfile -=================== - -.. automodule:: oslotest.createfile - :members: - :special-members: - -oslotest.log -============ - -.. automodule:: oslotest.log - :members: - :special-members: - -oslotest.mockpatch -================== - -.. automodule:: oslotest.mockpatch - :members: - :special-members: - -oslotest.moxstubout -=================== - -.. automodule:: oslotest.moxstubout - :members: - -oslotest.output -=================== - -.. automodule:: oslotest.output - :members: - -oslotest.timeout -================ - -.. automodule:: oslotest.timeout - :members: - :special-members: diff --git a/doc/source/conf.py b/doc/source/conf.py index bb2e39d..090e478 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -29,6 +29,7 @@ extensions = [ # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable +modindex_common_prefix = ['oslotest.'] # The suffix of source filenames. source_suffix = '.rst' diff --git a/doc/source/index.rst b/doc/source/index.rst index e0089ee..2e91752 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -10,7 +10,6 @@ Contents :maxdepth: 2 installation - api testing features cross-testing @@ -18,6 +17,14 @@ Contents contributing history +API +=== + +.. toctree:: + :maxdepth: 1 + + api/autoindex + Indices and tables ================== diff --git a/setup.cfg b/setup.cfg index f6b63fe..85a9d48 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,6 +37,7 @@ upload-dir = doc/build/html [pbr] warnerrors = true +autodoc_index_modules = true [wheel] universal = true