diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2019-04-02 14:39:50 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2019-05-21 08:50:29 +0000 |
commit | 05ddd9fc9e814b8a949ee65b512b35f2432ccec6 (patch) | |
tree | b8d28976047d2ca4c6aa988f1e287244d96e962d /doc | |
parent | b9c51e295b81cedbc747e662628bc69d1f60e6db (diff) | |
download | oslo-db-05ddd9fc9e814b8a949ee65b512b35f2432ccec6.tar.gz |
docs: Use sphinxcontrib.apidoc for building API docs5.0.0
Gets us away from the old pbr functionality.
Some cleanup of tox.ini is included along the way.
Change-Id: Ia228f8ee49f31f88fa2a66f2aad3a3921c41a785
Diffstat (limited to 'doc')
-rw-r--r-- | doc/requirements.txt | 7 | ||||
-rwxr-xr-x | doc/source/conf.py | 47 | ||||
-rw-r--r-- | doc/source/reference/index.rst | 2 |
3 files changed, 11 insertions, 45 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt index 3cf8db9..024debe 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -6,9 +6,4 @@ sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD doc8>=0.6.0 # Apache-2.0 reno>=2.5.0 # Apache-2.0 - -# These modules are needed when generating document -fixtures>=3.0.0 # Apache-2.0/BSD -testresources>=2.0.0 # Apache-2.0/BSD -testscenarios>=0.4 # Apache-2.0/BSD -oslotest>=3.2.0 # Apache-2.0 +sphinxcontrib-apidoc>=0.2.0 # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 576e270..afa698b 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -11,17 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os -import sys - -sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ---------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', - #'sphinx.ext.intersphinx', + 'sphinxcontrib.apidoc', 'oslo_config.sphinxext', 'openstackdocstheme', 'stevedore.sphinxext' @@ -31,23 +27,6 @@ repository_name = 'openstack/oslo.db' bug_project = 'oslo.db' bug_tag = '' -# Must set this variable to include year, month, day, hours, and minutes. -html_last_updated_fmt = '%Y-%m-%d %H:%M' - -# 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 - -# A list of glob-style patterns that should be excluded when looking for source -# files. -exclude_patterns = [ - 'api/setup.rst', # workaround for https://launchpad.net/bugs/1260495 - 'api/tests.*', # avoid of docs generation from tests -] - -# The suffix of source filenames. -source_suffix = '.rst' - # The master toctree document. master_doc = 'index' @@ -68,26 +47,18 @@ pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. modindex_common_prefix = ['oslo_db.'] -# -- Options for HTML output -------------------------------------------------- + +# -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -# html_theme_path = ["."] html_theme = 'openstackdocs' -# html_static_path = ['static'] -# Output file base name for HTML help builder. -htmlhelp_basename = '%sdoc' % project -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass -# [howto/manual]). -latex_documents = [ - ('index', - '%s.tex' % project, - u'%s Documentation' % project, - u'OpenStack Foundation', 'manual'), -] +# -- sphinxcontrib.apidoc configuration -------------------------------------- -# Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} +apidoc_module_dir = '../../oslo_db' +apidoc_output_dir = 'reference/api' +apidoc_excluded_paths = [ + 'tests', +] diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst index 9eb4867..6205029 100644 --- a/doc/source/reference/index.rst +++ b/doc/source/reference/index.rst @@ -15,4 +15,4 @@ API .. toctree:: :maxdepth: 1 - api/autoindex + api/modules |