Debian Codegraph @

docs/conf.py

raw symbols SCIP
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # bonsai documentation build configuration file, created by
5 # sphinx-quickstart on Sat Jan 18 21:30:25 2014.
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 sys.path[0:0] = [os.path.abspath('..')]
20
21 # For read-the-docs: mocking the _bonsai module.
22 from unittest.mock import MagicMock
23
24 class Mock(MagicMock):
25 @classmethod
26 def __getattr__(cls, name):
27 # A hack to get the objects implemented in C.
28 if name == 'ldapconnection':
29 return object
30 if name == 'ldapentry':
31 return object
32 if name == 'ldapsearchiter':
33 return object
34
35 MOCK_MODULES = ['src.bonsai._bonsai', 'bonsai', 'bonsai._bonsai', 'bonsai.asyncio']
36 try:
37 import typing
38 except ImportError:
39 MOCK_MODULES.append('typing')
40 sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
41
42
43 import src.bonsai as bonsai
44 #from src.bonsai import asyncio as bonsai_asyncio
45 #from src.bonsai import ldaif as bonsai_ldif
46
47 sys.modules['bonsai'] = bonsai
48 sys.modules['bonsai.asyncio'] = bonsai.asyncio
49
50 autodoc_mock_imports = ["gevent", "tornado", "trio"]
51
52 # If extensions (or modules to document with autodoc) are in another directory,
53 # add these directories to sys.path here. If the directory is relative to the
54 # documentation root, use os.path.abspath to make it absolute, like shown here.
55 #sys.path.insert(0, os.path.abspath('.'))
56
57 # -- General configuration ------------------------------------------------
58
59 # If your documentation needs a minimal Sphinx version, state it here.
60 #needs_sphinx = '1.0'
61
62 # Add any Sphinx extension module names here, as strings. They can be
63 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
64 # ones.
65 extensions = [
66 'sphinx.ext.autodoc',
67 'sphinx.ext.doctest',
68 ]
69
70 # Add any paths that contain templates here, relative to this directory.
71 templates_path = ['_templates']
72
73 # The suffix of source filenames.
74 source_suffix = '.rst'
75
76 # The encoding of source files.
77 #source_encoding = 'utf-8-sig'
78
79 # The master toctree document.
80 master_doc = 'index'
81
82 # General information about the project.
83 project = 'bonsai'
84 copyright = '2014-2024, noirello'
85
86 # The version info for the project you're documenting, acts as replacement for
87 # |version| and |release|, also used in various other places throughout the
88 # built documents.
89 #
90 # The short X.Y version.
91 version = bonsai.__version__
92 # The full version, including alpha/beta/rc tags.
93 release = bonsai.__version__
94
95 # The language for content autogenerated by Sphinx. Refer to documentation
96 # for a list of supported languages.
97 #language = None
98
99 # There are two options for replacing |today|: either, you set today to some
100 # non-false value, then it is used:
101 #today = ''
102 # Else, today_fmt is used as the format for a strftime call.
103 #today_fmt = '%B %d, %Y'
104
105 # List of patterns, relative to source directory, that match files and
106 # directories to ignore when looking for source files.
107 exclude_patterns = ['_build']
108
109 # The reST default role (used for this markup: `text`) to use for all
110 # documents.
111 #default_role = None
112
113 # If true, '()' will be appended to :func: etc. cross-reference text.
114 #add_function_parentheses = True
115
116 # If true, the current module name will be prepended to all description
117 # unit titles (such as .. function::).
118 #add_module_names = True
119
120 # If true, sectionauthor and moduleauthor directives will be shown in the
121 # output. They are ignored by default.
122 #show_authors = False
123
124 # The name of the Pygments (syntax highlighting) style to use.
125 pygments_style = 'sphinx'
126
127 # A list of ignored prefixes for module index sorting.
128 #modindex_common_prefix = []
129
130 # If true, keep warnings as "system message" paragraphs in the built documents.
131 #keep_warnings = False
132
133
134 # -- Options for HTML output ----------------------------------------------
135
136 # The theme to use for HTML and HTML Help pages. See the documentation for
137 # a list of builtin themes.
138 html_theme = 'furo'
139 #html_theme = 'alabaster'
140
141 # Theme options are theme-specific and customize the look and feel of a theme
142 # further. For a list of options available for each theme, see the
143 # documentation.
144 #html_theme_options = {}
145
146 # Add any paths that contain custom themes here, relative to this directory.
147 #html_theme_path = []
148
149 # The name for this set of Sphinx documents. If None, it defaults to
150 # "<project> v<release> documentation".
151 #html_title = None
152
153 # A shorter title for the navigation bar. Default is the same as html_title.
154 #html_short_title = None
155
156 # The name of an image file (relative to this directory) to place at the top
157 # of the sidebar.
158 #html_logo = None
159
160 # The name of an image file (within the static path) to use as favicon of the
161 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
162 # pixels large.
163 #html_favicon = None
164
165 # Add any paths that contain custom static files (such as style sheets) here,
166 # relative to this directory. They are copied after the builtin static files,
167 # so a file named "default.css" will overwrite the builtin "default.css".
168 html_static_path = ['_static']
169
170 # Add any extra paths that contain custom files (such as robots.txt or
171 # .htaccess) here, relative to this directory. These files are copied
172 # directly to the root of the documentation.
173 #html_extra_path = []
174
175 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
176 # using the given strftime format.
177 #html_last_updated_fmt = '%b %d, %Y'
178
179 # If true, SmartyPants will be used to convert quotes and dashes to
180 # typographically correct entities.
181 #html_use_smartypants = True
182
183 # Custom sidebar templates, maps document names to template names.
184 #html_sidebars = {}
185
186 # Additional templates that should be rendered to pages, maps page names to
187 # template names.
188 #html_additional_pages = {}
189
190 # If false, no module index is generated.
191 #html_domain_indices = True
192
193 # If false, no index is generated.
194 #html_use_index = True
195
196 # If true, the index is split into individual pages for each letter.
197 #html_split_index = False
198
199 # If true, links to the reST sources are added to the pages.
200 #html_show_sourcelink = True
201
202 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
203 #html_show_sphinx = True
204
205 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
206 #html_show_copyright = True
207
208 # If true, an OpenSearch description file will be output, and all pages will
209 # contain a <link> tag referring to it. The value of this option must be the
210 # base URL from which the finished HTML is served.
211 #html_use_opensearch = ''
212
213 # This is the file name suffix for HTML files (e.g. ".xhtml").
214 #html_file_suffix = None
215
216 # Output file base name for HTML help builder.
217 htmlhelp_basename = 'bonsaidoc'
218
219
220 # -- Options for LaTeX output ---------------------------------------------
221
222 latex_elements = {
223 # The paper size ('letterpaper' or 'a4paper').
224 #'papersize': 'letterpaper',
225
226 # The font size ('10pt', '11pt' or '12pt').
227 #'pointsize': '10pt',
228
229 # Additional stuff for the LaTeX preamble.
230 #'preamble': '',
231 }
232
233 # Grouping the document tree into LaTeX files. List of tuples
234 # (source start file, target name, title,
235 # author, documentclass [howto, manual, or own class]).
236 latex_documents = [
237 ('index', 'bonasi.tex', 'bonsai Documentation',
238 'noirello', 'manual'),
239 ]
240
241 # The name of an image file (relative to this directory) to place at the top of
242 # the title page.
243 #latex_logo = None
244
245 # For "manual" documents, if this is true, then toplevel headings are parts,
246 # not chapters.
247 #latex_use_parts = False
248
249 # If true, show page references after internal links.
250 #latex_show_pagerefs = False
251
252 # If true, show URL addresses after external links.
253 #latex_show_urls = False
254
255 # Documents to append as an appendix to all manuals.
256 #latex_appendices = []
257
258 # If false, no module index is generated.
259 #latex_domain_indices = True
260
261
262 # -- Options for manual page output ---------------------------------------
263
264 # One entry per manual page. List of tuples
265 # (source start file, name, description, authors, manual section).
266 man_pages = [
267 ('index', 'bonsai', 'bonsai Documentation',
268 ['noirello'], 1)
269 ]
270
271 # If true, show URL addresses after external links.
272 #man_show_urls = False
273
274
275 # -- Options for Texinfo output -------------------------------------------
276
277 # Grouping the document tree into Texinfo files. List of tuples
278 # (source start file, target name, title, author,
279 # dir menu entry, description, category)
280 texinfo_documents = [
281 ('index', 'bonsai', 'bonsai Documentation',
282 'noirello', 'bonsai', 'One line description of project.',
283 'Miscellaneous'),
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 #texinfo_no_detailmenu = False