Debian Codegraph @

docs/conf.py

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