Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [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 | |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 15 | import datetime |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 16 | import os |
| 17 | import sys |
| 18 | |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 19 | import openstackdocstheme |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 20 | |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 21 | sys.path.insert(0, os.path.abspath('../..')) |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 22 | sys.path.insert(0, os.path.abspath('.')) |
| 23 | |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 24 | # -- General configuration ---------------------------------------------------- |
| 25 | |
| 26 | # Add any Sphinx extension module names here, as strings. They can be |
| 27 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 28 | extensions = [ |
| 29 | 'sphinx.ext.autodoc', |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 30 | 'sphinx.ext.viewcode', |
| 31 | 'openstackdocstheme', |
Adam Harwell | 008dbec | 2018-05-16 00:35:36 -0700 | [diff] [blame] | 32 | 'oslo_config.sphinxext', |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 33 | 'sphinxcontrib.apidoc', |
| 34 | 'sphinxcontrib.rsvgconverter' |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 35 | ] |
| 36 | |
| 37 | # autodoc generation is a bit aggressive and a nuisance when doing heavy |
| 38 | # text edit cycles. |
| 39 | # execute "export SPHINX_DEBUG=1" in your terminal to disable |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 40 | templates_path = ['_templates'] |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 41 | |
| 42 | # The suffix of source filenames. |
| 43 | source_suffix = '.rst' |
| 44 | |
| 45 | # The master toctree document. |
| 46 | master_doc = 'index' |
| 47 | |
| 48 | # General information about the project. |
| 49 | project = u'octavia-tempest-plugin' |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 50 | copyright = u'2017-2019, OpenStack Foundation' |
| 51 | |
| 52 | # The version info for the project you're documenting, acts as replacement for |
| 53 | # |version| and |release|, also used in various other places throughout the |
| 54 | # built documents. |
| 55 | # |
| 56 | # Version info |
| 57 | from octavia_tempest_plugin.version import version_info as octavia_tempest_ver |
| 58 | release = octavia_tempest_ver.release_string() |
| 59 | # The short X.Y version. |
| 60 | version = octavia_tempest_ver.version_string() |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 61 | |
| 62 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 63 | add_function_parentheses = True |
| 64 | |
| 65 | # If true, the current module name will be prepended to all description |
| 66 | # unit titles (such as .. function::). |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 67 | add_module_names = False |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 68 | |
| 69 | # The name of the Pygments (syntax highlighting) style to use. |
| 70 | pygments_style = 'sphinx' |
| 71 | |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 72 | # A list of ignored prefixes for module index sorting. |
| 73 | modindex_common_prefix = ['octavia_tempest_plugin.'] |
| 74 | |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 75 | repository_name = 'openstack/octavia-tempest-plugin' |
| 76 | bug_project = '910' |
| 77 | bug_tag = 'docs' |
| 78 | |
| 79 | apidoc_output_dir = '_build/modules' |
| 80 | apidoc_module_dir = '../../octavia_tempest_plugin' |
| 81 | apidoc_excluded_paths = [] |
| 82 | |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 83 | # -- Options for HTML output -------------------------------------------------- |
| 84 | |
| 85 | # The theme to use for HTML and HTML Help pages. Major themes that come with |
| 86 | # Sphinx are currently 'default' and 'sphinxdoc'. |
| 87 | # html_theme_path = ["."] |
| 88 | # html_theme = '_theme' |
| 89 | # html_static_path = ['static'] |
| 90 | |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 91 | html_theme = 'openstackdocs' |
| 92 | |
| 93 | html_last_updated_fmt = '%Y-%m-%d %H:%M' |
| 94 | |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 95 | # Output file base name for HTML help builder. |
| 96 | htmlhelp_basename = '%sdoc' % project |
| 97 | |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 98 | # If false, no module index is generated. |
| 99 | html_domain_indices = True |
| 100 | |
| 101 | # If false, no index is generated. |
| 102 | html_use_index = True |
| 103 | |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 104 | # -- Options for LaTeX output ------------------------------------------------- |
| 105 | |
| 106 | # Fix Unicode character for sphinx_feature_classification |
| 107 | # Sphinx default latex engine (pdflatex) doesn't know much unicode |
| 108 | latex_preamble = r""" |
| 109 | \usepackage{newunicodechar} |
| 110 | \newunicodechar{✖}{\sffamily X} |
| 111 | \setcounter{tocdepth}{2} |
| 112 | \authoraddress{\textcopyright %s OpenStack Foundation} |
| 113 | """ % datetime.datetime.now().year |
| 114 | |
| 115 | latex_elements = { |
| 116 | # The paper size ('letterpaper' or 'a4paper'). |
| 117 | # 'papersize': 'letterpaper', |
| 118 | |
| 119 | # The font size ('10pt', '11pt' or '12pt'). |
| 120 | # 'pointsize': '10pt', |
| 121 | |
| 122 | # Additional stuff for the LaTeX preamble. |
| 123 | # openany: Skip blank pages in generated PDFs |
| 124 | 'extraclassoptions': 'openany,oneside', |
| 125 | 'makeindex': '', |
| 126 | 'printindex': '', |
| 127 | 'preamble': latex_preamble |
| 128 | } |
| 129 | |
| 130 | # Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 |
| 131 | # Some distros are missing xindy |
| 132 | latex_use_xindy = False |
| 133 | |
| 134 | # Fix missing apostrophe |
| 135 | smartquotes_excludes = {'builders': ['latex']} |
| 136 | |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 137 | # Grouping the document tree into LaTeX files. List of tuples |
| 138 | # (source start file, target name, title, author, documentclass |
| 139 | # [howto/manual]). |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 140 | latex_documents = [( |
| 141 | 'index', |
| 142 | 'doc-octavia-tempest-plugin.tex', |
| 143 | u'Octavia Tempest Plugin Documentation', |
| 144 | u'OpenStack Octavia Team', |
| 145 | 'manual' |
| 146 | )] |
Michael Johnson | 34139b0 | 2017-03-15 10:31:10 -0700 | [diff] [blame] | 147 | |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 148 | # The name of an image file (relative to this directory) to place at the top of |
| 149 | # the title page. |
| 150 | # latex_logo = None |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 151 | |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 152 | # For "manual" documents, if this is true, then toplevel headings are parts, |
| 153 | # not chapters. |
| 154 | # latex_use_parts = False |
Jude Cross | 986e3f5 | 2017-07-24 14:57:20 -0700 | [diff] [blame] | 155 | |
Michael Johnson | 791fefb | 2019-09-13 10:48:05 -0700 | [diff] [blame] | 156 | # If true, show page references after internal links. |
| 157 | # latex_show_pagerefs = False |
| 158 | |
| 159 | # If true, show URL addresses after external links. |
| 160 | # latex_show_urls = False |
| 161 | |
| 162 | # Documents to append as an appendix to all manuals. |
| 163 | # latex_appendices = [] |
| 164 | |
| 165 | # If false, no module index is generated. |
| 166 | latex_domain_indices = False |