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