aiosignal

Форк
0
/
conf.py 
355 строк · 10.8 Кб
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
    "sphinxcontrib.asyncio",
49
]
50

51

52
try:
53
    import sphinxcontrib.spelling  # noqa
54

55
    extensions.append("sphinxcontrib.spelling")
56
except ImportError:
57
    pass
58

59

60
intersphinx_mapping = {
61
    "python": ("http://docs.python.org/3", None),
62
    "aiohttp": ("https://docs.aiohttp.org/en/stable/", None),
63
    "frozenlist": ("https://frozenlist.readthedocs.io/en/latest/", None),
64
}
65

66
# Add any paths that contain templates here, relative to this directory.
67
templates_path = ["_templates"]
68

69
# The suffix of source filenames.
70
source_suffix = ".rst"
71

72
# The encoding of source files.
73
# source_encoding = 'utf-8-sig'
74

75
# The master toctree document.
76
master_doc = "index"
77

78
# General information about the project.
79
project = "aiosignal"
80
copyright = "2013-2019, aiosignal contributors"
81

82
# The version info for the project you're documenting, acts as replacement for
83
# |version| and |release|, also used in various other places throughout the
84
# built documents.
85
#
86
# The short X.Y version.
87
version = "{major}.{minor}".format(**_version_info)
88
# The full version, including alpha/beta/rc tags.
89
release = "{major}.{minor}.{patch}{tag}".format(**_version_info)
90

91
# The language for content autogenerated by Sphinx. Refer to documentation
92
# for a list of supported languages.
93
# language = None
94

95
# There are two options for replacing |today|: either, you set today to some
96
# non-false value, then it is used:
97
# today = ''
98
# Else, today_fmt is used as the format for a strftime call.
99
# today_fmt = '%B %d, %Y'
100

101
# List of patterns, relative to source directory, that match files and
102
# directories to ignore when looking for source files.
103
exclude_patterns = ["_build"]
104

105
# The reST default role (used for this markup: `text`) to use for all
106
# documents.
107
# default_role = None
108

109
# If true, '()' will be appended to :func: etc. cross-reference text.
110
# add_function_parentheses = True
111

112
# If true, the current module name will be prepended to all description
113
# unit titles (such as .. function::).
114
# add_module_names = True
115

116
# If true, sectionauthor and moduleauthor directives will be shown in the
117
# output. They are ignored by default.
118
# show_authors = False
119

120
# The name of the Pygments (syntax highlighting) style to use.
121
# pygments_style = 'sphinx'
122

123
# The default language to highlight source code in.
124
highlight_language = "python3"
125

126
# A list of ignored prefixes for module index sorting.
127
# modindex_common_prefix = []
128

129
# If true, keep warnings as "system message" paragraphs in the built documents.
130
# keep_warnings = False
131

132

133
# -- Options for HTML output ----------------------------------------------
134

135
# The theme to use for HTML and HTML Help pages.  See the documentation for
136
# a list of builtin themes.
137
html_theme = "aiohttp_theme"
138

139
# Theme options are theme-specific and customize the look and feel of a theme
140
# further.  For a list of options available for each theme, see the
141
# documentation.
142
html_theme_options = {
143
    "logo": None,
144
    "description": "aiosignal: a list of registered asynchronous callbacks.",
145
    "canonical_url": "http://aiosignal.readthedocs.io/en/stable/",
146
    "github_user": "aio-libs",
147
    "github_repo": "aiosignal",
148
    "github_button": True,
149
    "github_type": "star",
150
    "github_banner": True,
151
    "badges": [
152
        {
153
            "image": "https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg",
154
            "target": (
155
                "https://github.com/aio-libs/aiosignal/" "actions?query=workflow%3ACI"
156
            ),
157
            "height": "20",
158
            "alt": "GitHub CI status for master branch",
159
        },
160
        {
161
            "image": (
162
                "https://codecov.io/github/aio-libs/aiosignal/"
163
                "coverage.svg?branch=master"
164
            ),
165
            "target": "https://codecov.io/github/aio-libs/aiosignal",
166
            "height": "20",
167
            "alt": "Code coverage status",
168
        },
169
        {
170
            "image": "https://badge.fury.io/py/aiosignal.svg",
171
            "target": "https://badge.fury.io/py/aiosignal",
172
            "height": "20",
173
            "alt": "Latest PyPI package version",
174
        },
175
        {
176
            "image": (
177
                "https://img.shields.io/discourse/"
178
                "topics?server=https%3A%2F%2Faio-libs.discourse.group%2F"
179
            ),
180
            "target": "https://aio-libs.discourse.group/",
181
            "height": "20",
182
            "alt": "Discourse group for io-libs",
183
        },
184
        {
185
            "image": "https://badges.gitter.im/Join%20Chat.svg",
186
            "target": "https://gitter.im/aio-libs/Lobby",
187
            "height": "20",
188
            "alt": "Chat on Gitter",
189
        },
190
    ],
191
}
192

193
# Add any paths that contain custom themes here, relative to this directory.
194
# html_theme_path = [alabaster.get_path()]
195

