blob: 177c948a71ab40cab7c6fa6fa20b999e72206c99 [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',
Zack Williams071eda22019-05-15 18:19:51 -0700113 'repos',
114 'requirements.txt',
115 'bbsim/README.md',
Zack Williamsf2391542019-12-11 15:49:19 -0700116 'CODE_OF_CONDUCT.md',
117 '*/CODE_OF_CONDUCT.md',
Zack Williams071eda22019-05-15 18:19:51 -0700118]
119
120# The name of the Pygments (syntax highlighting) style to use.
121pygments_style = None
122
123# -- Options for HTML output -------------------------------------------------
124
125# The theme to use for HTML and HTML Help pages. See the documentation for
126# a list of builtin themes.
127#
128html_theme = 'sphinx_rtd_theme'
129
130# Theme options are theme-specific and customize the look and feel of a theme
131# further. For a list of options available for each theme, see the
132# documentation.
133#
134# html_theme_options = {}
135
136# Add any paths that contain custom static files (such as style sheets) here,
137# relative to this directory. They are copied after the builtin static files,
138# so a file named "default.css" will overwrite the builtin "default.css".
139html_static_path = ['_static']
140
141# Custom sidebar templates, must be a dictionary that maps document names
142# to template names.
143#
144# The default sidebars (for documents that don't match any pattern) are
145# defined by theme itself. Builtin themes are using these templates by
146# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
147# 'searchbox.html']``.
148#
149# html_sidebars = {}
150
151
152# -- Options for HTMLHelp output ---------------------------------------------
153
154# Output file base name for HTML help builder.
155htmlhelp_basename = 'VOLTHADocs'
156
157
158# -- Options for LaTeX output ------------------------------------------------
159
160latex_elements = {
161 # The paper size ('letterpaper' or 'a4paper').
162 #
163 # 'papersize': 'letterpaper',
164
165 # The font size ('10pt', '11pt' or '12pt').
166 #
167 # 'pointsize': '10pt',
168
169 # Additional stuff for the LaTeX preamble.
170 #
171 # 'preamble': '',
172
173 # Latex figure (float) alignment
174 #
175 # 'figure_align': 'htbp',
176}
177
178# Grouping the document tree into LaTeX files. List of tuples
179# (source start file, target name, title,
180# author, documentclass [howto, manual, or own class]).
181latex_documents = [
182 (master_doc, 'VOLTHADocs.tex', u'VOLTHA Docs',
183 u'VOLTHA Team', 'manual'),
184]
185
186
187# -- Options for manual page output ------------------------------------------
188
189# One entry per manual page. List of tuples
190# (source start file, name, description, authors, manual section).
191man_pages = [
192 (master_doc, 'VOLTHA Docs', u'VOLTHA Docs',
193 [author], 1)
194]
195
196
197# -- Options for Texinfo output ----------------------------------------------
198
199# Grouping the document tree into Texinfo files. List of tuples
200# (source start file, target name, title, author,
201# dir menu entry, description, category)
202texinfo_documents = [
203 (master_doc, 'VOLTHA Docs', u'VOLTHA Docs',
204 author, 'VOLTHADocs', 'One line description of project.',
205 'Miscellaneous'),
206]
207
208
209# -- Options for Epub output -------------------------------------------------
210
211# Bibliographic Dublin Core info.
212epub_title = project
213
214# The unique identifier of the text. This can be a ISBN number
215# or the project homepage.
216#
217# epub_identifier = ''
218
219# A unique identification for the text.
220#
221# epub_uid = ''
222
223# A list of files that should not be packed into the epub file.
224epub_exclude_files = ['search.html']
225
226
227# -- Extension configuration -------------------------------------------------
228
229# blockdiag/etc. config
230
231rackdiag_antialias = True
232rackdiag_html_image_format = "SVG"
233rackdiag_fontpath = [
234 "_static/fonts/Inconsolata-Regular.ttf",
235 "_static/fonts/Inconsolata-Bold.ttf",
236]
237
238nwdiag_antialias = True
239nwdiag_html_image_format = "SVG"
240nwdiag_fontpath = [
241 "_static/fonts/Inconsolata-Regular.ttf",
242 "_static/fonts/Inconsolata-Bold.ttf",
243]
244
245# -- Options for todo extension ----------------------------------------------
246# If true, `todo` and `todoList` produce output, else they produce nothing.
247todo_include_todos = True
248
Andrea Campanella92bd59b2020-01-30 17:26:32 +0100249# -- Options for linkcheck ---------------------------------------------------
250# The link checker strips off .md from links and then complains
251linkcheck_ignore = [r'https://github.com/ciena/kind-voltha/blob/master/README',
252 r'https://github.com/opencord/voltctl/blob/master/LICENSE',
253 r'https://github.com/ciena/kind-voltha#voltha-up-configuration-options']
254
Zack Williams071eda22019-05-15 18:19:51 -0700255# -- Configure recommonmark to use AutoStructify -----------------------------
256# Docs: https://recommonmark.readthedocs.io/en/latest/auto_structify.html
257
258import recommonmark
259from recommonmark.transform import AutoStructify
260
261github_doc_root = 'https://github.com/opencord/voltha-docs'
262
263def setup(app):
264
265 app.add_css_file('css/rtd_theme_mods.css')
266
267 app.add_config_value('recommonmark_config', {
268 'url_resolver': lambda url: github_doc_root + url,
269 'auto_toc_tree_section': 'Contents',
270 }, True)
271
272 app.add_transform(AutoStructify)