Clean up API documentation
Use explicit files instead of auto-generating them. Fail the build on a warning. Tweak titles and other headings. Add instructions for using lockutils-wrapper. Change-Id: Ie92ce14b33180d35d84bbd0998e61b659487481d
This commit is contained in:
parent
5de5c42b1f
commit
d59543df4a
1
.gitignore
vendored
1
.gitignore
vendored
@ -41,7 +41,6 @@ output/*/index.html
|
||||
|
||||
# Sphinx
|
||||
doc/build
|
||||
doc/source/api
|
||||
|
||||
# pbr generates these
|
||||
AUTHORS
|
||||
|
8
doc/source/api/fixture.lockutils.rst
Normal file
8
doc/source/api/fixture.lockutils.rst
Normal file
@ -0,0 +1,8 @@
|
||||
===========================================
|
||||
:mod:`oslo_concurrency.fixture.lockutils`
|
||||
===========================================
|
||||
|
||||
.. automodule:: oslo_concurrency.fixture.lockutils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
7
doc/source/api/index.rst
Normal file
7
doc/source/api/index.rst
Normal file
@ -0,0 +1,7 @@
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
fixture.lockutils
|
||||
lockutils
|
||||
opts
|
||||
processutils
|
8
doc/source/api/lockutils.rst
Normal file
8
doc/source/api/lockutils.rst
Normal file
@ -0,0 +1,8 @@
|
||||
===================================
|
||||
:mod:`oslo_concurrency.lockutils`
|
||||
===================================
|
||||
|
||||
.. automodule:: oslo_concurrency.lockutils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
8
doc/source/api/opts.rst
Normal file
8
doc/source/api/opts.rst
Normal file
@ -0,0 +1,8 @@
|
||||
==============================
|
||||
:mod:`oslo_concurrency.opts`
|
||||
==============================
|
||||
|
||||
.. automodule:: oslo_concurrency.opts
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
8
doc/source/api/processutils.rst
Normal file
8
doc/source/api/processutils.rst
Normal file
@ -0,0 +1,8 @@
|
||||
======================================
|
||||
:mod:`oslo_concurrency.processutils`
|
||||
======================================
|
||||
|
||||
.. automodule:: oslo_concurrency.processutils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
@ -34,23 +34,7 @@ extensions = [
|
||||
|
||||
# A list of glob-style patterns that should be excluded when looking for source
|
||||
# files.
|
||||
exclude_patterns = [
|
||||
'api/tests.*', # avoid of docs generation from tests
|
||||
'api/oslo.concurrency.*', # skip deprecated import from namespace package
|
||||
'api/oslo_concurrency.openstack.common.*', # skip common modules
|
||||
'api/oslo_concurrency._*', # skip private modules
|
||||
]
|
||||
|
||||
# Prune the excluded patterns from the autoindex
|
||||
PATH = 'api/autoindex.rst'
|
||||
if os.path.isfile(PATH) and os.access(PATH, os.R_OK):
|
||||
for line in fileinput.input(PATH, inplace=True):
|
||||
found = False
|
||||
for pattern in exclude_patterns:
|
||||
if fnmatch.fnmatch(line, '*' + pattern[4:]):
|
||||
found = True
|
||||
if not found:
|
||||
print line,
|
||||
exclude_patterns = []
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
@ -3,13 +3,12 @@
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to oslo.concurrency's documentation!
|
||||
===============================================================
|
||||
|
||||
Contents:
|
||||
==================
|
||||
oslo.concurrency
|
||||
==================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:maxdepth: 1
|
||||
|
||||
readme
|
||||
installation
|
||||
@ -17,13 +16,13 @@ Contents:
|
||||
contributing
|
||||
history
|
||||
|
||||
Code Documentation
|
||||
==================
|
||||
API Documentation
|
||||
=================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
api/autoindex
|
||||
api/index
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
@ -1,7 +1,23 @@
|
||||
========
|
||||
Usage
|
||||
========
|
||||
=======
|
||||
Usage
|
||||
=======
|
||||
|
||||
To use oslo.concurrency in a project::
|
||||
To use oslo.concurrency in a project, import the relevant module. For
|
||||
example::
|
||||
|
||||
from oslo import concurrency
|
||||
from oslo_concurrency import lockutils
|
||||
|
||||
.. seealso::
|
||||
|
||||
* :doc:`API Documentation <api/index>`
|
||||
|
||||
Command Line Wrapper
|
||||
====================
|
||||
|
||||
``oslo.concurrency`` includes a command line tool for use in test jobs
|
||||
that need the environment variable :envvar:`OSLO_LOCK_PATH` set. To
|
||||
use it, prefix the command to be run with
|
||||
:command:`lockutils-wrapper`. For example::
|
||||
|
||||
$ lockutils-wrapper env | grep OSLO_LOCK_PATH
|
||||
OSLO_LOCK_PATH=/tmp/tmpbFHK45
|
||||
|
@ -58,10 +58,7 @@ mapping_file = babel.cfg
|
||||
output_file = oslo.concurrency/locale/oslo.concurrency.pot
|
||||
|
||||
[pbr]
|
||||
# NOTE(dims): uncomment ``warnerrors`` line, when
|
||||
# want to treat sphinx warnings as errors
|
||||
# warnerrors = True
|
||||
autodoc_index_modules = True
|
||||
warnerrors = True
|
||||
|
||||
[wheel]
|
||||
universal = 1
|
||||
|
Loading…
Reference in New Issue
Block a user