Debian Codegraph @

docs/conf.py

raw
1 #!/usr/bin/env python3
2 #
3 # aiosignal documentation build configuration file, created by
4 # sphinx-quickstart on Wed Mar 5 12:35:35 2014.
5 #
6 # This file is execfile()d with the current directory set to its
7 # 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 os
16 import re
17
18 _docs_path = os.path.dirname(__file__)
19 _version_path = os.path.abspath(
20 os.path.join(_docs_path, "..", "aiosignal", "__init__.py")
21 )
22 with open(_version_path, encoding="latin1") as fp:
23 try:
24 _version_info = re.search(
25 r'^__version__ = "'
26 r"(?P<major>\d+)"
27 r"\.(?P<minor>\d+)"
28 r"\.(?P<patch>\d+)"
29 r'(?P<tag>.*)?"$',
30 fp.read(),
31 re.M,
32 ).groupdict()
33 except IndexError:
34 raise RuntimeError("Unable to determine version.")
35
36
37 # -- General configuration ------------------------------------------------
38
39 # If your documentation needs a minimal Sphinx version, state it here.
40 # needs_sphinx = '1.0'
41
42 # Add any Sphinx extension module names here, as strings. They can be
43 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
44 # ones.
45 extensions = [
46 "sphinx.ext.viewcode",
47 "sphinx.ext.intersphinx",
48 ]
49
50
51 try:
52 import sphinxcontrib.spelling # noqa
53
54 extensions.append("sphinxcontrib.spelling")
55 except ImportError:
56 pass
57
58
59 intersphinx_mapping = {
60 "python": ("http://docs.python.org/3", None),
61 "aiohttp": ("https://docs.aiohttp.org/en/stable/", None),
62 "frozenlist": ("https://frozenlist.readthedocs.io/en/latest/", None),
63 }
64
65 # Add any paths that contain templates here, relative to this directory.
66 templates_path = ["_templates"]
67
68 # The suffix of source filenames.
69 source_suffix = ".rst"
70
71 # The encoding of source files.
72 # source_encoding = 'utf-8-sig'
73
74 # The master toctree document.
75 master_doc = "index"
76
77 # General information about the project.
78 project = "aiosignal"
79 copyright = "2013-2019, aiosignal contributors"
80
81 # The version info for the project you're documenting, acts as replacement for
82 # |version| and |release|, also used in various other places throughout the
83 # built documents.
84 #
85 # The short X.Y version.
86 version = "{major}.{minor}".format(**_version_info)
87 # The full version, including alpha/beta/rc tags.
88 release = "{major}.{minor}.{patch}{tag}".format(**_version_info)
89
90 # The language for content autogenerated by Sphinx. Refer to documentation
91 # for a list of supported languages.
92 # language = None
93
94 # There are two options for replacing |today|: either, you set today to some
95 # non-false value, then it is used:
96 # today = ''
97 # Else, today_fmt is used as the format for a strftime call.
98 # today_fmt = '%B %d, %Y'
99
100 # List of patterns, relative to source directory, that match files and
101 # directories to ignore when looking for source files.
102 exclude_patterns = ["_build"]
103
104 # The reST default role (used for this markup: `text`) to use for all
105 # documents.
106 # default_role = None
107
108 # If true, '()' will be appended to :func: etc. cross-reference text.
109 # add_function_parentheses = True
110
111 # If true, the current module name will be prepended to all description
112 # unit titles (such as .. function::).
113 # add_module_names = True
114
115 # If true, sectionauthor and moduleauthor directives will be shown in the
116 # output. They are ignored by default.
117 # show_authors = False
118
119 # The name of the Pygments (syntax highlighting) style to use.
120 # pygments_style = 'sphinx'
121
122 # The default language to highlight source code in.
123 highlight_language = "python3"
124
125 # A list of ignored prefixes for module index sorting.
126 # modindex_common_prefix = []
127
128 # If true, keep warnings as "system message" paragraphs in the built documents.
129 # keep_warnings = False
130
131
132 # -- Options for HTML output ----------------------------------------------
133
134 # The theme to use for HTML and HTML Help pages. See the documentation for
135 # a list of builtin themes.
136 html_theme = "aiohttp_theme"
137
138 # Theme options are theme-specific and customize the look and feel of a theme
139 # further. For a list of options available for each theme, see the
140 # documentation.
141 html_theme_options = {
142 "logo": None,
143 "description": "aiosignal: a list of registered asynchronous callbacks.",
144 "canonical_url": "http://aiosignal.readthedocs.io/en/stable/",
145 "github_user": "aio-libs",
146 "github_repo": "aiosignal",
147 "github_button": True,
148 "github_type": "star",
149 "github_banner": True,
150 "badges": [
151 {
152 "image": "https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg",
153 "target": (
154 "https://github.com/aio-libs/aiosignal/" "actions?query=workflow%3ACI"
155 ),
156 "height": "20",
157 "alt": "GitHub CI status for master branch",
158 },
159 {
160 "image": (
161 "https://codecov.io/github/aio-libs/aiosignal/"
162 "coverage.svg?branch=master"
163 ),
164 "target": "https://codecov.io/github/aio-libs/aiosignal",
165 "height": "20",
166 "alt": "Code coverage status",
167 },
168 {
169 "image": "https://badge.fury.io/py/aiosignal.svg",
170 "target": "https://badge.fury.io/py/aiosignal",
171 "height": "20",
172 "alt": "Latest PyPI package version",
173 },
174 {
175 "image": (
176 "https://img.shields.io/discourse/"
177 "topics?server=https%3A%2F%2Faio-libs.discourse.group%2F"
178 ),
179 "target": "https://aio-libs.discourse.group/",
180 "height": "20",
181 "alt": "Discourse group for io-libs",
182 },
183 {
184 "image": "https://badges.gitter.im/Join%20Chat.svg",
185 "target": "https://gitter.im/aio-libs/Lobby",
186 "height": "20",
187 "alt": "Chat on Gitter",
188 },
189 ],
190 }
191
192 # Add any paths that contain custom themes here, relative to this directory.
193 # html_theme_path = [alabaster.get_path()]
194
195 # The name for this set of Sphinx documents. If None, it defaults to
196 # "<project> v<release> documentation".
197 # html_title = None
198
199 # A shorter title for the navigation bar. Default is the same as html_title.
200 # html_short_title = None
201
202 # The name of an image file (relative to this directory) to place at the top
203 # of the sidebar.
204 # html_logo = 'aiosignal-icon.svg'
205
206 # The name of an image file (within the static path) to use as favicon of the
207 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
208 # pixels large.
209 # html_favicon = 'favicon.ico'
210
211 # Add any paths that contain custom static files (such as style sheets) here,
212 # relative to this directory. They are copied after the builtin static files,
213 # so a file named "default.css" will overwrite the builtin "default.css".
214 # html_static_path = []
215
216 # Add any extra paths that contain custom files (such as robots.txt or
217 # .htaccess) here, relative to this directory. These files are copied
218 # directly to the root of the documentation.
219 # html_extra_path = []
220
221 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
222 # using the given strftime format.
223 # html_last_updated_fmt = '%b %d, %Y'
224
225 # If true, SmartyPants will be used to convert quotes and dashes to
226 # typographically correct entities.
227 # html_use_smartypants = True
228
229 # Custom sidebar templates, maps document names to template names.
230 html_sidebars = {
231 "**": [
232 "about.html",
233 "navigation.html",
234 "searchbox.html",
235 ]
236 }
237
238 # Additional templates that should be rendered to pages, maps page names to
239 # template names.
240 # html_additional_pages = {}
241
242 # If false, no module index is generated.
243 # html_domain_indices = True
244
245 # If false, no index is generated.
246 # html_use_index = True
247
248 # If true, the index is split into individual pages for each letter.
249 # html_split_index = False
250
251 # If true, links to the reST sources are added to the pages.
252 # html_show_sourcelink = True
253
254 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
255 # html_show_sphinx = True
256
257 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
258 # html_show_copyright = True
259
260 # If true, an OpenSearch description file will be output, and all pages will
261 # contain a <link> tag referring to it. The value of this option must be the
262 # base URL from which the finished HTML is served.
263 # html_use_opensearch = ''
264
265 # This is the file name suffix for HTML files (e.g. ".xhtml").
266 # html_file_suffix = None
267
268 # Output file base name for HTML help builder.
269 htmlhelp_basename = "aiosignaldoc"
270
271
272 # -- Options for LaTeX output ---------------------------------------------
273
274 latex_elements = {
275 # The paper size ('letterpaper' or 'a4paper').
276 # 'papersize': 'letterpaper',
277 # The font size ('10pt', '11pt' or '12pt').
278 # 'pointsize': '10pt',
279 # Additional stuff for the LaTeX preamble.
280 # 'preamble': '',
281 }
282
283 # Grouping the document tree into LaTeX files. List of tuples
284 # (source start file, target name, title,
285 # author, documentclass [howto, manual, or own class]).
286 latex_documents = [
287 (
288 "index",
289 "aiosignal.tex",
290 "aiosignal Documentation",
291 "aiosignal contributors",
292 "manual",
293 ),
294 ]
295
296 # The name of an image file (relative to this directory) to place at the top of
297 # the title page.
298 # latex_logo = None
299
300 # For "manual" documents, if this is true, then toplevel headings are parts,
301 # not chapters.
302 # latex_use_parts = False
303
304 # If true, show page references after internal links.
305 # latex_show_pagerefs = False
306
307 # If true, show URL addresses after external links.
308 # latex_show_urls = False
309
310 # Documents to append as an appendix to all manuals.
311 # latex_appendices = []
312
313 # If false, no module index is generated.
314 # latex_domain_indices = True
315
316
317 # -- Options for manual page output ---------------------------------------
318
319 # One entry per manual page. List of tuples
320 # (source start file, name, description, authors, manual section).
321 man_pages = [("index", "aiosignal", "aiosignal Documentation", ["aiosignal"], 1)]
322
323 # If true, show URL addresses after external links.
324 # man_show_urls = False
325
326
327 # -- Options for Texinfo output -------------------------------------------
328
329 # Grouping the document tree into Texinfo files. List of tuples
330 # (source start file, target name, title, author,
331 # dir menu entry, description, category)
332 texinfo_documents = [
333 (
334 "index",
335 "aiosignal",
336 "aiosignal Documentation",
337 "aiosignal contributors",
338 "aiosignal",
339 "One line description of project.",
340 "Miscellaneous",
341 ),
342 ]
343
344 # Documents to append as an appendix to all manuals.
345 # texinfo_appendices = []
346
347 # If false, no module index is generated.
348 # texinfo_domain_indices = True
349
350 # How to display URL addresses: 'footnote', 'no', or 'inline'.
351 # texinfo_show_urls = 'footnote'
352
353 # If true, do not generate a @detailmenu in the "Top" node's menu.
354 # texinfo_no_detailmenu = False