Debian Codegraph @

docs/conf.py

raw ◀ ▶
2 Debian patches touch this file
1 # Cedar Backup v3 documentation build configuration file, based on existing
2 # documentation for Requests (https://github.com/psf/requests).
3 #
4 # This file is execfile()d with the current directory set to its
5 # containing dir.
6 #
7 # Note that not all possible configuration values are present in this
8 # autogenerated file.
9 #
10 # All configuration values have a default; values that are commented out
11 # serve to show the default.
12
13 import os
14 import sys
15 import re
16 from importlib.metadata import metadata
17
18 # If extensions (or modules to document with autodoc) are in another directory,
19 # add these directories to sys.path here. If the directory is relative to the
20 # documentation root, use os.path.abspath to make it absolute, like shown here.
21 # sys.path.insert(0, os.path.abspath('.'))
22
23 # Insert the source tree into the system path
24 sys.path.insert(0, os.path.abspath("../src"))
25 sys.path.insert(0, os.path.abspath("_themes"))
26
27 # Configure the GitHub repository
28 GITHUB_OWNER = "pronovic"
29 GITHUB_REPO = "cedar-backup3"
30
31 # Configure attributes based on metadata
32 _METADATA = metadata("cedar-backup3")
33 PROJECT = _METADATA["Name"]
34 SUMMARY = _METADATA["Summary"]
35 AUTHOR = re.sub(r"(^)(\"?)([^<\"]*)(\"?)( <)([^>]*)(>$)", r"\3", _METADATA["Author-email"])
36 VERSION = _METADATA["Version"]
37
38 # Dump metadata so it's obvious in the build log
39 print("GitHub repo: %s/%s" % (GITHUB_OWNER, GITHUB_REPO))
40 print("Project....: %s" % PROJECT)
41 print("Summary....: %s" % SUMMARY)
42 print("Author.....: %s" % AUTHOR)
43 print("Version....: %s" % VERSION)
44
45 # -- General configuration ------------------------------------------------
46
47 # If your documentation needs a minimal Sphinx version, state it here.
48 # needs_sphinx = '1.0'
49
50 # Add any Sphinx extension module names here, as strings. They can be
51 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
52 # ones.
53 extensions = [
54 "sphinx.ext.todo",
55 "sphinx.ext.napoleon",
56 ]
57
58 # Napoleon settings for docstrings
59 napoleon_google_docstring = True
60 napoleon_numpy_docstring = False
61 napoleon_include_init_with_doc = True
62 napoleon_include_private_with_doc = False
63 napoleon_include_special_with_doc = False
64 napoleon_use_admonition_for_examples = False
65 napoleon_use_admonition_for_notes = False
66 napoleon_use_admonition_for_references = False
67 napoleon_use_ivar = False
68 napoleon_use_param = True
69 napoleon_use_rtype = True
70 autodoc_member_order = "bysource"
71
72 # Auto-api settings
73 autoapi_type = "python"
74 autoapi_dirs = ["../src/CedarBackup3"]
75 autoapi_add_toctree_entry = True
76 autoapi_options = ['members', 'undoc-members', 'show-inheritance', 'special-members']
77
78 # Add any paths that contain templates here, relative to this directory.
79 templates_path = ["_templates"]
80
81 # The suffix(es) of source filenames.
82 # You can specify multiple suffix as a list of string:
83 # source_suffix = ['.rst', '.md']
84 source_suffix = ".rst"
85
86 # The encoding of source files.
87 # source_encoding = 'utf-8-sig'
88
89 # The master toctree document.
90 master_doc = "index"
91
92 # General information about the project.
93 project = PROJECT
94 copyright = "(c) %s" % AUTHOR
95 author = AUTHOR
96
97 # The version info for the project you're documenting, acts as replacement for
98 # |version| and |release|, also used in various other places throughout the
99 # built documents.
100 #
101 # The short X.Y version.
102 version = VERSION
103 # The full version, including alpha/beta/rc tags.
104 release = VERSION
105
106 # The language for content autogenerated by Sphinx. Refer to documentation
107 # for a list of supported languages.
108 #
109 # This is also used if you do content translation via gettext catalogs.
110 # Usually you set "language" from the command line for these cases.
111 language = "en"
112
113 # There are two options for replacing |today|: either, you set today to some
114 # non-false value, then it is used:
115 # today = ''
116 # Else, today_fmt is used as the format for a strftime call.
117 # today_fmt = '%B %d, %Y'
118
119 # List of patterns, relative to source directory, that match files and
120 # directories to ignore when looking for source files.
121 exclude_patterns = ["_build"]
122
123 # The reST default role (used for this markup: `text`) to use for all
124 # documents.
125 # default_role = None
126
127 # If true, '()' will be appended to :func: etc. cross-reference text.
128 add_function_parentheses = False
129
130 # If true, the current module name will be prepended to all description
131 # unit titles (such as .. function::).
132 add_module_names = True
133
134 # If true, sectionauthor and moduleauthor directives will be shown in the
135 # output. They are ignored by default.
136 # show_authors = False
137
138 # The name of the Pygments (syntax highlighting) style to use.
139 pygments_style = "flask_theme_support.FlaskyStyle"
140
141 # A list of ignored prefixes for module index sorting.
142 # modindex_common_prefix = []
143
144 # If true, keep warnings as "system message" paragraphs in the built documents.
145 # keep_warnings = False
146
147 # todo_include_todos = True
148
149
150 # -- Options for HTML output ----------------------------------------------
151
152 # The theme to use for HTML and HTML Help pages. See the documentation for
153 # a list of builtin themes.
154 html_theme = "alabaster"
155
156 # Theme options are theme-specific and customize the look and feel of a theme
157 # further. For a list of options available for each theme, see the
158 # documentation.
159 html_theme_options = {
160 "show_powered_by": False,
161 "github_user": GITHUB_OWNER,
162 "github_repo": GITHUB_REPO,
•163 "github_banner": False,
164 "github_button": False,
165 "show_related": False,
166 "note_bg": "#FFF59C",
167 }
168
169 # Add any paths that contain custom themes here, relative to this directory.
170 # html_theme_path = []
171
172 # The name for this set of Sphinx documents. If None, it defaults to
173 # "<project> v<release> documentation".
174 # html_title = None
175
176 # A shorter title for the navigation bar. Default is the same as html_title.
177 # html_short_title = None
178
179 # The name of an image file (relative to this directory) to place at the top
180 # of the sidebar.
181 # html_logo = None
182
183 # The name of an image file (within the static path) to use as favicon of the
184 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
185 # pixels large.
186 # html_favicon = None
187
188 # Add any paths that contain custom static files (such as style sheets) here,
189 # relative to this directory. They are copied after the builtin static files,
190 # so a file named "default.css" will overwrite the builtin "default.css".
191 html_static_path = ["_static"]
192
193 # Add any extra paths that contain custom files (such as robots.txt or
194 # .htaccess) here, relative to this directory. These files are copied
195 # directly to the root of the documentation.
196 # html_extra_path = []
197
198 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
199 # using the given strftime format.
200 # html_last_updated_fmt = '%b %d, %Y'
201
202 # If true, SmartyPants will be used to convert quotes and dashes to
203 # typographically correct entities.
204 html_use_smartypants = False
205
206 # Custom sidebar templates, maps document names to template names.
207 # html_sidebars = { "index": [ "hacks.html"], }
208
209 # Additional templates that should be rendered to pages, maps page names to
210 # template names.
211 # html_additional_pages = {}
212
213 # If false, no module index is generated.
214 # html_domain_indices = True
215
216 # If false, no index is generated.
217 # html_use_index = True
218
219 # If true, the index is split into individual pages for each letter.
220 # html_split_index = False
221
222 # If true, links to the reST sources are added to the pages.
223 html_show_sourcelink = False
224
225 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
226 html_show_sphinx = False
227
228 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
229 html_show_copyright = True
230
231 # If true, an OpenSearch description file will be output, and all pages will
232 # contain a <link> tag referring to it. The value of this option must be the
233 # base URL from which the finished HTML is served.
234 # html_use_opensearch = ''
235
236 # This is the file name suffix for HTML files (e.g. ".xhtml").
237 # html_file_suffix = None
238
239 # Language to be used for generating the HTML full-text search index.
240 # Sphinx supports the following languages:
241 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
242 # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
243 # html_search_language = 'en'
244
245 # A dictionary with options for the search language support, empty by default.
246 # Now only 'ja' uses this config value
247 # html_search_options = {'type': 'default'}
248
249 # The name of a javascript file (relative to the configuration directory) that
250 # implements a search results scorer. If empty, the default will be used.
251 # html_search_scorer = 'scorer.js'
252
253 # Output file base name for HTML help builder.
254 htmlhelp_basename = PROJECT
255
256 # -- Options for LaTeX output ---------------------------------------------
257
258 latex_elements = {
259 # The paper size ('letterpaper' or 'a4paper').
260 #'papersize': 'letterpaper',
261 # The font size ('10pt', '11pt' or '12pt').
262 #'pointsize': '10pt',
263 # Additional stuff for the LaTeX preamble.
264 #'preamble': '',
265 # Latex figure (float) alignment
266 #'figure_align': 'htbp',
267 }
268
269 # Grouping the document tree into LaTeX files. List of tuples
270 # (source start file, target name, title,
271 # author, documentclass [howto, manual, or own class]).
272 latex_documents = [(master_doc, "%s.tex" % PROJECT, "%s Documentation" % PROJECT, AUTHOR, "manual")]
273
274 # The name of an image file (relative to this directory) to place at the top of
275 # the title page.
276 # latex_logo = None
277
278 # For "manual" documents, if this is true, then toplevel headings are parts,
279 # not chapters.
280 # latex_use_parts = False
281
282 # If true, show page references after internal links.
283 # latex_show_pagerefs = False
284
285 # If true, show URL addresses after external links.
286 # latex_show_urls = False
287
288 # Documents to append as an appendix to all manuals.
289 # latex_appendices = []
290
291 # If false, no module index is generated.
292 # latex_domain_indices = True
293
294
295 # -- Options for manual page output ---------------------------------------
296
297 # One entry per manual page. List of tuples
298 # (source start file, name, description, authors, manual section).
299 man_pages = [(master_doc, PROJECT, "%s Documentation" % PROJECT, [author], 1)]
300
301 # If true, show URL addresses after external links.
302 # man_show_urls = False
303
304
305 # -- Options for Texinfo output -------------------------------------------
306
307 # Grouping the document tree into Texinfo files. List of tuples
308 # (source start file, target name, title, author,
309 # dir menu entry, description, category)
310 texinfo_documents = [
311 (
312 master_doc,
313 PROJECT,
314 "%s Documentation" % PROJECT,
315 author,
316 PROJECT,
317 SUMMARY,
318 "Miscellaneous",
319 )
320 ]
321
322 # Documents to append as an appendix to all manuals.
323 # texinfo_appendices = []
324
325 # If false, no module index is generated.
326 # texinfo_domain_indices = True
327
328 # How to display URL addresses: 'footnote', 'no', or 'inline'.
329 # texinfo_show_urls = 'footnote'
330
331 # If true, do not generate a @detailmenu in the "Top" node's menu.
332 # texinfo_no_detailmenu = False
333
334
335 # -- Options for Epub output ----------------------------------------------
336
337 # Bibliographic Dublin Core info.
338 epub_title = project
339 epub_author = author
340 epub_publisher = author
341 epub_copyright = copyright
342
343 # The basename for the epub file. It defaults to the project name.
344 # epub_basename = project
345
346 # The HTML theme for the epub output. Since the default themes are not
347 # optimized for small screen space, using the same theme for HTML and epub
348 # output is usually not wise. This defaults to 'epub', a theme designed to save
349 # visual space.
350 # epub_theme = 'epub'
351
352 # The language of the text. It defaults to the language option
353 # or 'en' if the language is not set.
354 # epub_language = ''
355
356 # The scheme of the identifier. Typical schemes are ISBN or URL.
357 # epub_scheme = ''
358
359 # The unique identifier of the text. This can be a ISBN number
360 # or the project homepage.
361 # epub_identifier = ''
362
363 # A unique identification for the text.
364 # epub_uid = ''
365
366 # A tuple containing the cover image and cover page html template filenames.
367 # epub_cover = ()
368
369 # A sequence of (type, uri, title) tuples for the guide element of content.opf.
370 # epub_guide = ()
371
372 # HTML files that should be inserted before the pages created by sphinx.
373 # The format is a list of tuples containing the path and title.
374 # epub_pre_files = []
375
376 # HTML files that should be inserted after the pages created by sphinx.
377 # The format is a list of tuples containing the path and title.
378 # epub_post_files = []
379
380 # A list of files that should not be packed into the epub file.
381 epub_exclude_files = ["search.html"]
382
383 # The depth of the table of contents in toc.ncx.
384 # epub_tocdepth = 3
385
386 # Allow duplicate toc entries.
387 # epub_tocdup = True
388
389 # Choose between 'default' and 'includehidden'.
390 # epub_tocscope = 'default'
391
392 # Fix unsupported image types using the Pillow.
393 # epub_fix_images = False
394
395 # Scale large images.
396 # epub_max_image_width = 0
397
398 # How to display URL addresses: 'footnote', 'no', or 'inline'.
399 # epub_show_urls = 'inline'
400
401 # If false, no index is generated.
402 # epub_use_index = True