Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
Zack Williams | 44faef9 | 2022-03-08 22:07:49 -0700 | [diff] [blame] | 2 | |
| 3 | # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 6 | # |
| 7 | # Configuration file for the Sphinx documentation builder. |
| 8 | # |
| 9 | # This file does only contain a selection of the most common options. For a |
| 10 | # full list see the documentation: |
| 11 | # http://www.sphinx-doc.org/en/master/config |
| 12 | |
| 13 | # -- Path setup -------------------------------------------------------------- |
| 14 | |
| 15 | # If extensions (or modules to document with autodoc) are in another directory, |
| 16 | # add these directories to sys.path here. If the directory is relative to the |
| 17 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 18 | # |
| 19 | # import os |
| 20 | # import sys |
| 21 | # sys.path.insert(0, os.path.abspath('.')) |
| 22 | |
| 23 | import os |
| 24 | |
| 25 | def get_version(): |
| 26 | with open("VERSION") as f: |
| 27 | return f.read().strip() |
| 28 | |
| 29 | # -- Project information ----------------------------------------------------- |
| 30 | |
| 31 | project = u'Aether Docs' |
| 32 | copyright = u'2020-current, Open Networking Foundation' |
| 33 | author = u'Open Networking Foundation' |
| 34 | |
| 35 | # The short X.Y version |
| 36 | version = get_version() |
| 37 | |
| 38 | # The full version, including alpha/beta/rc tags |
| 39 | release = version |
| 40 | |
| 41 | # -- General configuration --------------------------------------------------- |
| 42 | |
| 43 | # If your documentation needs a minimal Sphinx version, state it here. |
| 44 | # |
| 45 | # needs_sphinx = '1.0' |
| 46 | |
| 47 | # make all warnings errors |
| 48 | warning_is_error = True |
| 49 | |
| 50 | # Add any Sphinx extension module names here, as strings. They can be |
| 51 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 52 | # ones. |
| 53 | extensions = [ |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 54 | 'sphinx.ext.autosectionlabel', |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 55 | 'sphinx.ext.coverage', |
| 56 | 'sphinx.ext.graphviz', |
| 57 | 'sphinx.ext.ifconfig', |
Zack Williams | 34c30e5 | 2020-11-16 10:55:00 -0700 | [diff] [blame] | 58 | 'sphinx.ext.intersphinx', |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 59 | 'sphinx.ext.mathjax', |
| 60 | 'sphinx.ext.todo', |
| 61 | 'sphinxcontrib.spelling', |
| 62 | "sphinx_multiversion", |
| 63 | ] |
| 64 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 65 | # require document prefix on section labels |
| 66 | autosectionlabel_prefix_document = True |
| 67 | |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 68 | # Text files with lists of words that shouldn't fail the spellchecker: |
| 69 | spelling_word_list_filename=['dict.txt', ] |
| 70 | |
| 71 | # sphinx-multiversion prep, run in each versioned source directory |
| 72 | prep_commands = [ |
| 73 | ] |
| 74 | |
| 75 | # inlcude only the branches matching master and aether-* |
| 76 | smv_branch_whitelist = r'^(master|aether-.*)$' |
| 77 | |
Zack Williams | 44faef9 | 2022-03-08 22:07:49 -0700 | [diff] [blame] | 78 | # Don't include any tags - smv docs say you can put None here, but that is broken |
| 79 | # https://github.com/Holzhaus/sphinx-multiversion/issues/47 |
| 80 | smv_tag_whitelist = r'notags' |
| 81 | |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 82 | # include all remote branches |
| 83 | smv_remote_whitelist = r'^.*$' |
| 84 | |
| 85 | # Add any paths that contain templates here, relative to this directory. |
| 86 | templates_path = ['_templates'] |
| 87 | |
| 88 | # The suffix(es) of source filenames. |
| 89 | # You can specify multiple suffix as a list of string: |
| 90 | # |
| 91 | # source_suffix = ['.rst', '.md'] |
| 92 | source_suffix = ['.rst'] |
| 93 | |
| 94 | # The master toctree document. |
| 95 | master_doc = 'index' |
| 96 | |
| 97 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 98 | # for a list of supported languages. |
| 99 | # |
| 100 | # This is also used if you do content translation via gettext catalogs. |
| 101 | # Usually you set "language" from the command line for these cases. |
| 102 | language = None |
| 103 | |
| 104 | # List of patterns, relative to source directory, that match files and |
| 105 | # directories to ignore when looking for source files. |
| 106 | # This pattern also affects html_static_path and html_extra_path. |
| 107 | exclude_patterns = [ |
| 108 | '*/LICENSE.md', |
| 109 | '*/vendor', |
| 110 | '.DS_Store', |
Zack Williams | 44faef9 | 2022-03-08 22:07:49 -0700 | [diff] [blame] | 111 | 'README', |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 112 | 'Thumbs.db', |
| 113 | '_build', |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 114 | 'requirements.txt', |
Zack Williams | 44faef9 | 2022-03-08 22:07:49 -0700 | [diff] [blame] | 115 | 'venv-docs', |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 116 | ] |
| 117 | |
| 118 | # The name of the Pygments (syntax highlighting) style to use. |
| 119 | pygments_style = None |
| 120 | |
| 121 | # -- Options for HTML output ------------------------------------------------- |
| 122 | |
| 123 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 124 | # a list of builtin themes. |
| 125 | # |
| 126 | html_theme = 'sphinx_rtd_theme' |
| 127 | |
| 128 | html_logo = '_static/aether.svg' |
| 129 | |
| 130 | html_favicon = '_static/aether-favicon-128.png' |
| 131 | |
| 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 | # |
| 136 | html_theme_options = { |
| 137 | 'logo_only': True |
| 138 | } |
| 139 | |
| 140 | # Add any paths that contain custom static files (such as style sheets) here, |
| 141 | # relative to this directory. They are copied after the builtin static files, |
| 142 | # so a file named "default.css" will overwrite the builtin "default.css". |
| 143 | html_static_path = ['_static'] |
| 144 | |
| 145 | # Custom sidebar templates, must be a dictionary that maps document names |
| 146 | # to template names. |
| 147 | # |
| 148 | # The default sidebars (for documents that don't match any pattern) are |
| 149 | # defined by theme itself. Builtin themes are using these templates by |
| 150 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', |
| 151 | # 'searchbox.html']``. |
| 152 | # |
| 153 | # html_sidebars = {} |
| 154 | |
| 155 | # -- Options for HTMLHelp output --------------------------------------------- |
| 156 | |
| 157 | # Output file base name for HTML help builder. |
| 158 | htmlhelp_basename = 'AetherDocs' |
| 159 | |
| 160 | |
| 161 | # -- Options for LaTeX output ------------------------------------------------ |
| 162 | |
| 163 | latex_elements = { |
| 164 | # The paper size ('letterpaper' or 'a4paper'). |
| 165 | # |
| 166 | # 'papersize': 'letterpaper', |
| 167 | |
| 168 | # The font size ('10pt', '11pt' or '12pt'). |
| 169 | # |
| 170 | # 'pointsize': '10pt', |
| 171 | |
| 172 | # Additional stuff for the LaTeX preamble. |
| 173 | # |
| 174 | # 'preamble': '', |
| 175 | |
| 176 | # Latex figure (float) alignment |
| 177 | # |
| 178 | # 'figure_align': 'htbp', |
| 179 | } |
| 180 | |
| 181 | # Grouping the document tree into LaTeX files. List of tuples |
| 182 | # (source start file, target name, title, |
| 183 | # author, documentclass [howto, manual, or own class]). |
| 184 | latex_documents = [ |
| 185 | (master_doc, 'AetherDocs.tex', u'Aether Docs', |
| 186 | u'ONF', 'manual'), |
| 187 | ] |
| 188 | |
| 189 | |
| 190 | # -- Options for manual page output ------------------------------------------ |
| 191 | |
| 192 | # One entry per manual page. List of tuples |
| 193 | # (source start file, name, description, authors, manual section). |
| 194 | man_pages = [ |
| 195 | (master_doc, 'Aether Docs', u'Aether Docs', |
| 196 | [author], 1) |
| 197 | ] |
| 198 | |
| 199 | |
| 200 | # -- Options for Texinfo output ---------------------------------------------- |
| 201 | |
| 202 | # Grouping the document tree into Texinfo files. List of tuples |
| 203 | # (source start file, target name, title, author, |
| 204 | # dir menu entry, description, category) |
| 205 | texinfo_documents = [ |
| 206 | (master_doc, 'Aether Docs', u'Aether Docs', |
| 207 | author, 'AetherDocs', 'One line description of project.', |
| 208 | 'Miscellaneous'), |
| 209 | ] |
| 210 | |
| 211 | |
| 212 | # -- Options for Epub output ------------------------------------------------- |
| 213 | |
| 214 | # Bibliographic Dublin Core info. |
| 215 | epub_title = project |
| 216 | |
| 217 | # The unique identifier of the text. This can be a ISBN number |
| 218 | # or the project homepage. |
| 219 | # |
| 220 | # epub_identifier = '' |
| 221 | |
| 222 | # A unique identification for the text. |
| 223 | # |
| 224 | # epub_uid = '' |
| 225 | |
| 226 | # A list of files that should not be packed into the epub file. |
| 227 | epub_exclude_files = ['search.html'] |
| 228 | |
| 229 | |
| 230 | # -- Extension configuration ------------------------------------------------- |
| 231 | |
| 232 | # blockdiag/etc. config |
| 233 | |
| 234 | rackdiag_antialias = True |
| 235 | rackdiag_html_image_format = "SVG" |
| 236 | rackdiag_fontpath = [ |
| 237 | "_static/fonts/Inconsolata-Regular.ttf", |
| 238 | "_static/fonts/Inconsolata-Bold.ttf", |
| 239 | ] |
| 240 | |
| 241 | nwdiag_antialias = True |
| 242 | nwdiag_html_image_format = "SVG" |
| 243 | nwdiag_fontpath = [ |
| 244 | "_static/fonts/Inconsolata-Regular.ttf", |
| 245 | "_static/fonts/Inconsolata-Bold.ttf", |
| 246 | ] |
| 247 | |
| 248 | # -- Options for todo extension ---------------------------------------------- |
| 249 | # If true, `todo` and `todoList` produce output, else they produce nothing. |
| 250 | todo_include_todos = True |
| 251 | |
| 252 | # -- Options for linkcheck --------------------------------------------------- |
| 253 | # The link checker strips off .md from links and then complains |
| 254 | linkcheck_ignore = [ |
Zack Williams | 9e6c272 | 2021-09-20 16:38:32 -0700 | [diff] [blame] | 255 | r'https://jenkins\.opencord\.org/job/aether-member-only-jobs/.*', |
Wei-Yu Chen | 91d90de | 2021-10-18 22:06:12 +0800 | [diff] [blame] | 256 | r'https://jenkins.aetherproject.org/.*', |
| 257 | r'https://gerrit.opencord.org/.*', |
| 258 | r'https://sas.goog/.*', |
Scott Baker | db4527e | 2021-11-03 16:34:40 -0700 | [diff] [blame] | 259 | r'https://www.fs.com/.*', |
Scott Baker | 8ca8232 | 2022-01-26 09:19:31 -0800 | [diff] [blame] | 260 | r'https://velero.io/.*', |
Hyunsun Moon | d1e8733 | 2022-02-18 15:07:20 -0800 | [diff] [blame] | 261 | r'https://cloud.google.com/.*', |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 262 | ] |
| 263 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 264 | linkcheck_timeout = 3 |
| 265 | linkcheck_retries = 2 |
| 266 | |
Zack Williams | 34c30e5 | 2020-11-16 10:55:00 -0700 | [diff] [blame] | 267 | # -- options for Intersphinx extension --------------------------------------- |
| 268 | |
| 269 | intersphinx_mapping = { |
Zack Williams | 9026f53 | 2020-11-30 11:34:32 -0700 | [diff] [blame] | 270 | 'ansible': ('https://docs.ansible.com/ansible/latest', None), |
Zack Williams | 34c30e5 | 2020-11-16 10:55:00 -0700 | [diff] [blame] | 271 | 'sphinx': ('https://www.sphinx-doc.org/en/master', None), |
| 272 | 'trellis': ('https://docs.trellisfabric.org/master', None), |
Zack Williams | 44faef9 | 2022-03-08 22:07:49 -0700 | [diff] [blame] | 273 | 'sdcore': ('https://docs.sd-core.opennetworking.org/master', None), |
| 274 | 'sdran': ('https://docs.sd-ran.org/master', None), |
| 275 | 'sdfabric': ('https://docs.sd-fabric.org/master', None), |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 276 | 'sysapproach5g': ('https://5g.systemsapproach.org/', None), |
| 277 | 'sysapproachnet': ('https://book.systemsapproach.org/', None), |
| 278 | 'sysapproachsdn': ('https://sdn.systemsapproach.org/', None), |
Charles Chan | 770bb61 | 2022-03-02 12:34:04 -0800 | [diff] [blame] | 279 | 'sdfabric': ('https://docs.sd-fabric.org/master', None), |
Zack Williams | 34c30e5 | 2020-11-16 10:55:00 -0700 | [diff] [blame] | 280 | } |
| 281 | |
Zack Williams | 7f708f8 | 2020-07-07 12:18:20 -0700 | [diff] [blame] | 282 | def setup(app): |
| 283 | |
| 284 | app.add_css_file('css/rtd_theme_mods.css') |