| 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 | # cyborg documentation build configuration file |
| 15 | # |
| 16 | # Refer to the Sphinx documentation for advice on configuring this file: |
| 17 | # |
| 18 | # http://www.sphinx-doc.org/en/stable/config.html |
| 19 | |
| 20 | import os |
| 21 | import sys |
| 22 | |
| 23 | |
| 24 | sys.path.insert(0, os.path.abspath('../..')) |
| 25 | # -- General configuration ---------------------------------------------------- |
| 26 | |
| 27 | # Add any Sphinx extension module names here, as strings. They can be |
| 28 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 29 | extensions = [ |
| 30 | 'sphinx.ext.autodoc', |
| 31 | 'sphinx.ext.graphviz', |
| 32 | 'openstackdocstheme', |
| 33 | 'oslo_config.sphinxconfiggen', |
| 34 | 'oslo_config.sphinxext', |
| 35 | 'oslo_policy.sphinxext', |
| 36 | 'oslo_policy.sphinxpolicygen', |
| 37 | 'sphinxcontrib.rsvgconverter', |
| 38 | ] |
| 39 | |
| 40 | # autodoc generation is a bit aggressive and a nuisance when doing heavy |
| 41 | # text edit cycles. |
| 42 | # execute "export SPHINX_DEBUG=1" in your terminal to disable |
| 43 | |
| 44 | # The suffix of source filenames. |
| 45 | source_suffix = '.rst' |
| 46 | |
| 47 | # The master toctree document. |
| 48 | master_doc = 'index' |
| 49 | |
| 50 | # General information about the project. |
| 51 | project = "Cyborg" |
| 52 | copyright = '2013-present, OpenStack Foundation' |
| 53 | |
| 54 | # openstackdocstheme options |
| 55 | openstackdocs_auto_name = False |
| 56 | openstackdocs_repo_name = 'openstack/cyborg' |
| 57 | openstackdocs_bug_project = 'cyborg' |
| 58 | openstackdocs_bug_tag = 'doc' |
| 59 | openstackdocs_pdf_link = True |
| 60 | |
| 61 | config_generator_config_file = ( |
| 62 | '../../tools/config/cyborg-config-generator.conf' |
| 63 | ) |
| 64 | sample_config_basename = '_static/cyborg' |
| 65 | |
| 66 | policy_generator_config_file = [ |
| 67 | ('../../tools/config/cyborg-policy-generator.conf', '_static/cyborg'), |
| 68 | ] |
| 69 | |
| 70 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| 71 | add_function_parentheses = True |
| 72 | |
| 73 | # If true, the current module name will be prepended to all description |
| 74 | # unit titles (such as .. function::). |
| 75 | add_module_names = True |
| 76 | |
| 77 | # The name of the Pygments (syntax highlighting) style to use. |
| 78 | pygments_style = 'native' |
| 79 | |
| 80 | # -- Options for HTML output -------------------------------------------------- |
| 81 | |
| 82 | # The theme to use for HTML and HTML Help pages. Major themes that come with |
| 83 | # Sphinx are currently 'default' and 'sphinxdoc'. |
| 84 | # html_theme_path = ["."] |
| 85 | # html_theme = '_theme' |
| 86 | # Add any paths that contain custom static files (such as style sheets) here, |
| 87 | # relative to this directory. They are copied after the builtin static files, |
| 88 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 89 | # html_static_path = ['_static'] |
| 90 | |
| 91 | # Output file base name for HTML help builder. |
| 92 | htmlhelp_basename = 'cyborgdoc' |
| 93 | |
| 94 | # The name for this set of Sphinx documents. If None, it defaults to |
| 95 | # "<project> v<release> documentation". |
| 96 | html_title = 'Cyborg' |
| 97 | html_theme = 'openstackdocs' |
| 98 | |
| 99 | # -- Options for LaTeX output ------------------------------------------------- |
| 100 | |
| 101 | latex_elements = { |
| 102 | # The paper size ('letterpaper' or 'a4paper'). |
| 103 | # 'papersize': 'letterpaper', |
| 104 | # The font size ('10pt', '11pt' or '12pt'). |
| 105 | # 'pointsize': '10pt', |
| 106 | # Additional stuff for the LaTeX preamble. |
| 107 | # openany: Skip blank pages in generated PDFs |
| 108 | 'maxlistdepth': 10, |
| 109 | 'extraclassoptions': 'openany,oneside', |
| 110 | 'preamble': r'\setcounter{tocdepth}{2}', |
| 111 | 'makeindex': '', |
| 112 | 'printindex': '', |
| 113 | } |
| 114 | |
| 115 | # Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664 |
| 116 | # Some distros are missing xindy |
| 117 | latex_use_xindy = False |
| 118 | |
| 119 | # Grouping the document tree into LaTeX files. List of tuples |
| 120 | # (source start file, target name, title, author, documentclass |
| 121 | # [howto/manual]). |
| 122 | latex_documents = [ |
| 123 | ( |
| 124 | 'index', |
| 125 | 'doc-cyborg.tex', |
| 126 | 'Cyborg Documentation', |
| 127 | 'OpenStack Foundation', |
| 128 | 'manual', |
| 129 | ), |
| 130 | ] |
| 131 | |
| 132 | # Example configuration for intersphinx: refer to the Python standard library. |
| 133 | # intersphinx_mapping = {'https://docs.python.org/': None} |