Debian Codegraph @

doc/conf.py

raw
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 #
4 # DXfile documentation build configuration file, created by
5 # sphinx-quickstart on Fri Mar 13 16:29:32 2015.
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
19 # If extensions (or modules to document with autodoc) are in another directory,
20 # add these directories to sys.path here. If the directory is relative to the
21 # documentation root, use os.path.abspath to make it absolute, like shown here.
22 sys.path.insert(0, os.path.abspath('..'))
23
24 # -- General configuration ------------------------------------------------
25
26 # If your documentation needs a minimal Sphinx version, state it here.
27 #needs_sphinx = '1.0'
28
29 # Add any Sphinx extension module names here, as strings. They can be
30 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31 # ones.
32 extensions = [
33 'sphinx.ext.autodoc',
34 'sphinx.ext.mathjax',
35 'sphinx.ext.todo',
36 'sphinx.ext.autosummary',
37 'sphinx.ext.napoleon',
38 'sphinxcontrib.bibtex',
39 'sphinx.ext.viewcode']
40
41 # Napoleon settings
42 napoleon_google_docstring = True
43 napoleon_numpy_docstring = True
44 napoleon_include_private_with_doc = False
45 napoleon_include_special_with_doc = False
46 napoleon_use_admonition_for_examples = False
47 napoleon_use_admonition_for_notes = False
48 napoleon_use_admonition_for_references = False
49 napoleon_use_ivar = False
50 napoleon_use_param = False
51 napoleon_use_rtype = False
52
53 todo_include_todos=True
54
55 # Add any paths that contain templates here, relative to this directory.
56 templates_path = ['_templates']
57
58 # The suffix of source filenames.
59 source_suffix = '.rst'
60
61 # The encoding of source files.
62 #source_encoding = 'utf-8-sig'
63
64 # The master toctree document.
65 master_doc = 'index'
66
67 # General information about the project.
68 Argonne = u'Argonne National Laboratory'
69 project = u'DXfile'
70 copyright = u'2016, ' + Argonne
71
72 # The version info for the project you're documenting, acts as replacement for
73 # |version| and |release|, also used in various other places throughout the
74 # built documents.
75 #
76 # The short X.Y version.
77 version = open(os.path.join('..', 'VERSION')).read().strip()
78 # The full version, including alpha/beta/rc tags.
79 release = version
80
81 # The language for content autogenerated by Sphinx. Refer to documentation
82 # for a list of supported languages.
83 #language = None
84
85 # There are two options for replacing |today|: either, you set today to some
86 # non-false value, then it is used:
87 #today = ''
88 # Else, today_fmt is used as the format for a strftime call.
89 #today_fmt = '%B %d, %Y'
90
91 # List of patterns, relative to source directory, that match files and
92 # directories to ignore when looking for source files.
93 exclude_patterns = ['_build']
94
95 # The reST default role (used for this markup: `text`) to use for all
96 # documents.
97 #default_role = None
98
99 # If true, '()' will be appended to :func: etc. cross-reference text.
100 #add_function_parentheses = True
101
102 # If true, the current module name will be prepended to all description
103 # unit titles (such as .. function::).
104 #add_module_names = True
105
106 # If true, sectionauthor and moduleauthor directives will be shown in the
107 # output. They are ignored by default.
108 show_authors = False
109
110 # The name of the Pygments (syntax highlighting) style to use.
111 pygments_style = 'sphinx'
112
113 # A list of ignored prefixes for module index sorting.
114 #modindex_common_prefix = []
115
116 # If true, keep warnings as "system message" paragraphs in the built documents.
117 #keep_warnings = 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 = 'default'
125
126 # on_rtd is whether we are on readthedocs.org
127 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
128
129 if not on_rtd: # only import and set the theme if we're building docs locally
130 import sphinx_rtd_theme
131 html_theme = 'sphinx_rtd_theme'
132 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
133
134 # Theme options are theme-specific and customize the look and feel of a theme
135 # further. For a list of options available for each theme, see the
136 # documentation.
137 #html_theme_options = {}
138
139 # Add any paths that contain custom themes here, relative to this directory.
140 #html_theme_path = []
141
142 # The name for this set of Sphinx documents. If None, it defaults to
143 # "<project> v<release> documentation".
144 #html_title = None
145
146 # A shorter title for the navigation bar. Default is the same as html_title.
147 #html_short_title = None
148
149 # The name of an image file (relative to this directory) to place at the top
150 # of the sidebar.
151 #html_logo = None
152
153 # The name of an image file (within the static path) to use as favicon of the
154 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
155 # pixels large.
156 #html_favicon = None
157
158 # Add any paths that contain custom static files (such as style sheets) here,
159 # relative to this directory. They are copied after the builtin static files,
160 # so a file named "default.css" will overwrite the builtin "default.css".
161 # html_static_path = ['_static']
162
163 # Add any extra paths that contain custom files (such as robots.txt or
164 # .htaccess) here, relative to this directory. These files are copied
165 # directly to the root of the documentation.
166 #html_extra_path = []
167
168 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
169 # using the given strftime format.
170 #html_last_updated_fmt = '%b %d, %Y'
171
172 # If true, SmartyPants will be used to convert quotes and dashes to
173 # typographically correct entities.
174 #html_use_smartypants = True
175
176 # Custom sidebar templates, maps document names to template names.
177 #html_sidebars = {}
178
179 # Additional templates that should be rendered to pages, maps page names to
180 # template names.
181 #html_additional_pages = {}
182
183 # If false, no module index is generated.
184 #html_domain_indices = True
185
186 # If false, no index is generated.
187 #html_use_index = True
188
189 # If true, the index is split into individual pages for each letter.
190 #html_split_index = False
191
192 # If true, links to the reST sources are added to the pages.
193 #html_show_sourcelink = True
194
195 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
196 #html_show_sphinx = True
197
198 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
199 #html_show_copyright = True
200
201 # If true, an OpenSearch description file will be output, and all pages will
202 # contain a <link> tag referring to it. The value of this option must be the
203 # base URL from which the finished HTML is served.
204 #html_use_opensearch = ''
205
206 # This is the file name suffix for HTML files (e.g. ".xhtml").
207 #html_file_suffix = None
208
209 # Output file base name for HTML help builder.
210 htmlhelp_basename = project+'doc'
211
212
213 # -- Options for LaTeX output ---------------------------------------------
214
215 latex_elements = {
216 # The paper size ('letterpaper' or 'a4paper').
217 #'papersize': 'letterpaper',
218
219 # The font size ('10pt', '11pt' or '12pt').
220 #'pointsize': '10pt',
221
222 # Additional stuff for the LaTeX preamble.
223 #'preamble': '',
224 }
225
226 # Grouping the document tree into LaTeX files. List of tuples
227 # (source start file, target name, title,
228 # author, documentclass [howto, manual, or own class]).
229 latex_documents = [
230 ('index',
231 project+'.tex',
232 project+u' Documentation',
233 Argonne,'manual'),
234 ]
235
236 # The name of an image file (relative to this directory) to place at the top of
237 # the title page.
238 #latex_logo = None
239
240 # For "manual" documents, if this is true, then toplevel headings are parts,
241 # not chapters.
242 #latex_use_parts = False
243
244 # If true, show page references after internal links.
245 #latex_show_pagerefs = False
246
247 # If true, show URL addresses after external links.
248 #latex_show_urls = False
249
250 # Documents to append as an appendix to all manuals.
251 #latex_appendices = []
252
253 # If false, no module index is generated.
254 #latex_domain_indices = True
255
256
257 # -- Options for manual page output ---------------------------------------
258
259 # One entry per manual page. List of tuples
260 # (source start file, name, description, authors, manual section).
261 man_pages = [
262 ('index',project,
263 project+u' Documentation',
264 [Argonne,],
265 1)
266 ]
267
268 # If true, show URL addresses after external links.
269 #man_show_urls = False
270
271
272 # -- Options for Texinfo output -------------------------------------------
273
274 # Grouping the document tree into Texinfo files. List of tuples
275 # (source start file, target name, title, author,
276 # dir menu entry, description, category)
277 texinfo_documents = [
278 ('index',
279 project,
280 project+u' Documentation',
281 Argonne,
282 project,
283 'Scientific Data Exchange'),
284 ]
285
286 # Documents to append as an appendix to all manuals.
287 #texinfo_appendices = []
288
289 # If false, no module index is generated.
290 #texinfo_domain_indices = True
291
292 # How to display URL addresses: 'footnote', 'no', or 'inline'.
293 #texinfo_show_urls = 'footnote'
294
295 # If true, do not generate a @detailmenu in the "Top" node's menu.
296 #ztexinfo_no_detailmenu = False
297
298 # picked from http://read-the-docs.readthedocs.org/en/latest/faq.html
299 class Mock(object):
300
301 __all__ = []
302
303 def __init__(self, *args, **kwargs):
304 pass
305
306 def __call__(self, *args, **kwargs):
307 return Mock()
308
309 @classmethod
310 def __getattr__(cls, name):
311 return Mock()
312 def __mul__(self, other):
313 return Mock()
314 def __rmul__(self, other):
315 return Mock()
316 def __pow__(self, other):
317 return Mock()
318 def __div__(self, other):
319 return Mock()
320 def __add__(self, other):
321 return Mock()
322 def __radd__(self, other):
323 return Mock()
324
325
326 MOCK_MODULES = ['h5py']
327
328 for mod_name in MOCK_MODULES:
329 sys.modules[mod_name] = Mock()