blob: 04cb4b4bd3ec5349a76250918e5b27197ec25ae6 [file] [log] [blame]
Zack Williams071eda22019-05-15 18:19:51 -07001# -*- coding: utf-8 -*-
2#
3# Configuration file for the Sphinx documentation builder.
4#
5# This file does only contain a selection of the most common options. For a
6# full list see the documentation:
7# http://www.sphinx-doc.org/en/master/config
8
9# -- Path setup --------------------------------------------------------------
10
11# If extensions (or modules to document with autodoc) are in another directory,
12# add these directories to sys.path here. If the directory is relative to the
13# documentation root, use os.path.abspath to make it absolute, like shown here.
14#
15# import os
16# import sys
17# sys.path.insert(0, os.path.abspath('.'))
18
Zack Williams071eda22019-05-15 18:19:51 -070019# -- Project information -----------------------------------------------------
20
21project = u'VOLTHA Docs'
22copyright = u'2019, VOLTHA Contributors'
23author = u'VOLTHA Contributors'
24
25# The short X.Y version
Zack Williamse377eae2019-12-20 16:40:38 -070026version = "2.2.0"
Zack Williams071eda22019-05-15 18:19:51 -070027
28# The full version, including alpha/beta/rc tags
Zack Williams88df4742019-12-20 08:24:47 -070029release = version
Zack Williams071eda22019-05-15 18:19:51 -070030
31# -- General configuration ---------------------------------------------------
32
33# If your documentation needs a minimal Sphinx version, state it here.
34#
35# needs_sphinx = '1.0'
36
37# make all warnings errors
38warning_is_error = True
39
40# Add any Sphinx extension module names here, as strings. They can be
41# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
42# ones.
43extensions = [
44 'recommonmark',
45 'sphinx.ext.coverage',
46 'sphinx.ext.graphviz',
47 'sphinx.ext.ifconfig',
48 'sphinx.ext.mathjax',
49 'sphinx.ext.todo',
50 'sphinxcontrib.actdiag',
51 'sphinxcontrib.blockdiag',
52 'sphinxcontrib.nwdiag',
53 'sphinxcontrib.openapi',
54 'sphinxcontrib.packetdiag',
55 'sphinxcontrib.rackdiag',
56 'sphinxcontrib.seqdiag',
Zack Williamsc6460c22019-12-18 14:54:43 -070057 'sphinxcontrib.spelling',
Zack Williams071eda22019-05-15 18:19:51 -070058# 'sphinxcontrib.golangdomain',
59# 'autoapi.extension',
60]
61
62# API documentation
63# https://github.com/rtfd/sphinx-autoapi
64# https://sphinx-autoapi.readthedocs.io
65# autoapi_type = 'go'
66# autoapi_dirs = [
67# 'voltha-go/cli/util',
68# 'voltha-go/rw_core/config',
69# 'voltha-go/rw_core/core',
70# 'voltha-go/rw_core/graph',
71# 'voltha-go/rw_core/utils',
72# ]
73
Zack Williamsc6460c22019-12-18 14:54:43 -070074# Text files with lists of words that shouldn't fail the spellchecker:
75spelling_word_list_filename=['dict.txt', ]
76
Zack Williams88df4742019-12-20 08:24:47 -070077# SCVersioning prep target commands, run in each target directory
78scv_prep_commands = [
79 'ln -sf _root_/repos _target_/repos',
80 'make prep',
81]
82
Zack Williams071eda22019-05-15 18:19:51 -070083# Add any paths that contain templates here, relative to this directory.
84templates_path = ['_templates']
85
86# The suffix(es) of source filenames.
87# You can specify multiple suffix as a list of string:
88#
89# source_suffix = ['.rst', '.md']
90source_suffix = ['.rst', '.md']
91
92# The master toctree document.
93master_doc = 'index'
94
95# The language for content autogenerated by Sphinx. Refer to documentation
96# for a list of supported languages.
97#
98# This is also used if you do content translation via gettext catalogs.
99# Usually you set "language" from the command line for these cases.
100language = None
101
102# List of patterns, relative to source directory, that match files and
103# directories to ignore when looking for source files.
104# This pattern also affects html_static_path and html_extra_path.
105exclude_patterns = [
106 '*/LICENSE.md',
107 '*/vendor',
108 '.DS_Store',
109 'Thumbs.db',
110 '_build',
111 'doc_venv',
Andrea Campanella92bd59b2020-01-30 17:26:32 +0100112 'voltha-system-tests/vst_venv',
Andy Bavier39d67b12020-02-27 16:08:52 -0700113 'cord-tester/venv_cord',
114 'cord-tester/docs',
115 'cord-tester/src',
116 'cord-tester/README.md',
117 'cord-tester/cord-robot/README.rst',
Zack Williams071eda22019-05-15 18:19:51 -0700118 'repos',
119 'requirements.txt',
120 'bbsim/README.md',
Zack Williamsf2391542019-12-11 15:49:19 -0700121 'CODE_OF_CONDUCT.md',
122 '*/CODE_OF_CONDUCT.md',
Zack Williams071eda22019-05-15 18:19:51 -0700123]
124
125# The name of the Pygments (syntax highlighting) style to use.
126pygments_style = None
127
128# -- Options for HTML output -------------------------------------------------
129
130# The theme to use for HTML and HTML Help pages. See the documentation for
131# a list of builtin themes.
132#
133html_theme = 'sphinx_rtd_theme'
134
135# Theme options are theme-specific and customize the look and feel of a theme
136# further. For a list of options available for each theme, see the
137# documentation.
138#
139# html_theme_options = {}
140
141# Add any paths that contain custom static files (such as style sheets) here,
142# relative to this directory. They are copied after the builtin static files,
143# so a file named "default.css" will overwrite the builtin "default.css".
144html_static_path = ['_static']
145
146# Custom sidebar templates, must be a dictionary that maps document names
147# to template names.
148#
149# The default sidebars (for documents that don't match any pattern) are
150# defined by theme itself. Builtin themes are using these templates by
151# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
152# 'searchbox.html']``.
153#
154# html_sidebars = {}
155
156
157# -- Options for HTMLHelp output ---------------------------------------------
158
159# Output file base name for HTML help builder.
160htmlhelp_basename = 'VOLTHADocs'
161
162
163# -- Options for LaTeX output ------------------------------------------------
164
165latex_elements = {
166 # The paper size ('letterpaper' or 'a4paper').
167 #
168 # 'papersize': 'letterpaper',
169
170 # The font size ('10pt', '11pt' or '12pt').
171 #
172 # 'pointsize': '10pt',
173
174 # Additional stuff for the LaTeX preamble.
175 #
176 # 'preamble': '',
177
178 # Latex figure (float) alignment
179 #
180 # 'figure_align': 'htbp',
181}
182
183# Grouping the document tree into LaTeX files. List of tuples
184# (source start file, target name, title,
185# author, documentclass [howto, manual, or own class]).
186latex_documents = [
187 (master_doc, 'VOLTHADocs.tex', u'VOLTHA Docs',
188 u'VOLTHA Team', 'manual'),
189]
190
191
192# -- Options for manual page output ------------------------------------------
193
194# One entry per manual page. List of tuples
195# (source start file, name, description, authors, manual section).
196man_pages = [
197 (master_doc, 'VOLTHA Docs', u'VOLTHA Docs',
198 [author], 1)
199]
200
201
202# -- Options for Texinfo output ----------------------------------------------
203
204# Grouping the document tree into Texinfo files. List of tuples
205# (source start file, target name, title, author,
206# dir menu entry, description, category)
207texinfo_documents = [
208 (master_doc, 'VOLTHA Docs', u'VOLTHA Docs',
209 author, 'VOLTHADocs', 'One line description of project.',
210 'Miscellaneous'),
211]
212
213
214# -- Options for Epub output -------------------------------------------------
215
216# Bibliographic Dublin Core info.
217epub_title = project
218
219# The unique identifier of the text. This can be a ISBN number
220# or the project homepage.
221#
222# epub_identifier = ''
223
224# A unique identification for the text.
225#
226# epub_uid = ''
227
228# A list of files that should not be packed into the epub file.
229epub_exclude_files = ['search.html']
230
231
232# -- Extension configuration -------------------------------------------------
233
234# blockdiag/etc. config
235
236rackdiag_antialias = True
237rackdiag_html_image_format = "SVG"
238rackdiag_fontpath = [
239 "_static/fonts/Inconsolata-Regular.ttf",
240 "_static/fonts/Inconsolata-Bold.ttf",
241]
242
243nwdiag_antialias = True
244nwdiag_html_image_format = "SVG"
245nwdiag_fontpath = [
246 "_static/fonts/Inconsolata-Regular.ttf",
247 "_static/fonts/Inconsolata-Bold.ttf",
248]
249
250# -- Options for todo extension ----------------------------------------------
251# If true, `todo` and `todoList` produce output, else they produce nothing.
252todo_include_todos = True
253
Andrea Campanella92bd59b2020-01-30 17:26:32 +0100254# -- Options for linkcheck ---------------------------------------------------
255# The link checker strips off .md from links and then complains
256linkcheck_ignore = [r'https://github.com/ciena/kind-voltha/blob/master/README',
257 r'https://github.com/opencord/voltctl/blob/master/LICENSE',
258 r'https://github.com/ciena/kind-voltha#voltha-up-configuration-options']
259
Zack Williams071eda22019-05-15 18:19:51 -0700260# -- Configure recommonmark to use AutoStructify -----------------------------
261# Docs: https://recommonmark.readthedocs.io/en/latest/auto_structify.html
262
263import recommonmark
264from recommonmark.transform import AutoStructify
265
266github_doc_root = 'https://github.com/opencord/voltha-docs'
267
268def setup(app):
269
270 app.add_css_file('css/rtd_theme_mods.css')
271
272 app.add_config_value('recommonmark_config', {
273 'url_resolver': lambda url: github_doc_root + url,
274 'auto_toc_tree_section': 'Contents',
275 }, True)
276
277 app.add_transform(AutoStructify)