summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-12-16 22:03:41 +0000
committerGerrit Code Review <review@openstack.org>2014-12-16 22:03:42 +0000
commitf7ebc8260d235d474a3dc3135608fec216a4b04c (patch)
treea01df524b885c6e54975ea05de86c3c10cca3f20
parent9dd6d212f0d8fd74c29077a786fb6d770a2a0bba (diff)
parentd59543df4aef097b852a1c197a719904addbe552 (diff)
downloadoslo-concurrency-f7ebc8260d235d474a3dc3135608fec216a4b04c.tar.gz
Merge "Clean up API documentation"
-rw-r--r--.gitignore1
-rw-r--r--doc/source/api/fixture.lockutils.rst8
-rw-r--r--doc/source/api/index.rst7
-rw-r--r--doc/source/api/lockutils.rst8
-rw-r--r--doc/source/api/opts.rst8
-rw-r--r--doc/source/api/processutils.rst8
-rwxr-xr-xdoc/source/conf.py18
-rw-r--r--doc/source/index.rst15
-rw-r--r--doc/source/usage.rst26
-rw-r--r--setup.cfg5
10 files changed, 69 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
index 7a8e0ab..1399c98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,7 +41,6 @@ output/*/index.html
# Sphinx
doc/build
-doc/source/api
# pbr generates these
AUTHORS
diff --git a/doc/source/api/fixture.lockutils.rst b/doc/source/api/fixture.lockutils.rst
new file mode 100644
index 0000000..8f82f40
--- /dev/null
+++ b/doc/source/api/fixture.lockutils.rst
@@ -0,0 +1,8 @@
+===========================================
+ :mod:`oslo_concurrency.fixture.lockutils`
+===========================================
+
+.. automodule:: oslo_concurrency.fixture.lockutils
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/source/api/index.rst b/doc/source/api/index.rst
new file mode 100644
index 0000000..33aadc4
--- /dev/null
+++ b/doc/source/api/index.rst
@@ -0,0 +1,7 @@
+.. toctree::
+ :maxdepth: 1
+
+ fixture.lockutils
+ lockutils
+ opts
+ processutils
diff --git a/doc/source/api/lockutils.rst b/doc/source/api/lockutils.rst
new file mode 100644
index 0000000..76a37fa
--- /dev/null
+++ b/doc/source/api/lockutils.rst
@@ -0,0 +1,8 @@
+===================================
+ :mod:`oslo_concurrency.lockutils`
+===================================
+
+.. automodule:: oslo_concurrency.lockutils
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/source/api/opts.rst b/doc/source/api/opts.rst
new file mode 100644
index 0000000..8972b27
--- /dev/null
+++ b/doc/source/api/opts.rst
@@ -0,0 +1,8 @@
+==============================
+ :mod:`oslo_concurrency.opts`
+==============================
+
+.. automodule:: oslo_concurrency.opts
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/source/api/processutils.rst b/doc/source/api/processutils.rst
new file mode 100644
index 0000000..787095c
--- /dev/null
+++ b/doc/source/api/processutils.rst
@@ -0,0 +1,8 @@
+======================================
+ :mod:`oslo_concurrency.processutils`
+======================================
+
+.. automodule:: oslo_concurrency.processutils
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 2d42847..edd0343 100755
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -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'
diff --git a/doc/source/index.rst b/doc/source/index.rst
index b2ef8cf..8d1757f 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.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
==================
diff --git a/doc/source/usage.rst b/doc/source/usage.rst
index 5be4f08..f438151 100644
--- a/doc/source/usage.rst
+++ b/doc/source/usage.rst
@@ -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 \ No newline at end of file
+ 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
diff --git a/setup.cfg b/setup.cfg
index 9f99301..2dbe018 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -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