196
# The name for this set of Sphinx documents.  If None, it defaults to
197
# "<project> v<release> documentation".
198
# html_title = None
199

200
# A shorter title for the navigation bar.  Default is the same as html_title.
201
# html_short_title = None
202

203
# The name of an image file (relative to this directory) to place at the top
204
# of the sidebar.
205
# html_logo = 'aiosignal-icon.svg'
206

207
# The name of an image file (within the static path) to use as favicon of the
208
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
209
# pixels large.
210
# html_favicon = 'favicon.ico'
211

212
# Add any paths that contain custom static files (such as style sheets) here,
213
# relative to this directory. They are copied after the builtin static files,
214
# so a file named "default.css" will overwrite the builtin "default.css".
215
# html_static_path = []
216

217
# Add any extra paths that contain custom files (such as robots.txt or
218
# .htaccess) here, relative to this directory. These files are copied
219
# directly to the root of the documentation.
220
# html_extra_path = []
221

222
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
223
# using the given strftime format.
224
# html_last_updated_fmt = '%b %d, %Y'
225

226
# If true, SmartyPants will be used to convert quotes and dashes to
227
# typographically correct entities.
228
# html_use_smartypants = True
229

230
# Custom sidebar templates, maps document names to template names.
231
html_sidebars = {
232
    "**": [
233
        "about.html",
234
        "navigation.html",
235
        "searchbox.html",
236
    ]
237
}
238

239
# Additional templates that should be rendered to pages, maps page names to
240
# template names.
241
# html_additional_pages = {}
242

243
# If false, no module index is generated.
244
# html_domain_indices = True
245

246
# If false, no index is generated.
247
# html_use_index = True
248

249
# If true, the index is split into individual pages for each letter.
250
# html_split_index = False
251

252
# If true, links to the reST sources are added to the pages.
253
# html_show_sourcelink = True
254

255
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
256
# html_show_sphinx = True
257

258
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
259
# html_show_copyright = True
260

261
# If true, an OpenSearch description file will be output, and all pages will
262
# contain a <link> tag referring to it.  The value of this option must be the
263
# base URL from which the finished HTML is served.
264
# html_use_opensearch = ''
265

266
# This is the file name suffix for HTML files (e.g. ".xhtml").
267
# html_file_suffix = None
268

269
# Output file base name for HTML help builder.
270
htmlhelp_basename = "aiosignaldoc"
271

272

273
# -- Options for LaTeX output ---------------------------------------------
274

275
latex_elements = {
276
    # The paper size ('letterpaper' or 'a4paper').
277
    # 'papersize': 'letterpaper',
278
    # The font size ('10pt', '11pt' or '12pt').
279
    # 'pointsize': '10pt',
280
    # Additional stuff for the LaTeX preamble.
281
    # 'preamble': '',
282
}
283

284
# Grouping the document tree into LaTeX files. List of tuples
285
# (source start file, target name, title,
286
#  author, documentclass [howto, manual, or own class]).
287
latex_documents = [
288
    (
289
        "index",
290
        "aiosignal.tex",
291
        "aiosignal Documentation",
292
        "aiosignal contributors",
293
        "manual",
294
    ),
295
]
296

297
# The name of an image file (relative to this directory) to place at the top of
298
# the title page.
299
# latex_logo = None
300

301
# For "manual" documents, if this is true, then toplevel headings are parts,
302
# not chapters.
303
# latex_use_parts = False
304

305
# If true, show page references after internal links.
306
# latex_show_pagerefs = False
307

308
# If true, show URL addresses after external links.
309
# latex_show_urls = False
310

311
# Documents to append as an appendix to all manuals.
312
# latex_appendices = []
313

314
# If false, no module index is generated.
315
# latex_domain_indices = True
316

317

318
# -- Options for manual page output ---------------------------------------
319

320
# One entry per manual page. List of tuples
321
# (source start file, name, description, authors, manual section).
322
man_pages = [("index", "aiosignal", "aiosignal Documentation", ["aiosignal"], 1)]
323

324
# If true, show URL addresses after external links.
325
# man_show_urls = False
326

327

328
# -- Options for Texinfo output -------------------------------------------
329

330
# Grouping the document tree into Texinfo files. List of tuples
331
# (source start file, target name, title, author,
332
#  dir menu entry, description, category)
333
texinfo_documents = [
334
    (
335
        "index",
336
        "aiosignal",
337
        "aiosignal Documentation",
338
        "aiosignal contributors",
339
        "aiosignal",
340
        "One line description of project.",
341
        "Miscellaneous",
342
    ),
343
]
344

345
# Documents to append as an appendix to all manuals.
346
# texinfo_appendices = []
347

348
# If false, no module index is generated.
349
# texinfo_domain_indices = True
350

351
# How to display URL addresses: 'footnote', 'no', or 'inline'.
352
# texinfo_show_urls = 'footnote'
353

354
# If true, do not generate a @detailmenu in the "Top" node's menu.
355
# texinfo_no_detailmenu = False
356

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.