From 6569f726a339af6ff671a320d0ae0917aea5f08c Mon Sep 17 00:00:00 2001 From: Brant Knudson Date: Wed, 8 Jul 2015 19:06:09 -0500 Subject: [PATCH] Fixes up the API docs and module index - Automatically generate the API docs - Makes the index on the modules index page useful Change-Id: I4eafe2c64a0733f6fb81b20e85cd943355860f9a --- .gitignore | 1 + doc/source/api.rst | 21 --------------------- doc/source/conf.py | 3 +++ doc/source/index.rst | 2 +- setup.cfg | 1 + 5 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 doc/source/api.rst diff --git a/.gitignore b/.gitignore index dfe851d0..3a860ee4 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ output/*/index.html # Sphinx doc/build +doc/source/api # pbr generates these AUTHORS diff --git a/doc/source/api.rst b/doc/source/api.rst deleted file mode 100644 index 0e003fda..00000000 --- a/doc/source/api.rst +++ /dev/null @@ -1,21 +0,0 @@ -===== - API -===== - -.. automodule:: oslo_cache.core - :members: - -.. automodule:: oslo_cache.exception - :members: - -.. automodule:: oslo_cache.backends.dictionary - :members: - -.. automodule:: oslo_cache.backends.memcache_pool - :members: - -.. automodule:: oslo_cache.backends.mongo - :members: - -.. automodule:: oslo_cache.backends.noop - :members: diff --git a/doc/source/conf.py b/doc/source/conf.py index 6aca6c7f..d055d1e1 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -50,6 +50,9 @@ add_module_names = True # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' +# A list of ignored prefixes for module index sorting. +modindex_common_prefix = ['oslo_cache.'] + # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with diff --git a/doc/source/index.rst b/doc/source/index.rst index b85543d8..41e7b908 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -11,7 +11,7 @@ Contents :maxdepth: 2 installation - api + api/modules usage contributing history diff --git a/setup.cfg b/setup.cfg index 0cca34ad..96218625 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,6 +30,7 @@ oslo.config.opts = [pbr] warnerrors = true +autodoc_tree_index_modules = True [build_sphinx] source-dir = doc/source