summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyen Hai <nguyentrihai93@gmail.com>2018-07-07 11:07:38 +0900
committerNguyen Hai <nguyentrihai93@gmail.com>2018-07-16 01:26:52 +0000
commitb65459e69defe5fb6b0388df0a74a90249ca053e (patch)
tree694a744c2af057b2185e53f902480506234be458
parent0c3a15618b9e629dbdecb51cfde686637d08fd55 (diff)
downloadglance_store-b65459e69defe5fb6b0388df0a74a90249ca053e.tar.gz
Follow the new PTI for document build
For compliance with the Project Testing Interface as described in: [1] https://governance.openstack.org/tc/reference/project-testing-interface.html [2] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html [3] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html Change-Id: I06d510a44b9e8c0024f5e41f10f4446e18bf86cc
-rw-r--r--doc/requirements.txt7
-rw-r--r--doc/source/conf.py11
-rw-r--r--doc/source/reference/index.rst2
-rw-r--r--setup.cfg15
-rw-r--r--test-requirements.txt5
-rw-r--r--tox.ini4
6 files changed, 21 insertions, 23 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..67530ff
--- /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.
+sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+openstackdocstheme>=1.18.1 # Apache-2.0
+reno>=2.5.0 # Apache-2.0
+sphinxcontrib-apidoc>=0.2.0 # BSD
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 64ff8e6..3ff6345 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -23,7 +23,8 @@ sys.path.insert(0, os.path.abspath('../..'))
# 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']
+extensions = ['openstackdocstheme',
+ 'sphinxcontrib.apidoc']
# openstackdocstheme options
repository_name = 'openstack/glance_store'
@@ -31,6 +32,14 @@ bug_project = 'glance-store'
bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
+# sphinxcontrib.apidoc options
+apidoc_module_dir = '../../glance_store'
+apidoc_output_dir = 'reference/api'
+apidoc_excluded_paths = [
+ 'test',
+ 'tests/*']
+apidoc_separate_modules = True
+
# 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
diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst
index c654ff7..ca24b39 100644
--- a/doc/source/reference/index.rst
+++ b/doc/source/reference/index.rst
@@ -5,4 +5,4 @@
.. toctree::
:maxdepth: 1
- api/autoindex
+ api/modules
diff --git a/setup.cfg b/setup.cfg
index bc800dc..226d5e7 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -64,21 +64,6 @@ cinder =
oslo.rootwrap>=5.8.0 # Apache-2.0
oslo.privsep>=1.23.0 # Apache-2.0
-[build_sphinx]
-source-dir = doc/source
-build-dir = doc/build
-all_files = 1
-warning-is-error = 1
-
-[pbr]
-autodoc_index_modules = True
-api_doc_dir = reference/api
-autodoc_exclude_modules =
- glance_store.tests.*
-
-[upload_sphinx]
-upload-dir = doc/build/html
-
[compile_catalog]
directory = glance_store/locale
domain = glance_store
diff --git a/test-requirements.txt b/test-requirements.txt
index f91942e..0b0d6f8 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -19,11 +19,6 @@ oslotest>=3.2.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
bandit>=1.1.0 # Apache-2.0
-# this is required for the docs build jobs
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
-openstackdocstheme>=1.18.1 # Apache-2.0
-reno>=2.5.0 # Apache-2.0
-
# Dependencies for each of the optional stores
oslo.vmware>=2.17.0 # Apache-2.0
httplib2>=0.9.1 # MIT
diff --git a/tox.ini b/tox.ini
index 733351c..e146b6e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,10 +15,12 @@ commands = ostestr --slowest {posargs}
[testenv:docs]
basepython = python3
-commands = python setup.py build_sphinx
+deps = -r{toxinidir}/doc/requirements.txt
+commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
basepython = python3
+deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/.doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]