From 96e97013f1677b10ee44520685c838c1a71ef783 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Mon, 2 Apr 2018 15:04:10 -0400 Subject: [PATCH] Replace pbr autodoc with sphinxcontrib-apidoc This fixes local building of the documentation using tox, and allows the gate to stop relying on pbr and move completely to the new docs PTI. http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html Change-Id: I6ef3e102f5a169262efbbaeec61452f0a2443fb4 Depends-On: https://review.openstack.org/560577 --- doc/requirements.txt | 1 + doc/source/api/index.rst | 4 ++-- doc/source/conf.py | 19 +++++++++++++++++++ setup.cfg | 19 +------------------ 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 09ea11b196..7488c4b07b 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -6,4 +6,5 @@ openstackdocstheme>=1.18.1 # Apache-2.0 os-api-ref>=1.4.0 # Apache-2.0 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD reno>=2.5.0 # Apache-2.0 +sphinxcontrib-apidoc>=0.2.0 # BSD sphinxcontrib-httpdomain>=1.3.0 # BSD diff --git a/doc/source/api/index.rst b/doc/source/api/index.rst index 0e6b2a803f..5ccf751ade 100644 --- a/doc/source/api/index.rst +++ b/doc/source/api/index.rst @@ -3,6 +3,6 @@ =================== .. toctree:: - :maxdepth: 1 + :maxdepth: 6 - autoindex + modules diff --git a/doc/source/conf.py b/doc/source/conf.py index 80de1aaab9..e917a58505 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -77,6 +77,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.doctest', + 'sphinxcontrib.apidoc', 'openstackdocstheme', 'oslo_config.sphinxconfiggen', 'oslo_policy.sphinxext', @@ -155,6 +156,24 @@ primary_domain = 'py' nitpicky = False +# -- Options for API documentation ------------------------------------------- + +apidoc_module_dir = '../../heat' +apidoc_separate_modules = True +apidoc_excluded_paths = [ + 'testing', + 'cmd', + 'common', + 'cloudinit', + 'cfn_client', + 'doc', + 'db', + 'engine/resources', + 'locale', + 'tests', +] + + # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/setup.cfg b/setup.cfg index be6863e98e..1bac9523f1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -200,27 +200,10 @@ domain = heat output_dir = heat/locale input_file = heat/locale/heat.pot -[pbr] -autodoc_index_modules = true -autodoc_exclude_modules = - heat.testing.* - heat.cmd.* - heat.common.* - heat.cloudinit.* - heat.cfn_client.* - heat.doc.* - heat.db.* - heat.engine.resources.* - heat.locale.* - *.tests.* - *.resources.* - [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = heat/locale/heat.pot [build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source +warning-is-error = False