From 6f039df741d5ee92f301bd24c97da23bd6c7f6b6 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Fri, 5 Jun 2015 14:44:59 +0100 Subject: [PATCH] Include auto-generated API documentation in Sphinx documentation. Change-Id: Ic2f0e4bcb315cc3f94e5077dc209431ee3e80d77 --- .gitignore | 2 ++ doc/source/api.rst | 7 +++++++ doc/source/api/README | 1 + doc/source/conf.py | 1 + doc/source/contents.rst | 6 ++++++ setup.cfg | 3 +++ 6 files changed, 20 insertions(+) create mode 100644 doc/source/api.rst create mode 100644 doc/source/api/README diff --git a/.gitignore b/.gitignore index f0402495..4875278b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .tox/ cloudinit.egg-info/ *.pyc +doc/build +doc/source/api/ diff --git a/doc/source/api.rst b/doc/source/api.rst new file mode 100644 index 00000000..85ff488c --- /dev/null +++ b/doc/source/api.rst @@ -0,0 +1,7 @@ +cloud-init Python API Documentation +=================================== + +.. toctree:: + :maxdepth: 2 + + api/autoindex diff --git a/doc/source/api/README b/doc/source/api/README new file mode 100644 index 00000000..3bb628f5 --- /dev/null +++ b/doc/source/api/README @@ -0,0 +1 @@ +Don't put files in here, it's intended only for auto-generated output! diff --git a/doc/source/conf.py b/doc/source/conf.py index 20b32a23..7d2cc54d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -2,3 +2,4 @@ # This file is part of cloud-init. See LICENCE file for license information. # # vi: ts=4 expandtab +extensions = ['sphinx.ext.autodoc'] diff --git a/doc/source/contents.rst b/doc/source/contents.rst index 4df572f9..08bd5cb2 100644 --- a/doc/source/contents.rst +++ b/doc/source/contents.rst @@ -12,4 +12,10 @@ Summary `Cloud-init`_ is the *defacto* multi-distribution package that handles early initialization of a cloud instance. +.. toctree:: + :maxdepth: 2 + + api + + .. _Cloud-init: https://launchpad.net/cloud-init diff --git a/setup.cfg b/setup.cfg index d1c66fc3..addb626d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,3 +34,6 @@ console_scripts = [build_sphinx] source-dir = doc/source build-dir = doc/build + +[pbr] +autodoc_index_modules = 1