| 1 |
# Copyright (C) 2020 Red Hat, Inc. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 12 |
# implied. |
| 13 |
# See the License for the specific language governing permissions and |
| 14 |
# limitations under the License. |
| 15 |
|
| 16 |
# -- General configuration --------------------------------------------------- |
| 17 |
|
| 18 |
# Add any Sphinx extension module names here, as strings. They can be |
| 19 |
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 20 |
extensions = [ |
| 21 |
'sphinx.ext.autodoc', |
| 22 |
'sphinx.ext.extlinks', |
| 23 |
'sphinxcontrib.apidoc', |
| 24 |
'openstackdocstheme', |
| 25 |
'oslo_config.sphinxext', |
| 26 |
] |
| 27 |
|
| 28 |
# openstackdocstheme options |
| 29 |
openstackdocs_repo_name = 'openstack/oslo.policy' |
| 30 |
openstackdocs_bug_project = 'oslo.policy' |
| 31 |
openstackdocs_bug_tag = '' |
| 32 |
|
| 33 |
# autodoc generation is a bit aggressive and a nuisance when doing heavy |
| 34 |
# text edit cycles. |
| 35 |
# execute "export SPHINX_DEBUG=1" in your terminal to disable |
| 36 |
|
| 37 |
# The suffix of source filenames. |
| 38 |
source_suffix = '.rst' |
| 39 |
|
| 40 |
# The master toctree document. |
| 41 |
master_doc = 'index' |
| 42 |
|
| 43 |
# General information about the project. |
| 44 |
copyright = '2014-2020, OpenStack Foundation' |
| 45 |
source_tree = 'https://opendev.org/openstack/oslo.policy/src/branch/master' |
| 46 |
|
| 47 |
# If true, '()' will be appended to :func: etc. cross-reference text. |
| 48 |
add_function_parentheses = True |
| 49 |
|
| 50 |
# If true, the current module name will be prepended to all description |
| 51 |
# unit titles (such as .. function::). |
| 52 |
add_module_names = True |
| 53 |
|
| 54 |
# The name of the Pygments (syntax highlighting) style to use. |
| 55 |
pygments_style = 'native' |
| 56 |
|
| 57 |
# A list of ignored prefixes for module index sorting. |
| 58 |
modindex_common_prefix = ['oslo_policy.'] |
| 59 |
|
| 60 |
# -- Options for HTML output ------------------------------------------------- |
| 61 |
|
| 62 |
# The theme to use for HTML and HTML Help pages. Major themes that come with |
| 63 |
# Sphinx are currently 'default' and 'sphinxdoc'. |
| 64 |
html_theme = 'openstackdocs' |
| 65 |
|
| 66 |
# -- Options for man page output --------------------------------------------- |
| 67 |
|
| 68 |
# Grouping the document tree for man pages. |
| 69 |
# List of tuples 'sourcefile', 'target', 'title', 'Authors name', 'manual' |
| 70 |
|
| 71 |
_man_pages = [ |
| 72 |
( |
| 73 |
'oslopolicy-checker', |
| 74 |
'Check policy against the OpenStack Identity API access information.', |
| 75 |
), |
| 76 |
( |
| 77 |
'oslopolicy-list-redundant', |
| 78 |
'Detect policies that are specified in policy files that are the same ' |
| 79 |
'as the defaults provided by the service', |
| 80 |
), |
| 81 |
( |
| 82 |
'oslopolicy-policy-generator', |
| 83 |
'Generate a policy file that shows the effective policy in use', |
| 84 |
), |
| 85 |
( |
| 86 |
'oslopolicy-sample-generator', |
| 87 |
'Generate a sample policy file based on the default policies in a ' |
| 88 |
'given namespace', |
| 89 |
), |
| 90 |
] |
| 91 |
|
| 92 |
man_pages = [ |
| 93 |
(f'cli/{name}', name, description, 'OpenStack Community', 1) |
| 94 |
for name, description in _man_pages |
| 95 |
] |
| 96 |
|
| 97 |
# -- sphinx.ext.extlinks configuration --------------------------------------- |
| 98 |
|
| 99 |
extlinks = { |
| 100 |
'example': (source_tree + '/oslo_policy/%s', '%s'), |
| 101 |
} |
| 102 |
|
| 103 |
# -- sphinxcontrib.apidoc configuration -------------------------------------- |
| 104 |
|
| 105 |
apidoc_module_dir = '../../oslo_policy' |
| 106 |
apidoc_output_dir = 'reference/api' |
| 107 |
apidoc_excluded_paths = [ |
| 108 |
'tests', |
| 109 |
] |