yuhui_inspur | cd420fb | 2017-04-11 01:46:48 -0700 | [diff] [blame^] | 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 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 14 | # 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 Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 25 | import sys |
| 26 | import os |
Matthew Treinish | 13ed69f | 2015-08-10 11:51:54 -0400 | [diff] [blame] | 27 | import subprocess |
Thomas Bechtold | 89d5617 | 2016-08-30 18:57:09 +0200 | [diff] [blame] | 28 | import warnings |
Matthew Treinish | 13ed69f | 2015-08-10 11:51:54 -0400 | [diff] [blame] | 29 | |
Matthew Treinish | fc46326 | 2016-06-29 10:39:02 -0400 | [diff] [blame] | 30 | # Build the plugin registry |
| 31 | def build_plugin_registry(app): |
| 32 | root_dir = os.path.dirname( |
| 33 | os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
| 34 | subprocess.call(['tools/generate-tempest-plugins-list.sh'], cwd=root_dir) |
| 35 | |
| 36 | def setup(app): |
| 37 | app.connect('builder-inited', build_plugin_registry) |
| 38 | |
| 39 | |
| 40 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 41 | # If extensions (or modules to document with autodoc) are in another directory, |
| 42 | # add these directories to sys.path here. If the directory is relative to the |
| 43 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 44 | #sys.path.insert(0, os.path.abspath('.')) |
| 45 | |
| 46 | # -- General configuration ----------------------------------------------------- |
| 47 | |
| 48 | # If your documentation needs a minimal Sphinx version, state it here. |
| 49 | #needs_sphinx = '1.0' |
| 50 | |
| 51 | # Add any Sphinx extension module names here, as strings. They can be extensions |
| 52 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
Matthew Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 53 | extensions = ['sphinx.ext.autodoc', |
Matthew Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 54 | 'sphinx.ext.todo', |
| 55 | 'sphinx.ext.viewcode', |
Matthew Treinish | 1719dfe | 2015-08-24 17:55:09 -0400 | [diff] [blame] | 56 | 'oslosphinx', |
| 57 | 'oslo_config.sphinxconfiggen', |
Matthew Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 58 | ] |
| 59 | |
Matthew Treinish | bdef1c7 | 2016-06-21 18:06:49 -0400 | [diff] [blame] | 60 | config_generator_config_file = '../../tempest/cmd/config-generator.tempest.conf' |
Matthew Treinish | 1719dfe | 2015-08-24 17:55:09 -0400 | [diff] [blame] | 61 | sample_config_basename = '_static/tempest' |
| 62 | |
Matthew Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 63 | todo_include_todos = True |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 64 | |
| 65 | # Add any paths that contain templates here, relative to this directory. |
| 66 | templates_path = ['_templates'] |
| 67 | |
| 68 | # The suffix of source filenames. |
| 69 | source_suffix = '.rst' |
| 70 | |
| 71 | # The encoding of source files. |
| 72 | #source_encoding = 'utf-8-sig' |
| 73 | |
| 74 | # The master toctree document. |
| 75 | master_doc = 'index' |
| 76 | |
| 77 | # General information about the project. |
| 78 | project = u'Tempest' |
Matthew Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 79 | copyright = u'2013, OpenStack QA Team' |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 80 | |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 81 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 82 | # for a list of supported languages. |
| 83 | #language = None |
| 84 | |
| 85 | # There are two options for replacing |today|: either, you set today to some |
| 86 | # non-false value, then it is used: |
| 87 | #today = '' |
| 88 | # Else, today_fmt is used as the format for a strftime call. |
| 89 | #today_fmt = '%B %d, %Y' |
| 90 | |
| 91 | # List of patterns, relative to source directory, that match files and |
| 92 | # directories to ignore when looking for source files. |
| 93 | exclude_patterns = ['_build'] |
| 94 | |
| 95 | # The reST default role (used for this markup: `text`) to use for all documents. |
| 96 | #default_role = None |
| 97 | |
| 98 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 99 | #add_function_parentheses = True |
| 100 | |
| 101 | # If true, the current module name will be prepended to all description |
| 102 | # unit titles (such as .. function::). |
Matthew Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 103 | add_module_names = False |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 104 | |
| 105 | # If true, sectionauthor and moduleauthor directives will be shown in the |
| 106 | # output. They are ignored by default. |
Matthew Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 107 | show_authors = False |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 108 | |
| 109 | # The name of the Pygments (syntax highlighting) style to use. |
| 110 | pygments_style = 'sphinx' |
| 111 | |
| 112 | # A list of ignored prefixes for module index sorting. |
Matthew Treinish | 6d5c052 | 2013-09-11 15:50:30 +0000 | [diff] [blame] | 113 | modindex_common_prefix = ['tempest.'] |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 114 | |
| 115 | |
| 116 | # -- Options for HTML output --------------------------------------------------- |
| 117 | |
| 118 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 119 | # a list of builtin themes. |
Sean Dague | 7679b48 | 2013-05-24 08:49:44 -0400 | [diff] [blame] | 120 | html_theme = 'nature' |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 121 | |
| 122 | # Theme options are theme-specific and customize the look and feel of a theme |
| 123 | # further. For a list of options available for each theme, see the |
| 124 | # documentation. |
| 125 | #html_theme_options = {} |
| 126 | |
| 127 | # Add any paths that contain custom themes here, relative to this directory. |
| 128 | #html_theme_path = [] |
| 129 | |
| 130 | # The name for this set of Sphinx documents. If None, it defaults to |
| 131 | # "<project> v<release> documentation". |
| 132 | #html_title = None |
| 133 | |
| 134 | # A shorter title for the navigation bar. Default is the same as html_title. |
| 135 | #html_short_title = None |
| 136 | |
| 137 | # The name of an image file (relative to this directory) to place at the top |
| 138 | # of the sidebar. |
| 139 | #html_logo = None |
| 140 | |
| 141 | # The name of an image file (within the static path) to use as favicon of the |
| 142 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 143 | # pixels large. |
| 144 | #html_favicon = None |
| 145 | |
| 146 | # Add any paths that contain custom static files (such as style sheets) here, |
| 147 | # relative to this directory. They are copied after the builtin static files, |
| 148 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 149 | html_static_path = ['_static'] |
| 150 | |
| 151 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 152 | # using the given strftime format. |
Harshada Mangesh Kakad | d11d5ee | 2015-12-31 01:38:46 -0800 | [diff] [blame] | 153 | git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", |
| 154 | "-n1"] |
Thomas Bechtold | 89d5617 | 2016-08-30 18:57:09 +0200 | [diff] [blame] | 155 | try: |
Stephen Finucane | d114804 | 2017-03-22 12:35:10 +0000 | [diff] [blame] | 156 | html_last_updated_fmt = str( |
| 157 | subprocess.Popen(git_cmd, stdout=subprocess.PIPE).communicate()[0]) |
Thomas Bechtold | 89d5617 | 2016-08-30 18:57:09 +0200 | [diff] [blame] | 158 | except Exception: |
| 159 | warnings.warn('Cannot get last updated time from git repository. ' |
| 160 | 'Not setting "html_last_updated_fmt".') |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 161 | |
| 162 | # If true, SmartyPants will be used to convert quotes and dashes to |
| 163 | # typographically correct entities. |
Masayuki Igawa | 44ca9ed | 2016-06-10 09:25:48 +0900 | [diff] [blame] | 164 | html_use_smartypants = False |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 165 | |
| 166 | # Custom sidebar templates, maps document names to template names. |
| 167 | #html_sidebars = {} |
| 168 | |
| 169 | # Additional templates that should be rendered to pages, maps page names to |
| 170 | # template names. |
| 171 | #html_additional_pages = {} |
| 172 | |
| 173 | # If false, no module index is generated. |
Michael Chapman | 4410ca1 | 2013-06-25 13:05:10 +1000 | [diff] [blame] | 174 | html_domain_indices = False |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 175 | |
| 176 | # If false, no index is generated. |
Michael Chapman | 4410ca1 | 2013-06-25 13:05:10 +1000 | [diff] [blame] | 177 | html_use_index = False |
Sean Dague | b56052b | 2013-05-21 17:57:41 -0400 | [diff] [blame] | 178 | |
| 179 | # If true, the index is split into individual pages for each letter. |
| 180 | #html_split_index = False |
| 181 | |
| 182 | # If true, links to the reST sources are added to the pages. |
| 183 | #html_show_sourcelink = True |
| 184 | |
| 185 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
| 186 | #html_show_sphinx = True |
| 187 | |
| 188 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
| 189 | #html_show_copyright = True |
| 190 | |
| 191 | # If true, an OpenSearch description file will be output, and all pages will |
| 192 | # contain a <link> tag referring to it. The value of this option must be the |
| 193 | # base URL from which the finished HTML is served. |
| 194 | #html_use_opensearch = '' |
| 195 | |
| 196 | # This is the file name suffix for HTML files (e.g. ".xhtml"). |
| 197 | #html_file_suffix = None |
Stephen Finucane | d114804 | 2017-03-22 12:35:10 +0000 | [diff] [blame] | 198 | |
| 199 | # A list of warning types to suppress arbitrary warning messages. |
| 200 | suppress_warnings = ['image.nonlocal_uri'] |