DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | # you may not use this file except in compliance with the License. |
| 4 | # You may obtain a copy of the License at |
| 5 | # |
| 6 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | # |
| 8 | # Unless required by applicable law or agreed to in writing, software |
| 9 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 11 | # implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | import os |
| 16 | import sys |
| 17 | |
Felipe Monteiro | 47c43cb | 2018-11-05 17:15:30 +0000 | [diff] [blame] | 18 | # If extensions (or modules to document with autodoc) are in another directory, |
| 19 | # add these directories to sys.path here. If the directory is relative to the |
| 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 21 | sys.path.insert(0, os.path.abspath('../../')) |
| 22 | sys.path.insert(0, os.path.abspath('../')) |
| 23 | sys.path.insert(0, os.path.abspath('./')) |
| 24 | |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 25 | # -- General configuration ---------------------------------------------------- |
| 26 | |
| 27 | # Add any Sphinx extension module names here, as strings. They can be |
| 28 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 29 | extensions = [ |
| 30 | 'sphinx.ext.autodoc', |
Felipe Monteiro | 098a8cd | 2017-09-20 21:31:27 +0100 | [diff] [blame] | 31 | 'sphinx.ext.todo', |
| 32 | 'sphinx.ext.viewcode', |
Masayuki Igawa | 94e6b18 | 2019-09-18 15:08:56 +0900 | [diff] [blame^] | 33 | 'sphinxcontrib.rsvgconverter', |
Felipe Monteiro | 098a8cd | 2017-09-20 21:31:27 +0100 | [diff] [blame] | 34 | 'openstackdocstheme', |
| 35 | 'oslo_config.sphinxconfiggen', |
Felipe Monteiro | 47c43cb | 2018-11-05 17:15:30 +0000 | [diff] [blame] | 36 | 'sphinxcontrib.apidoc', |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 37 | ] |
| 38 | |
Felipe Monteiro | 47c43cb | 2018-11-05 17:15:30 +0000 | [diff] [blame] | 39 | # sphinxcontrib.apidoc options |
| 40 | apidoc_module_dir = '../../patrole_tempest_plugin' |
| 41 | apidoc_output_dir = 'framework/code' |
| 42 | apidoc_excluded_paths = [ |
| 43 | 'hacking', |
| 44 | 'hacking/*', |
| 45 | 'tests', |
| 46 | 'tests/*', |
| 47 | 'config.py', |
| 48 | 'plugin.py', |
| 49 | 'version.py' |
| 50 | ] |
| 51 | apidoc_separate_modules = True |
| 52 | |
Felipe Monteiro | 098a8cd | 2017-09-20 21:31:27 +0100 | [diff] [blame] | 53 | config_generator_config_file = '../../etc/config-generator.patrole.conf' |
| 54 | sample_config_basename = '_static/patrole' |
| 55 | |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 56 | # autodoc generation is a bit aggressive and a nuisance when doing heavy |
| 57 | # text edit cycles. |
| 58 | # execute "export SPHINX_DEBUG=1" in your terminal to disable |
| 59 | |
| 60 | # The suffix of source filenames. |
| 61 | source_suffix = '.rst' |
| 62 | |
| 63 | # The master toctree document. |
| 64 | master_doc = 'index' |
| 65 | |
| 66 | # General information about the project. |
qiufossen | 2d038b5 | 2019-07-16 04:17:57 -0400 | [diff] [blame] | 67 | |
raiesmh08 | a6348e1 | 2017-02-07 00:24:59 +0530 | [diff] [blame] | 68 | copyright = u'2017, Patrole Developers' |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 69 | |
| 70 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 71 | add_function_parentheses = True |
| 72 | |
| 73 | # If true, the current module name will be prepended to all description |
| 74 | # unit titles (such as .. function::). |
| 75 | add_module_names = True |
| 76 | |
| 77 | # The name of the Pygments (syntax highlighting) style to use. |
| 78 | pygments_style = 'sphinx' |
| 79 | |
| 80 | # -- Options for HTML output -------------------------------------------------- |
| 81 | |
| 82 | # The theme to use for HTML and HTML Help pages. Major themes that come with |
| 83 | # Sphinx are currently 'default' and 'sphinxdoc'. |
| 84 | # html_theme_path = ["."] |
Van Hung Pham | 34193e3 | 2017-06-28 14:51:11 +0700 | [diff] [blame] | 85 | html_theme = 'openstackdocs' |
| 86 | |
| 87 | # openstackdocstheme options |
| 88 | repository_name = 'openstack/patrole' |
| 89 | bug_project = 'patrole' |
| 90 | bug_tag = '' |
| 91 | |
| 92 | # Must set this variable to include year, month, day, hours, and minutes. |
| 93 | html_last_updated_fmt = '%Y-%m-%d %H:%M' |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 94 | |
| 95 | # Output file base name for HTML help builder. |
qiufossen | 2d038b5 | 2019-07-16 04:17:57 -0400 | [diff] [blame] | 96 | htmlhelp_basename = 'patroledoc' |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 97 | |
Masayuki Igawa | 94e6b18 | 2019-09-18 15:08:56 +0900 | [diff] [blame^] | 98 | # Example configuration for intersphinx: refer to the Python standard library. |
| 99 | #intersphinx_mapping = {'http://docs.python.org/': None} |
| 100 | |
| 101 | # -- Options for LaTeX output ------------------------------------------------- |
| 102 | |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 103 | # Grouping the document tree into LaTeX files. List of tuples |
| 104 | # (source start file, target name, title, author, documentclass |
| 105 | # [howto/manual]). |
| 106 | latex_documents = [ |
Masayuki Igawa | 94e6b18 | 2019-09-18 15:08:56 +0900 | [diff] [blame^] | 107 | ('index', 'doc-patrole.tex', u'Patrole: Tempest Plugin for RBAC Testing', |
| 108 | u'OpenStack Foundation', 'manual'), |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 109 | ] |
| 110 | |
Masayuki Igawa | 94e6b18 | 2019-09-18 15:08:56 +0900 | [diff] [blame^] | 111 | # Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 |
| 112 | latex_use_xindy = False |