Debian Codegraph @

docs/conf.py

raw ◀ ▶
2 Debian patches touch this file
1 # SPDX-License-Identifier: ISC
2 # Copyright (c) 2011 Justus Winter <[email protected]>
3
4 # afew documentation build configuration file, created by
5 # sphinx-quickstart on Fri Dec 23 21:19:37 2011.
6 #
7 # This file is execfile()d with the current directory set to its containing dir.
8 #
9 # Note that not all possible configuration values are present in this
10 # autogenerated file.
11 #
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
14
•15 import sys
16 import os
•17 from importlib.metadata import version
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 # Create mocks so we don't depend on non standard modules to build the
25 # documentation
26
27 class Mock:
28 def __init__(self, *args, **kwargs):
29 pass
30
31 def __getattr__(self, name):
32 return Mock if name != '__file__' else '/dev/null'
33
34 MOCK_MODULES = [
35 'notmuch',
36 'notmuch.globals',
37 'argparse',
38 ]
39
40 for mod_name in MOCK_MODULES:
41 sys.modules[mod_name] = Mock()
42
43 # -- General configuration -----------------------------------------------------
44
45 # If your documentation needs a minimal Sphinx version, state it here.
•46 # needs_sphinx = '1.0'
47
48 # Add any Sphinx extension module names here, as strings. They can be extensions
49 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
50 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.viewcode']
51
52 # Add any paths that contain templates here, relative to this directory.
53 templates_path = ['_templates']
54
55 # The suffix of source filenames.
56 source_suffix = '.rst'
57
58 # The encoding of source files.
59 source_encoding = 'utf-8-sig'
60
61 # The master toctree document.
62 master_doc = 'index'
63
64 # General information about the project.
65 project = u'afew'
66 copyright = u'afewmail project'
67
68 # The version info for the project you're documenting, acts as replacement for
69 # |version| and |release|, also used in various other places throughout the
70 # built documents.
71 #
72 # The full version, including alpha/beta/rc tags.
73 pretended_version = os.environ.get('SETUPTOOLS_SCM_PRETEND_VERSION')
74 if pretended_version:
75 release = pretended_version
76 else:
•77 release = version('afew')
78 # The X.Y.Z version.
79 version = '.'.join(release.split('.')[:3])
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 = []
94
95 # The reST default role (used for this markup: `text`) to use for all documents.
•96 # default_role = None
97
98 # If true, '()' will be appended to :func: etc. cross-reference text.
•99 # add_function_parentheses = True
100
101 # If true, the current module name will be prepended to all description
102 # unit titles (such as .. function::).
•103 # add_module_names = True
104
105 # If true, sectionauthor and moduleauthor directives will be shown in the
106 # output. They are ignored by default.
•107 # show_authors = False
108
109 # The name of the Pygments (syntax highlighting) style to use.
110 pygments_style = 'sphinx'
111
112 # A list of ignored prefixes for module index sorting.
•113 # modindex_common_prefix = []
114
115
116 # -- Options for HTML output ---------------------------------------------------
117
118 # The theme to use for HTML and HTML Help pages. See the documentation for
119 # a list of builtin themes.
120 html_theme = 'default'
121
122 # Theme options are theme-specific and customize the look and feel of a theme
123 # further. For a list of options available for each theme, see the
124 # documentation.
•125 # html_theme_options = {}
126
127 # Add any paths that contain custom themes here, relative to this directory.
•128 # html_theme_path = []
129
130 # The name for this set of Sphinx documents. If None, it defaults to
131 # "<project> v<release> documentation".
•132 # html_title = None
133
134 # A shorter title for the navigation bar. Default is the same as html_title.
•135 # html_short_title = None
136
137 # The name of an image file (relative to this directory) to place at the top
138 # of the sidebar.
•139 # html_logo = None
140
141 # The name of an image file (within the static path) to use as favicon of the
142 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
143 # pixels large.
•144 # html_favicon = None
145
146 # Add any paths that contain custom static files (such as style sheets) here,
147 # relative to this directory. They are copied after the builtin static files,
148 # so a file named "default.css" will overwrite the builtin "default.css".
149 html_static_path = ['_static']
150
151 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
152 # using the given strftime format.
•153 # html_last_updated_fmt = '%b %d, %Y'
154
155 # If true, SmartyPants will be used to convert quotes and dashes to
156 # typographically correct entities.
•157 # html_use_smartypants = True
158
159 # Custom sidebar templates, maps document names to template names.
•160 # html_sidebars = {}
161
162 # Additional templates that should be rendered to pages, maps page names to
163 # template names.
•164 # html_additional_pages = {}
165
166 # If false, no module index is generated.
•167 # html_domain_indices = True
168
169 # If false, no index is generated.
•170 # html_use_index = True
171
172 # If true, the index is split into individual pages for each letter.
•173 # html_split_index = False
174
175 # If true, links to the reST sources are added to the pages.
•176 # html_show_sourcelink = True
177
178 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
•179 # html_show_sphinx = True
180
181 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
•182 # html_show_copyright = True
183
184 # If true, an OpenSearch description file will be output, and all pages will
185 # contain a <link> tag referring to it. The value of this option must be the
186 # base URL from which the finished HTML is served.
•187 # html_use_opensearch = ''
188
189 # This is the file name suffix for HTML files (e.g. ".xhtml").
•190 # html_file_suffix = None
191
192 # Output file base name for HTML help builder.
193 htmlhelp_basename = 'afewdoc'
194
195
196 # -- Options for LaTeX output --------------------------------------------------
197
198 # The paper size ('letter' or 'a4').
•199 # latex_paper_size = 'letter'
200
201 # The font size ('10pt', '11pt' or '12pt').
•202 # latex_font_size = '10pt'
203
204 # Grouping the document tree into LaTeX files. List of tuples
205 # (source start file, target name, title, author, documentclass [howto/manual]).
206 latex_documents = [
207 ('index', 'afew.tex', u'afew Documentation',
208 u'Justus Winter', 'manual'),
209 ]
210
211 # The name of an image file (relative to this directory) to place at the top of
212 # the title page.
•213 # latex_logo = None
214
215 # For "manual" documents, if this is true, then toplevel headings are parts,
216 # not chapters.
•217 # latex_use_parts = False
218
219 # If true, show page references after internal links.
•220 # latex_show_pagerefs = False
221
222 # If true, show URL addresses after external links.
•223 # latex_show_urls = False
224
225 # Additional stuff for the LaTeX preamble.
•226 # latex_preamble = ''
227
228 # Documents to append as an appendix to all manuals.
•229 # latex_appendices = []
230
231 # If false, no module index is generated.
•232 # latex_domain_indices = True
233
234
235 # -- Options for manual page output --------------------------------------------
236
237 # One entry per manual page. List of tuples
238 # (source start file, name, description, authors, manual section).
239 man_pages = [
240 ('index', 'afew', u'afew Documentation',
241 [u'Justus Winter'], 1)
242 ]
243
244
245 # Example configuration for intersphinx: refer to the Python standard library.
246 intersphinx_mapping = {
247 'python': ('https://docs.python.org/', None),
248 'notmuch': ('https://notmuch.readthedocs.io/en/latest/', None),
249 'alot': ('https://alot.readthedocs.io/en/latest/', None),
250 }