summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-06-16 10:41:49 +0000
committerGerrit Code Review <review@openstack.org>2020-06-16 10:41:49 +0000
commit1609551a907a7cffee2a80b5a94847f34fbf74bd (patch)
tree47b808886a2dfaa091d84fb44aa7cc3bcd7cd62d
parent751dac7b9065ded97dc28bc443e9428f09a88f09 (diff)
parentcf870ae5108d7e0f03bcb2d4c41515b919bc51a6 (diff)
downloadironic-python-agent-1609551a907a7cffee2a80b5a94847f34fbf74bd.tar.gz
Merge "Fix apidoc build"
-rw-r--r--doc/requirements.txt5
-rw-r--r--doc/source/conf.py9
-rw-r--r--doc/source/contributor/index.rst2
-rw-r--r--test-requirements.txt5
-rw-r--r--tox.ini4
5 files changed, 20 insertions, 5 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 00000000..64d6a305
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1,5 @@
+doc8>=0.6.0 # Apache-2.0
+sphinx>=2.0.0,!=2.1.0 # BSD
+openstackdocstheme>=2.2.1 # Apache-2.0
+reno>=3.1.0 # Apache-2.0
+sphinxcontrib-apidoc>=0.2.0 # BSD
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 15feefce..f64921bb 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -4,6 +4,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode',
+ 'sphinxcontrib.apidoc',
'openstackdocstheme',
]
@@ -36,6 +37,14 @@ add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'native'
+# sphinxcontrib.apidoc options
+apidoc_module_dir = '../../ironic_python_agent'
+apidoc_output_dir = 'contributor/api'
+apidoc_excluded_paths = [
+ 'tests',
+]
+apidoc_separate_modules = True
+
# -- Options for HTML output --------------------------------------------------
diff --git a/doc/source/contributor/index.rst b/doc/source/contributor/index.rst
index 4f421637..bba5cbb3 100644
--- a/doc/source/contributor/index.rst
+++ b/doc/source/contributor/index.rst
@@ -29,7 +29,7 @@ Generated Developer Documentation
.. toctree::
:hidden:
- api/autoindex
+ api/modules
Indices and tables
==================
diff --git a/test-requirements.txt b/test-requirements.txt
index a9d9d7a1..930dd4e6 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -10,8 +10,5 @@ bashate>=0.5.1 # Apache-2.0
flake8-import-order>=0.17.1 # LGPLv3
bandit!=1.6.0,>=1.1.0,<2.0.0 # Apache-2.0
-# Doc requirements
+# Doc test requirements
doc8>=0.6.0 # Apache-2.0
-sphinx>=2.0.0,!=2.1.0 # BSD
-openstackdocstheme>=2.2.1 # Apache-2.0
-reno>=3.1.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index de874a72..ea953482 100644
--- a/tox.ini
+++ b/tox.ini
@@ -62,6 +62,8 @@ commands = oslo_debug_helper -t ironic_python_agent/tests/unit {posargs}
[testenv:docs]
setenv = PYTHONHASHSEED=0
sitepackages = False
+deps =
+ -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -b html doc/source doc/build/html
@@ -69,6 +71,8 @@ commands =
whitelist_externals = make
setenv = PYTHONHASHSEED=0
sitepackages = False
+deps =
+ -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf