blob: b738fde7f7a28b2c06104cf654f551ebf1f52844 [file] [log] [blame]
yuhui_inspurcd420fb2017-04-11 01:46:48 -07001# 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
Sean Dagueb56052b2013-05-21 17:57:41 -040014# Tempest documentation build configuration file, created by
15# sphinx-quickstart on Tue May 21 17:43:32 2013.
16#
17# This file is execfile()d with the current directory set to its containing dir.
18#
19# Note that not all possible configuration values are present in this
20# autogenerated file.
21#
22# All configuration values have a default; values that are commented out
23# serve to show the default.
24
Matthew Treinish6d5c0522013-09-11 15:50:30 +000025import os
Matthew Treinish13ed69f2015-08-10 11:51:54 -040026import subprocess
Lukas Piwowarskia9055012020-06-15 17:16:15 +020027import sys
Matthew Treinish13ed69f2015-08-10 11:51:54 -040028
Matthew Treinishfc463262016-06-29 10:39:02 -040029# Build the plugin registry
30def build_plugin_registry(app):
31 root_dir = os.path.dirname(
32 os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
33 subprocess.call(['tools/generate-tempest-plugins-list.sh'], cwd=root_dir)
34
Lukas Piwowarskia9055012020-06-15 17:16:15 +020035def autodoc_skip_member_handler(app, what, name, obj, skip, options):
36 return skip or (what == "class" and not name.startswith("test"))
37
Matthew Treinishfc463262016-06-29 10:39:02 -040038def setup(app):
Lukas Piwowarskia9055012020-06-15 17:16:15 +020039 app.connect('autodoc-skip-member', autodoc_skip_member_handler)
Masayuki Igawaaa516f82017-07-12 13:56:04 +090040 if os.getenv('GENERATE_TEMPEST_PLUGIN_LIST', 'true').lower() == 'true':
41 app.connect('builder-inited', build_plugin_registry)
Matthew Treinishfc463262016-06-29 10:39:02 -040042
Sean Dagueb56052b2013-05-21 17:57:41 -040043# If extensions (or modules to document with autodoc) are in another directory,
44# add these directories to sys.path here. If the directory is relative to the
45# documentation root, use os.path.abspath to make it absolute, like shown here.
Lukas Piwowarskia9055012020-06-15 17:16:15 +020046# sys.path.insert(0, os.path.abspath('.'))
47sys.path.insert(0, os.path.abspath('../../tempest'))
48sys.path.insert(0, os.path.abspath('../../tempest/api'))
Sean Dagueb56052b2013-05-21 17:57:41 -040049
50# -- General configuration -----------------------------------------------------
51
52# If your documentation needs a minimal Sphinx version, state it here.
53#needs_sphinx = '1.0'
54
55# Add any Sphinx extension module names here, as strings. They can be extensions
56# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Matthew Treinish6d5c0522013-09-11 15:50:30 +000057extensions = ['sphinx.ext.autodoc',
Matthew Treinish6d5c0522013-09-11 15:50:30 +000058 'sphinx.ext.todo',
59 'sphinx.ext.viewcode',
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +090060 'sphinxcontrib.rsvgconverter',
bhavani.cr29b22302017-07-04 12:00:58 +053061 'openstackdocstheme',
Matthew Treinish1719dfe2015-08-24 17:55:09 -040062 'oslo_config.sphinxconfiggen',
Matthew Treinish6d5c0522013-09-11 15:50:30 +000063 ]
64
Matthew Treinishbdef1c72016-06-21 18:06:49 -040065config_generator_config_file = '../../tempest/cmd/config-generator.tempest.conf'
Matthew Treinish1719dfe2015-08-24 17:55:09 -040066sample_config_basename = '_static/tempest'
67
Matthew Treinish6d5c0522013-09-11 15:50:30 +000068todo_include_todos = True
Sean Dagueb56052b2013-05-21 17:57:41 -040069
bhavani.cr29b22302017-07-04 12:00:58 +053070# openstackdocstheme options
Andreas Jaeger0fbce172020-05-18 19:32:19 +020071openstackdocs_repo_name = 'openstack/tempest'
72openstackdocs_bug_project = 'tempest'
73openstackdocs_bug_tag = 'doc'
74openstackdocs_pdf_link = True
bhavani.cr29b22302017-07-04 12:00:58 +053075
Sean Dagueb56052b2013-05-21 17:57:41 -040076# Add any paths that contain templates here, relative to this directory.
77templates_path = ['_templates']
78
79# The suffix of source filenames.
80source_suffix = '.rst'
81
82# The encoding of source files.
83#source_encoding = 'utf-8-sig'
84
85# The master toctree document.
86master_doc = 'index'
87
88# General information about the project.
songwenpingc7845312021-01-04 02:57:38 +000089copyright = '2013, OpenStack QA Team'
Sean Dagueb56052b2013-05-21 17:57:41 -040090
Sean Dagueb56052b2013-05-21 17:57:41 -040091# The language for content autogenerated by Sphinx. Refer to documentation
92# for a list of supported languages.
93#language = None
94
95# There are two options for replacing |today|: either, you set today to some
96# non-false value, then it is used:
97#today = ''
98# Else, today_fmt is used as the format for a strftime call.
99#today_fmt = '%B %d, %Y'
100
101# List of patterns, relative to source directory, that match files and
102# directories to ignore when looking for source files.
103exclude_patterns = ['_build']
104
105# The reST default role (used for this markup: `text`) to use for all documents.
106#default_role = None
107
108# If true, '()' will be appended to :func: etc. cross-reference text.
109#add_function_parentheses = True
110
111# If true, the current module name will be prepended to all description
112# unit titles (such as .. function::).
Matthew Treinish6d5c0522013-09-11 15:50:30 +0000113add_module_names = False
Sean Dagueb56052b2013-05-21 17:57:41 -0400114
115# If true, sectionauthor and moduleauthor directives will be shown in the
116# output. They are ignored by default.
Matthew Treinish6d5c0522013-09-11 15:50:30 +0000117show_authors = False
Sean Dagueb56052b2013-05-21 17:57:41 -0400118
119# The name of the Pygments (syntax highlighting) style to use.
melissaml217eebd2020-06-24 10:13:45 +0800120pygments_style = 'native'
Sean Dagueb56052b2013-05-21 17:57:41 -0400121
122# A list of ignored prefixes for module index sorting.
Matthew Treinish6d5c0522013-09-11 15:50:30 +0000123modindex_common_prefix = ['tempest.']
Sean Dagueb56052b2013-05-21 17:57:41 -0400124
125
126# -- Options for HTML output ---------------------------------------------------
127
128# The theme to use for HTML and HTML Help pages. See the documentation for
129# a list of builtin themes.
Masayuki Igawad2a657d2017-05-08 15:25:56 -0400130html_theme = 'openstackdocs'
Sean Dagueb56052b2013-05-21 17:57:41 -0400131
132# Theme options are theme-specific and customize the look and feel of a theme
133# further. For a list of options available for each theme, see the
134# documentation.
135#html_theme_options = {}
136
137# Add any paths that contain custom themes here, relative to this directory.
bhavani.cr29b22302017-07-04 12:00:58 +0530138#html_theme_path = []
Sean Dagueb56052b2013-05-21 17:57:41 -0400139
140# The name for this set of Sphinx documents. If None, it defaults to
141# "<project> v<release> documentation".
142#html_title = None
143
144# A shorter title for the navigation bar. Default is the same as html_title.
145#html_short_title = None
146
147# The name of an image file (relative to this directory) to place at the top
148# of the sidebar.
149#html_logo = None
150
151# The name of an image file (within the static path) to use as favicon of the
152# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
153# pixels large.
154#html_favicon = None
155
156# Add any paths that contain custom static files (such as style sheets) here,
157# relative to this directory. They are copied after the builtin static files,
158# so a file named "default.css" will overwrite the builtin "default.css".
159html_static_path = ['_static']
Matthew Treinishcd2fef92017-11-06 20:11:45 -0500160# Add any paths that contain "extra" files, such as .htaccess or
161# robots.txt.
162html_extra_path = ['_extra']
Sean Dagueb56052b2013-05-21 17:57:41 -0400163
164# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
165# using the given strftime format.
Sean Dagueb56052b2013-05-21 17:57:41 -0400166
Sean Dagueb56052b2013-05-21 17:57:41 -0400167# Custom sidebar templates, maps document names to template names.
168#html_sidebars = {}
169
170# Additional templates that should be rendered to pages, maps page names to
171# template names.
172#html_additional_pages = {}
173
174# If false, no module index is generated.
Michael Chapman4410ca12013-06-25 13:05:10 +1000175html_domain_indices = False
Sean Dagueb56052b2013-05-21 17:57:41 -0400176
177# If false, no index is generated.
Michael Chapman4410ca12013-06-25 13:05:10 +1000178html_use_index = False
Sean Dagueb56052b2013-05-21 17:57:41 -0400179
180# If true, the index is split into individual pages for each letter.
181#html_split_index = False
182
183# If true, links to the reST sources are added to the pages.
184#html_show_sourcelink = True
185
186# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
187#html_show_sphinx = True
188
189# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
190#html_show_copyright = True
191
192# If true, an OpenSearch description file will be output, and all pages will
193# contain a <link> tag referring to it. The value of this option must be the
194# base URL from which the finished HTML is served.
195#html_use_opensearch = ''
196
197# This is the file name suffix for HTML files (e.g. ".xhtml").
198#html_file_suffix = None
Stephen Finucaned1148042017-03-22 12:35:10 +0000199
200# A list of warning types to suppress arbitrary warning messages.
201suppress_warnings = ['image.nonlocal_uri']
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900202
203# -- Options for LaTeX output -------------------------------------------------
204
205# Grouping the document tree into LaTeX files. List of tuples
206# (source start file, target name, title, author, documentclass
207# [howto/manual]).
208latex_documents = [
songwenpingc7845312021-01-04 02:57:38 +0000209 ('index', 'doc-tempest.tex', 'Tempest Testing Project',
210 'OpenStack Foundation', 'manual'),
Masayuki Igawa7e4ef4c2019-07-03 17:17:44 +0900211]
Lukas Piwowarskia9055012020-06-15 17:16:15 +0200212
213latex_use_xindy = False
214
215latex_elements = {
216 'maxlistdepth': 20,
217 'printindex': '\\footnotesize\\raggedright\\printindex'
218}