Fix apidoc build

Change-Id: Id7c5686cdbdc79812e06eb4a5f87eddc75005cc3
This commit is contained in:
Julia Kreger 2020-06-09 15:08:10 -07:00
parent 504c52389b
commit cf870ae510
5 changed files with 20 additions and 5 deletions

5
doc/requirements.txt Normal file
View File

@ -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

View File

@ -4,6 +4,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', extensions = ['sphinx.ext.autodoc',
'sphinx.ext.viewcode', 'sphinx.ext.viewcode',
'sphinxcontrib.apidoc',
'openstackdocstheme', 'openstackdocstheme',
] ]
@ -36,6 +37,14 @@ add_module_names = True
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'native' 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 -------------------------------------------------- # -- Options for HTML output --------------------------------------------------

View File

@ -29,7 +29,7 @@ Generated Developer Documentation
.. toctree:: .. toctree::
:hidden: :hidden:
api/autoindex api/modules
Indices and tables Indices and tables
================== ==================

View File

@ -10,8 +10,5 @@ bashate>=0.5.1 # Apache-2.0
flake8-import-order>=0.17.1 # LGPLv3 flake8-import-order>=0.17.1 # LGPLv3
bandit!=1.6.0,>=1.1.0,<2.0.0 # Apache-2.0 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 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

View File

@ -62,6 +62,8 @@ commands = oslo_debug_helper -t ironic_python_agent/tests/unit {posargs}
[testenv:docs] [testenv:docs]
setenv = PYTHONHASHSEED=0 setenv = PYTHONHASHSEED=0
sitepackages = False sitepackages = False
deps =
-r{toxinidir}/doc/requirements.txt
commands = commands =
sphinx-build -b html doc/source doc/build/html sphinx-build -b html doc/source doc/build/html
@ -69,6 +71,8 @@ commands =
whitelist_externals = make whitelist_externals = make
setenv = PYTHONHASHSEED=0 setenv = PYTHONHASHSEED=0
sitepackages = False sitepackages = False
deps =
-r{toxinidir}/doc/requirements.txt
commands = commands =
sphinx-build -b latex doc/source doc/build/pdf sphinx-build -b latex doc/source doc/build/pdf
make -C doc/build/pdf make -C doc/build/pdf