| 1 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 2 |
# you may not use this file except in compliance with the License. |
| 3 |
# You may obtain a copy of the License at |
| 4 |
# |
| 5 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 |
# |
| 7 |
# Unless required by applicable law or agreed to in writing, software |
| 8 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 9 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 10 |
# implied. |
| 11 |
# See the License for the specific language governing permissions and |
| 12 |
# limitations under the License. |
| 13 |
|
| 14 |
import os |
| 15 |
import sys |
| 16 |
|
| 17 |
sys.path.insert(0, os.path.abspath('../..')) |
| 18 |
# -- General configuration ---------------------------------------------------- |
| 19 |
|
| 20 |
# Add any Sphinx extension module names here, as strings. They can be |
| 21 |
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 22 |
extensions = [ |
| 23 |
'sphinxcontrib.apidoc', |
| 24 |
'openstackdocstheme', |
| 25 |
'oslo_config.sphinxext', |
| 26 |
] |
| 27 |
|
| 28 |
# openstackdocstheme options |
| 29 |
openstackdocs_repo_name = 'openstack/oslo.metrics' |
| 30 |
openstackdocs_bug_project = 'oslo.metrics' |
| 31 |
openstackdocs_bug_tag = '' |
| 32 |
|
| 33 |
# sphinxcontrib.apidoc options |
| 34 |
apidoc_module_dir = '../../oslo_metrics' |
| 35 |
apidoc_output_dir = 'reference/api' |
| 36 |
apidoc_excluded_paths = ['tests'] |
| 37 |
|
| 38 |
# The suffix of source filenames. |
| 39 |
source_suffix = '.rst' |
| 40 |
|
| 41 |
# The master toctree document. |
| 42 |
master_doc = 'index' |
| 43 |
|
| 44 |
# General information about the project. |
| 45 |
project = 'oslo.metrics' |
| 46 |
copyright = '2014, OpenStack Foundation' |
| 47 |
|
| 48 |
# If true, '()' will be appended to :func: etc. cross-reference text. |
| 49 |
add_function_parentheses = True |
| 50 |
|
| 51 |
# If true, the current module name will be prepended to all description |
| 52 |
# unit titles (such as .. function::). |
| 53 |
add_module_names = True |
| 54 |
|
| 55 |
# The name of the Pygments (syntax highlighting) style to use. |
| 56 |
pygments_style = 'native' |
| 57 |
|
| 58 |
# A list of ignored prefixes for module index sorting. |
| 59 |
modindex_common_prefix = ['oslo_metrics.'] |
| 60 |
|
| 61 |
# -- Options for HTML output -------------------------------------------------- |
| 62 |
|
| 63 |
# The theme to use for HTML and HTML Help pages. Major themes that come with |
| 64 |
# Sphinx are currently 'default' and 'sphinxdoc'. |
| 65 |
# html_theme_path = ["."] |
| 66 |
html_theme = 'openstackdocs' |
| 67 |
# html_static_path = ['static'] |
| 68 |
|
| 69 |
# Output file base name for HTML help builder. |
| 70 |
htmlhelp_basename = f'{project}doc' |
| 71 |
|
| 72 |
# Grouping the document tree into LaTeX files. List of tuples |
| 73 |
# (source start file, target name, title, author, documentclass |
| 74 |
# [howto/manual]). |
| 75 |
latex_documents = [ |
| 76 |
( |
| 77 |
'index', |
| 78 |
f'{project}.tex', |
| 79 |
f'{project} Documentation', |
| 80 |
'OpenStack Foundation', |
| 81 |
'manual', |
| 82 |
) |
| 83 |
] |
| 84 |
|
| 85 |
intersphinx_mapping = { |
| 86 |
'python': ('https://docs.python.org/', None), |
| 87 |
'osloconfig': ('http://docs.openstack.org/oslo.config/latest/', None), |
| 88 |
} |