summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorZhongShengping <chdzsp@163.com>2018-03-02 10:29:12 +0800
committerStephen Finucane <stephenfin@redhat.com>2019-07-19 10:56:20 +0100
commitc59246530f418fa21b9e0d383a123560f11c839c (patch)
tree850993cdb099bfd5cd92f7be21e00686cf157136 /doc
parentf1c25b189fc78e333ba2ace781b6e90cca853bde (diff)
downloadoslo-vmware-c59246530f418fa21b9e0d383a123560f11c839c.tar.gz
Follow the new PTI for document buildtrain-em2.34.1
For compliance with the Project Testing Interface as described in: https://governance.openstack.org/tc/reference/project-testing-interface.html For more detailed information, please refer to: http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Change-Id: Id20646cd51ffc13cf4e77c640eb677fe376c1b1f Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/requirements.txt10
-rw-r--r--doc/source/conf.py60
-rw-r--r--doc/source/reference/index.rst2
3 files changed, 19 insertions, 53 deletions
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..758afce
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1,10 @@
+# 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.
+# These are needed for docs generation
+openstackdocstheme>=1.20.0 # Apache-2.0
+sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
+sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
+reno>=2.5.0 # Apache-2.0
+fixtures>=3.0.0 # Apache-2.0/BSD
+sphinxcontrib-apidoc>=0.2.0 # BSD
diff --git a/doc/source/conf.py b/doc/source/conf.py
index f696d32..8cece1b 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -11,20 +11,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import os
-import sys
-import fileinput
-import fnmatch
-
-sys.path.insert(0, os.path.abspath('../..'))
# -- 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.intersphinx',
- 'openstackdocstheme'
+ 'sphinxcontrib.apidoc',
+ 'openstackdocstheme',
]
# openstackdocstheme options
@@ -32,31 +26,6 @@ repository_name = 'openstack/oslo.vmware'
bug_project = 'oslo.vmware'
bug_tag = ''
-# 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
-
-# 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.vmware._*', # 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)
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
# The master toctree document.
master_doc = 'index'
@@ -74,29 +43,16 @@ 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']
html_theme = 'openstackdocs'
-html_last_updated_fmt = '%Y-%m-%d %H:%M'
-# Output file base name for HTML help builder.
-htmlhelp_basename = '%sdoc' % project
+# -- sphinxcontrib.apidoc configuration --------------------------------------
-# 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'),
+apidoc_module_dir = '../../oslo_vmware'
+apidoc_output_dir = 'reference/api'
+apidoc_excluded_paths = [
+ 'tests',
]
-
-# Example configuration for intersphinx: refer to the Python standard library.
-#intersphinx_mapping = {'http://docs.python.org/': None}
diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst
index 87370d4..b2f7945 100644
--- a/doc/source/reference/index.rst
+++ b/doc/source/reference/index.rst
@@ -6,4 +6,4 @@ API Reference
:maxdepth: 1
:glob:
- api/autoindex
+ api/modules