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