Merge "Add oxygen m0 status for projects int/dist, etc."
[docs.git] / docs / conf.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # OpenDaylight Documentation documentation build configuration file, created by
5 # sphinx-quickstart on Mon Mar 28 14:20:08 2016.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15
16 import sys
17 import os
18 import time
19 import sphinx_bootstrap_theme
20
21 # If extensions (or modules to document with autodoc) are in another directory,
22 # add these directories to sys.path here. If the directory is relative to the
23 # documentation root, use os.path.abspath to make it absolute, like shown here.
24 sys.path.insert(0, os.path.abspath('submodules/spectrometer/server'))
25
26 # -- General configuration ------------------------------------------------
27
28 # If your documentation needs a minimal Sphinx version, state it here.
29 #needs_sphinx = '1.0'
30
31 # Add any Sphinx extension module names here, as strings. They can be
32 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33 # ones.
34 extensions = ['sphinx.ext.autodoc','sphinx.ext.graphviz']
35
36 # Disable javasphinx generation until we have a solution to long build
37 # times. readthedocs timesout after 902 seconds.
38 javasphinx_available = False
39 try:
40     import javasphinx
41     javasphinx_available = True
42     extensions.append('javasphinx')
43 except ImportError, e:
44     pass
45
46 # Add any paths that contain templates here, relative to this directory.
47 templates_path = ['_templates']
48
49 # The suffix(es) of source filenames.
50 # You can specify multiple suffix as a list of string:
51 # source_suffix = ['.rst', '.md']
52 source_suffix = '.rst'
53
54 # The encoding of source files.
55 #source_encoding = 'utf-8-sig'
56
57 # The master toctree document.
58 master_doc = 'index'
59
60 # General information about the project.
61 project = 'OpenDaylight Documentation'
62 copyright = '2016-{}, OpenDaylight Project'.format(time.strftime("%Y"))
63 author = 'OpenDaylight Project'
64
65 # The version info for the project you're documenting, acts as replacement for
66 # |version| and |release|, also used in various other places throughout the
67 # built documents.
68 #
69 # The short X.Y version.
70 version = 'Oxygen'
71 # The full version, including alpha/beta/rc tags.
72 release = 'Oxygen'
73
74 # The language for content autogenerated by Sphinx. Refer to documentation
75 # for a list of supported languages.
76 #
77 # This is also used if you do content translation via gettext catalogs.
78 # Usually you set "language" from the command line for these cases.
79 language = None
80
81 # There are two options for replacing |today|: either, you set today to some
82 # non-false value, then it is used:
83 #today = ''
84 # Else, today_fmt is used as the format for a strftime call.
85 #today_fmt = '%B %d, %Y'
86
87 # List of patterns, relative to source directory, that match files and
88 # directories to ignore when looking for source files.
89 # This patterns also effect to html_static_path and html_extra_path
90 exclude_patterns = []
91
92 # The reST default role (used for this markup: `text`) to use for all
93 # documents.
94 #default_role = None
95
96 # If true, '()' will be appended to :func: etc. cross-reference text.
97 #add_function_parentheses = True
98
99 # If true, the current module name will be prepended to all description
100 # unit titles (such as .. function::).
101 #add_module_names = True
102
103 # If true, sectionauthor and moduleauthor directives will be shown in the
104 # output. They are ignored by default.
105 #show_authors = False
106
107 # The name of the Pygments (syntax highlighting) style to use.
108 pygments_style = 'sphinx'
109
110 # A list of ignored prefixes for module index sorting.
111 #modindex_common_prefix = []
112
113 # If true, keep warnings as "system message" paragraphs in the built documents.
114 #keep_warnings = False
115
116 # If true, `todo` and `todoList` produce output, else they produce nothing.
117 todo_include_todos = False
118
119
120 # -- Options for HTML output ----------------------------------------------
121
122 # The theme to use for HTML and HTML Help pages.  See the documentation for
123 # a list of builtin themes.
124 html_theme = 'bootstrap'
125
126 # Theme options are theme-specific and customize the look and feel of a theme
127 # further.  For a list of options available for each theme, see the
128 # documentation.
129 #html_theme_options = {}
130 html_theme_options = {
131     'bootswatch_theme': "united",
132     'navbar_sidebarrel': False,
133     'source_link_position': "footer",
134 }
135
136 # Add any paths that contain custom themes here, relative to this directory.
137 #html_theme_path = []
138 html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
139
140 # The name for this set of Sphinx documents.
141 # "<project> v<release> documentation" by default.
142 #html_title = 'OpenDaylight Documentation v0.3.0'
143
144 # A shorter title for the navigation bar.  Default is the same as html_title.
145 #html_short_title = None
146
147 # The name of an image file (relative to this directory) to place at the top
148 # of the sidebar.
149 html_logo = '_static/odl_small.png'
150
151 # The name of an image file (relative to this directory) to use as a favicon of
152 # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
153 # pixels large.
154 html_favicon = 'favicon.ico'
155
156 # Add any paths that contain custom static files (such as style sheets) here,
157 # relative to this directory. They are copied after the builtin static files,
158 # so a file named "default.css" will overwrite the builtin "default.css".
159 html_static_path = ['_static']
160
161 # Add any extra paths that contain custom files (such as robots.txt or
162 # .htaccess) here, relative to this directory. These files are copied
163 # directly to the root of the documentation.
164 #html_extra_path = []
165
166 # If not None, a 'Last updated on:' timestamp is inserted at every page
167 # bottom, using the given strftime format.
168 # The empty string is equivalent to '%b %d, %Y'.
169 #html_last_updated_fmt = None
170
171 # If true, SmartyPants will be used to convert quotes and dashes to
172 # typographically correct entities.
173 #html_use_smartypants = True
174
175 # Custom sidebar templates, maps document names to template names.
176 html_sidebars = {
177     '**': ['localtoc.html', 'relations.html'],
178 }
179
180 # Additional templates that should be rendered to pages, maps page names to
181 # template names.
182 #html_additional_pages = {}
183
184 # If false, no module index is generated.
185 #html_domain_indices = True
186
187 # If false, no index is generated.
188 #html_use_index = True
189
190 # If true, the index is split into individual pages for each letter.
191 #html_split_index = False
192
193 # If true, links to the reST sources are added to the pages.
194 #html_show_sourcelink = True
195
196 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
197 #html_show_sphinx = True
198
199 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
200 #html_show_copyright = True
201
202 # If true, an OpenSearch description file will be output, and all pages will
203 # contain a <link> tag referring to it.  The value of this option must be the
204 # base URL from which the finished HTML is served.
205 #html_use_opensearch = ''
206
207 # This is the file name suffix for HTML files (e.g. ".xhtml").
208 #html_file_suffix = None
209
210 # Language to be used for generating the HTML full-text search index.
211 # Sphinx supports the following languages:
212 #   'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
213 #   'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
214 #html_search_language = 'en'
215
216 # A dictionary with options for the search language support, empty by default.
217 # 'ja' uses this config value.
218 # 'zh' user can custom change `jieba` dictionary path.
219 #html_search_options = {'type': 'default'}
220
221 # The name of a javascript file (relative to the configuration directory) that
222 # implements a search results scorer. If empty, the default will be used.
223 #html_search_scorer = 'scorer.js'
224
225 # Output file base name for HTML help builder.
226 htmlhelp_basename = 'OpenDaylightDocumentationdoc'
227
228 # -- Options for LaTeX output ---------------------------------------------
229
230 latex_elements = {
231 # The paper size ('letterpaper' or 'a4paper').
232 #'papersize': 'letterpaper',
233
234 # The font size ('10pt', '11pt' or '12pt').
235 #'pointsize': '10pt',
236
237 # Additional stuff for the LaTeX preamble.
238 #'preamble': '',
239
240 # Latex figure (float) alignment
241 #'figure_align': 'htbp',
242 }
243
244 # Grouping the document tree into LaTeX files. List of tuples
245 # (source start file, target name, title,
246 #  author, documentclass [howto, manual, or own class]).
247 latex_documents = [
248     (master_doc, 'OpenDaylightDocumentation.tex', 'OpenDaylight Documentation Documentation',
249      'OpenDaylight Project', 'manual'),
250 ]
251
252 # The name of an image file (relative to this directory) to place at the top of
253 # the title page.
254 #latex_logo = None
255
256 # For "manual" documents, if this is true, then toplevel headings are parts,
257 # not chapters.
258 #latex_use_parts = False
259
260 # If true, show page references after internal links.
261 #latex_show_pagerefs = False
262
263 # If true, show URL addresses after external links.
264 #latex_show_urls = False
265
266 # Documents to append as an appendix to all manuals.
267 #latex_appendices = []
268
269 # If false, no module index is generated.
270 #latex_domain_indices = True
271
272
273 # -- Options for manual page output ---------------------------------------
274
275 # One entry per manual page. List of tuples
276 # (source start file, name, description, authors, manual section).
277 man_pages = [
278     (master_doc, 'opendaylightdocumentation', 'OpenDaylight Documentation Documentation',
279      [author], 1)
280 ]
281
282 # If true, show URL addresses after external links.
283 #man_show_urls = False
284
285
286 # -- Options for Texinfo output -------------------------------------------
287
288 # Grouping the document tree into Texinfo files. List of tuples
289 # (source start file, target name, title, author,
290 #  dir menu entry, description, category)
291 texinfo_documents = [
292     (master_doc, 'OpenDaylightDocumentation', 'OpenDaylight Documentation Documentation',
293      author, 'OpenDaylightDocumentation', 'One line description of project.',
294      'Miscellaneous'),
295 ]
296
297 # Documents to append as an appendix to all manuals.
298 #texinfo_appendices = []
299
300 # If false, no module index is generated.
301 #texinfo_domain_indices = True
302
303 # How to display URL addresses: 'footnote', 'no', or 'inline'.
304 #texinfo_show_urls = 'footnote'
305
306 # If true, do not generate a @detailmenu in the "Top" node's menu.
307 #texinfo_no_detailmenu = False
308
309
310 linkcheck_ignore = [
311     # Ignore jenkins because it's often slow to respond.
312     'https://jenkins.opendaylight.org/releng',
313     'https://jenkins.opendaylight.org/sandbox',
314     'http://\$CONTROL_HOST:8181/dlux/index.html',
315     # The '#' in the path makes sphinx think it's an anchor
316     'https://git.opendaylight.org/gerrit/#/admin/projects/releng/builder',
317 ]
318
319 nitpicky = True
320
321 import platform
322 if platform.system() != 'Windows':
323
324     # Build integration stuff
325     import subprocess
326
327     subprocess.call(["./build-integration-robot-libdoc.sh"])
328
329     # Disable javasphinx generation until we have a solution to long build
330     # times. readthedocs timesout after 902 seconds.
331     if javasphinx_available:
332         subprocess.call(["./generate-javaapidoc.sh"])
333