summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/conf.py39
-rw-r--r--doc/source/reference/index.rst1
-rw-r--r--tox.ini4
3 files changed, 11 insertions, 33 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index f7095d2..c2b91e4 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -12,11 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import os
-import sys
-
-sys.path.insert(0, os.path.abspath('../..'))
-# -- General configuration ----------------------------------------------------
+# -- 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.
@@ -24,7 +20,6 @@ extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.extlinks',
'sphinxcontrib.apidoc',
- #'sphinx.ext.intersphinx',
'openstackdocstheme',
'oslo_config.sphinxext',
]
@@ -44,10 +39,6 @@ source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = ['api/oslo_policy.tests.*', 'api/setup.rst']
-
# General information about the project.
project = u'oslo.policy'
copyright = u'2014, OpenStack Foundation'
@@ -66,36 +57,24 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['oslo_policy.']
-# -- Options for HTML output --------------------------------------------------
+
+# -- 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'
-# Output file base name for HTML help builder.
-htmlhelp_basename = '%sdoc' % project
-
-# 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'),
-]
-# Shortened external links.
+# -- sphinx.ext.extlinks configuration ---------------------------------------
+
extlinks = {
'example': (source_tree + '/oslo_policy/%s', ''),
}
-# Example configuration for intersphinx: refer to the Python standard library.
-#intersphinx_mapping = {'http://docs.python.org/': None}
-
# -- sphinxcontrib.apidoc configuration --------------------------------------
+
apidoc_module_dir = '../../oslo_policy'
apidoc_output_dir = 'reference/api'
+apidoc_excluded_paths = [
+ 'tests',
+]
diff --git a/doc/source/reference/index.rst b/doc/source/reference/index.rst
index 6284450..512a8b9 100644
--- a/doc/source/reference/index.rst
+++ b/doc/source/reference/index.rst
@@ -5,4 +5,3 @@
.. toctree::
api/modules
-
diff --git a/tox.ini b/tox.ini
index ed1c446..0e85d56 100644
--- a/tox.ini
+++ b/tox.ini
@@ -35,7 +35,7 @@ deps =
{[testenv]deps}
-r{toxinidir}/doc/requirements.txt
commands =
- rm -rf doc/build
+ rm -rf doc/build doc/source/reference/api
sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:cover]
@@ -43,7 +43,6 @@ basepython = python3
commands = python setup.py test --coverage --coverage-package-name=oslo_policy --testr-args='{posargs}'
[flake8]
-
show-source = True
ignore =
builtins = _
@@ -54,6 +53,7 @@ import_exceptions = oslo_policy._i18n
[testenv:releasenotes]
basepython = python3
+deps = -r{toxinidir}/doc/requirements.txt
whitelist_externals =
rm
commands =