Add simple Sphinx documentation
Also fix syntax in get_status call and enforce doc8. Change-Id: I9033c6264bd1ec2755e7d3efaf83e44f96c64e9c
This commit is contained in:
parent
0f24785b4c
commit
163ddec6cd
79
doc/source/conf.py
Normal file
79
doc/source/conf.py
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
|
||||||
|
# -- 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.viewcode',
|
||||||
|
'oslosphinx',
|
||||||
|
]
|
||||||
|
|
||||||
|
wsme_protocols = ['restjson']
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
# The suffix of source filenames.
|
||||||
|
source_suffix = '.rst'
|
||||||
|
|
||||||
|
# The master toctree document.
|
||||||
|
master_doc = 'index'
|
||||||
|
|
||||||
|
# General information about the project.
|
||||||
|
project = u'Ironic Inspector Client'
|
||||||
|
copyright = u'OpenStack Foundation'
|
||||||
|
|
||||||
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
|
# |version| and |release|, also used in various other places throughout the
|
||||||
|
# built documents.
|
||||||
|
#
|
||||||
|
# The short X.Y version.
|
||||||
|
from ironic_inspector_client import version as il_version
|
||||||
|
# The full version, including alpha/beta/rc tags.
|
||||||
|
release = il_version.version_info.release_string()
|
||||||
|
# The short X.Y version.
|
||||||
|
version = il_version.version_info.version_string()
|
||||||
|
|
||||||
|
# A list of ignored prefixes for module index sorting.
|
||||||
|
modindex_common_prefix = ['ironic_inspector_client']
|
||||||
|
|
||||||
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||||
|
add_function_parentheses = True
|
||||||
|
|
||||||
|
# If true, the current module name will be prepended to all description
|
||||||
|
# unit titles (such as .. function::).
|
||||||
|
add_module_names = True
|
||||||
|
|
||||||
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
|
pygments_style = 'sphinx'
|
||||||
|
|
||||||
|
# -- 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 = '_theme'
|
||||||
|
#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'
|
||||||
|
),
|
||||||
|
]
|
20
doc/source/index.rst
Normal file
20
doc/source/index.rst
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
==================================
|
||||||
|
Welcome to Ironic Inspector Client
|
||||||
|
==================================
|
||||||
|
|
||||||
|
.. include:: ../../README.rst
|
||||||
|
|
||||||
|
Generated Developer Documentation
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
api/autoindex
|
||||||
|
|
||||||
|
Indices and tables
|
||||||
|
==================
|
||||||
|
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
@ -70,6 +70,7 @@ def get_status(uuid, base_url=None, auth_token=None,
|
|||||||
This function is deprecated. Please use ClientV1.get_status.
|
This function is deprecated. Please use ClientV1.get_status.
|
||||||
|
|
||||||
New in Ironic Inspector version 1.0.0.
|
New in Ironic Inspector version 1.0.0.
|
||||||
|
|
||||||
:param uuid: node uuid.
|
:param uuid: node uuid.
|
||||||
:param base_url: *Ironic Inspector* URL in form: http://host:port[/ver],
|
:param base_url: *Ironic Inspector* URL in form: http://host:port[/ver],
|
||||||
defaults to ``http://<current host>:5050/v1``.
|
defaults to ``http://<current host>:5050/v1``.
|
||||||
|
12
setup.cfg
12
setup.cfg
@ -34,3 +34,15 @@ openstack.baremetal_introspection.v1 =
|
|||||||
baremetal_introspection_rule_show = ironic_inspector_client.shell:RuleShowCommand
|
baremetal_introspection_rule_show = ironic_inspector_client.shell:RuleShowCommand
|
||||||
baremetal_introspection_rule_delete = ironic_inspector_client.shell:RuleDeleteCommand
|
baremetal_introspection_rule_delete = ironic_inspector_client.shell:RuleDeleteCommand
|
||||||
baremetal_introspection_rule_purge = ironic_inspector_client.shell:RulePurgeCommand
|
baremetal_introspection_rule_purge = ironic_inspector_client.shell:RulePurgeCommand
|
||||||
|
|
||||||
|
[pbr]
|
||||||
|
autodoc_index_modules = True
|
||||||
|
autodoc_exclude_modules =
|
||||||
|
ironic_inspector_client.test.*
|
||||||
|
ironic_inspector_client.common.i18n
|
||||||
|
warnerrors = True
|
||||||
|
|
||||||
|
[build_sphinx]
|
||||||
|
all_files = 1
|
||||||
|
build-dir = doc/build
|
||||||
|
source-dir = doc/source
|
||||||
|
9
tox.ini
9
tox.ini
@ -17,7 +17,7 @@ setenv = PYTHONDONTWRITEBYTECODE=1
|
|||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
commands =
|
commands =
|
||||||
flake8 ironic_inspector_client
|
flake8 ironic_inspector_client
|
||||||
doc8 README.rst
|
doc8 README.rst doc/source
|
||||||
|
|
||||||
[testenv:func]
|
[testenv:func]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
@ -34,6 +34,13 @@ commands = {posargs}
|
|||||||
envdir = {toxworkdir}/venv
|
envdir = {toxworkdir}/venv
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
|
[testenv:docs]
|
||||||
|
setenv = PYTHONHASHSEED=0
|
||||||
|
sitepackages = False
|
||||||
|
envdir = {toxworkdir}/venv
|
||||||
|
commands =
|
||||||
|
python setup.py build_sphinx
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-complexity=15
|
max-complexity=15
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user