summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNguyen Hai <nguyentrihai93@gmail.com>2017-12-29 13:53:24 +0800
committerNguyen Hai <nguyentrihai93@gmail.com>2018-04-12 03:34:35 +0000
commita8003eced789d225a47f1cfdbd03e92fd39546f8 (patch)
tree8f21596d39e479bbad053f6dfb8c71ddc1681cdc /doc
parent314a29f6a6e64f69fd07fd5a0fdcf7aeb5574c1b (diff)
downloadpython-glanceclient-a8003eced789d225a47f1cfdbd03e92fd39546f8.tar.gz
Follow the new PTI for document build
- Follow new PTI for docs build - Add sphinxcontrib.apidoc to replace pbr autodoc REF: https://governance.openstack.org/tc/reference/project-testing-interface.html http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com> Change-Id: Id16a5eaa57bc0d96332849abfb62898e6766ef86
Diffstat (limited to 'doc')
-rw-r--r--doc/requirements.txt7
-rw-r--r--doc/source/conf.py10
-rw-r--r--doc/source/index.rst2
-rw-r--r--doc/source/reference/api/index.rst8
-rw-r--r--doc/source/reference/index.rst2
5 files changed, 18 insertions, 11 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..4faabc1
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1,7 @@
+# The order of packages is significant, because pip processes them in the order
+# of appearance. Changing the order has an impact on the overall integration
+# process, which may cause wedges in the gate later.
+openstackdocstheme>=1.18.1 # Apache-2.0
+reno>=2.5.0 # Apache-2.0
+sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+sphinxcontrib-apidoc>=0.2.0 # BSD
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 98ab8c9..7d18119 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -26,10 +26,18 @@ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
# 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',
'openstackdocstheme',
+ 'sphinxcontrib.apidoc',
]
+# sphinxcontrib.apidoc options
+apidoc_module_dir = '../../glanceclient'
+apidoc_output_dir = 'reference/api'
+apidoc_excluded_paths = [
+ 'tests/*',
+ 'tests']
+apidoc_separate_modules = True
+
# openstackdocstheme options
repository_name = 'openstack/python-glanceclient'
bug_project = 'python-glanceclient'
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 43ee57f..31b921c 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -3,7 +3,7 @@
==============================================
This is a client for the OpenStack Images API. There's :doc:`a Python
-API <reference/api/index>` (the :mod:`glanceclient` module) and a
+API <reference/api/modules>` (the :mod:`glanceclient` module) and a
:doc:`command-line script <cli/glance>` (installed as
:program:`glance`).
diff --git a/doc/source/reference/api/index.rst b/doc/source/reference/api/index.rst
deleted file mode 100644
index df916b6..0000000
--- a/doc/source/reference/api/index.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-======================
- Python API Reference
-======================
-
-.. toctree::
- :maxdepth: 2
-
- autoindex
diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst
index 33ce8b2..7710a1f 100644
--- a/doc/source/reference/index.rst
+++ b/doc/source/reference/index.rst
@@ -23,5 +23,5 @@ done so, you can use the API like so::
.. toctree::
:maxdepth: 2
- api/index
+ Python API Reference <api/modules>
apiv2