cookiecutter

Форк
0
/
conf.py 
373 строки · 11.2 Кб
1
"""Documentation build configuration file."""
2

3
#
4
# cookiecutter documentation build configuration file, created by
5
# sphinx-quickstart on Thu Jul 11 11:31:49 2013.
6
#
7
# This file is execfile()d with the current directory set to its containing
8
# dir.
9
#
10
# Note that not all possible configuration values are present in this
11
# autogenerated file.
12
#
13
# All configuration values have a default; values that are commented out
14
# serve to show the default.
15

16
import os
17
import sys
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
# For building docs in foreign environments where we don't have all our
25
# dependencies (like readthedocs), mock out imports that cause sphinx to fail.
26
# see: https://docs.readthedocs.io/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
27

28

29
# Add parent dir to path
30
cwd = os.getcwd()
31
parent = os.path.dirname(cwd)
32
sys.path.append(parent)
33

34
import cookiecutter  # noqa: E402
35

36
# -- General configuration ----------------------------------------------------
37

38
# If your documentation needs a minimal Sphinx version, state it here.
39
# needs_sphinx = '1.0'
40

41
# Add any Sphinx extension module names here, as strings. They can be
42
# extensions coming with Sphinx (named 'sphinx.ext.*') or
43
# your custom ones.
44
extensions = [
45
    'sphinx.ext.autodoc',
46
    'sphinx.ext.doctest',
47
    'sphinx.ext.intersphinx',
48
    'sphinx.ext.todo',
49
    'sphinx.ext.coverage',
50
    'sphinx.ext.imgmath',
51
    'sphinx.ext.ifconfig',
52
    'sphinx.ext.viewcode',
53
    'sphinx_click.ext',
54
    'myst_parser',
55
    'sphinxcontrib.apidoc',
56
    'sphinx_autodoc_typehints',
57
]
58

59
# Add any paths that contain templates here, relative to this directory.
60
templates_path = ['_templates']
61

62
# The suffix of source filenames.
63
source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}
64

65
# The encoding of source files.
66
# source_encoding = 'utf-8-sig'
67

68
# The master toctree document.
69
master_doc = 'index'
70

71
# General information about the project.
72
project = 'cookiecutter'
73
copyright = '2013-2022, Audrey Roy and Cookiecutter community'
74

75
# The version info for the project you're documenting, acts as replacement for
76
# |version| and |release|, also used in various other places throughout the
77
# built documents.
78
#
79
# The short X.Y version.
80
version = cookiecutter.__version__
81
# The full version, including alpha/beta/rc tags.
82
release = cookiecutter.__version__
83

84
# The language for content autogenerated by Sphinx. Refer to documentation
85
# for a list of supported languages.
86
# language = None
87

88
# There are two options for replacing |today|: either, you set today to some
89
# non-false value, then it is used:
90
# today = ''
91
# Else, today_fmt is used as the format for a strftime call.
92
# today_fmt = '%B %d, %Y'
93

94
# List of patterns, relative to source directory, that match files and
95
# directories to ignore when looking for source files.
96
exclude_patterns = ['_build']
97

98
# The reST default role (used for this markup: `text`) to use for all documents
99
# default_role = None
100

101
# If true, '()' will be appended to :func: etc. cross-reference text.
102
# add_function_parentheses = True
103

104
# If true, the current module name will be prepended to all description
105
# unit titles (such as .. function::).
106
# add_module_names = True
107

108
# If true, sectionauthor and moduleauthor directives will be shown in the
109
# output. They are ignored by default.
110
# show_authors = False
111

112
# The name of the Pygments (syntax highlighting) style to use.
113
pygments_style = 'sphinx'
114

115
# A list of ignored prefixes for module index sorting.
116
# modindex_common_prefix = []
117

118
# If true, keep warnings as "system message" paragraphs in the built documents.
119
# keep_warnings = False
120

121
# Suppress nonlocal image warnings
122
suppress_warnings = ['image.nonlocal_uri']
123

124
# -- Options for HTML output --------------------------------------------------
125

126
# The theme to use for HTML and HTML Help pages.  See the documentation for
127
# a list of builtin themes.
128
html_theme = 'sphinx_rtd_theme'
129

130
# Theme options are theme-specific and customize the look and feel of a theme
131
# further.  For a list of options available for each theme, see the
132
# documentation.
133
# html_theme_options = {}
134

135
# Add any paths that contain custom themes here, relative to this directory.
136
# html_theme_path = []
137

138
# The name for this set of Sphinx documents.  If None, it defaults to
139
# "<project> v<release> documentation".
140
# html_title = None
141

142
# A shorter title for the navigation bar.  Default is the same as html_title.
143
# html_short_title = None
144

145
# The name of an image file (relative to this directory) to place at the top
146
# of the sidebar.
147
# html_logo = None
148

149
# The name of an image file (within the static path) to use as favicon of the
150
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
151
# pixels large.
152
# html_favicon = None
153

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

159
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
160
# using the given strftime format.
161
# html_last_updated_fmt = '%b %d, %Y'
162

163
# If true, SmartyPants will be used to convert quotes and dashes to
164
# typographically correct entities.
165
# html_use_smartypants = True
166

167
# Custom sidebar templates, maps document names to template names.
168
# html_sidebars = {}
169

170
# Additional templates that should be rendered to pages, maps page names to
171
# template names.
172
# html_additional_pages = {}
173

174
# If false, no module index is generated.
175
# html_domain_indices = True
176

177
# If false, no index is generated.
178
# html_use_index = True
179

180
# If true, the index is split into individual pages for each letter.
181
# html_split_index = False
182

183
# If true, links to the reST sources are added to the pages.
184
# html_show_sourcelink = True
185

186
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
187
# html_show_sphinx = True
188

189
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
190
# html_show_copyright = True
191

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

197
# This is the file name suffix for HTML files (e.g. ".xhtml").
198
# html_file_suffix = None
199

200
# Output file base name for HTML help builder.
201
htmlhelp_basename = 'cookiecutterdoc'
202

203

204
# -- Options for LaTeX output -------------------------------------------------
205

206
latex_elements = {
207
    # The paper size ('letterpaper' or 'a4paper').
208
    # 'papersize': 'letterpaper',
209
    # The font size ('10pt', '11pt' or '12pt').
210
    # 'pointsize': '10pt',
211
    # Additional stuff for the LaTeX preamble.
212
    # 'preamble': '',
213
}
214

215
# Grouping the document tree into LaTeX files. List of tuples
216
# (source start file, target name, title, author, documentclass [howto/manual])
217
latex_documents = [
218
    (
219
        'index',
220
        'cookiecutter.tex',
221
        'cookiecutter Documentation',
222
        'Audrey Roy and Cookiecutter community',
223
        'manual',
224
    ),
225
]
226

227
# The name of an image file (relative to this directory) to place at the top of
228
# the title page.
229
# latex_logo = None
230

231
# For "manual" documents, if this is true, then toplevel headings are parts,
232
# not chapters.
233
# latex_use_parts = False
234

235
# If true, show page references after internal links.
236
# latex_show_pagerefs = False
237

238
# If true, show URL addresses after external links.
239
# latex_show_urls = False
240

241
# Documents to append as an appendix to all manuals.
242
# latex_appendices = []
243

244
# If false, no module index is generated.
245
# latex_domain_indices = True
246

247

248
# -- Options for manual page output -------------------------------------------
249

250
# One entry per manual page. List of tuples
251
# (source start file, name, description, authors, manual section).
252
man_pages = [
253
    (
254
        'index',
255
        'cookiecutter',
256
        'cookiecutter Documentation',
257
        ['Audrey Roy and Cookiecutter community'],
258
        1,
259
    )
260
]
261

262
# If true, show URL addresses after external links.
263
# man_show_urls = False
264

265

266
# -- Options for Texinfo output -----------------------------------------------
267

268
# Grouping the document tree into Texinfo files. List of tuples
269
# (source start file, target name, title, author,
270
#  dir menu entry, description, category)
271
texinfo_documents = [
272
    (
273
        'index',
274
        'cookiecutter',
275
        'cookiecutter Documentation',
276
        'Audrey Roy and Cookiecutter community',
277
        'cookiecutter',
278
        'Creates projects from project templates',
279
        'Miscellaneous',
280
    ),
281
]
282

283
# Documents to append as an appendix to all manuals.
284
# texinfo_appendices = []
285

286
# If false, no module index is generated.
287
# texinfo_domain_indices = True
288

289
# How to display URL addresses: 'footnote', 'no', or 'inline'.
290
# texinfo_show_urls = 'footnote'
291

292
# If true, do not generate a @detailmenu in the "Top" node's menu.
293
# texinfo_no_detailmenu = False
294

295

296
# -- Options for Epub output --------------------------------------------------
297

298
# Bibliographic Dublin Core info.
299
epub_title = 'cookiecutter'
300
epub_author = 'Audrey Roy'
301
epub_publisher = 'Audrey Roy and Cookiecutter community'
302
epub_copyright = '2013-2022, Audrey Roy and Cookiecutter community'
303

304
# The language of the text. It defaults to the language option
305
# or en if the language is not set.
306
# epub_language = ''
307

308
# The scheme of the identifier. Typical schemes are ISBN or URL.
309
# epub_scheme = ''
310

311
# The unique identifier of the text. This can be a ISBN number
312
# or the project homepage.
313
# epub_identifier = ''
314

315
# A unique identification for the text.
316
# epub_uid = ''
317

318
# A tuple containing the cover image and cover page html template filenames.
319
# epub_cover = ()
320

321
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
322
# epub_guide = ()
323

324
# HTML files that should be inserted before the pages created by sphinx.
325
# The format is a list of tuples containing the path and title.
326
# epub_pre_files = []
327

328
# HTML files that should be inserted after the pages created by sphinx.
329
# The format is a list of tuples containing the path and title.
330
# epub_post_files = []
331

332
# A list of files that should not be packed into the epub file.
333
# epub_exclude_files = []
334

335
# The depth of the table of contents in toc.ncx.
336
# epub_tocdepth = 3
337

338
# Allow duplicate toc entries.
339
# epub_tocdup = True
340

341
# Fix unsupported image types using the PIL.
342
# epub_fix_images = False
343

344
# Scale large images.
345
# epub_max_image_width = 0
346

347
# If 'no', URL addresses will not be shown.
348
# epub_show_urls = 'inline'
349

350
# If false, no index is generated.
351
# epub_use_index = True
352

353

354
# Example configuration for intersphinx: refer to the Python standard library.
355
intersphinx_mapping = {
356
    "python": ("https://docs.python.org/3", None),
357
    "requests": ("https://requests.readthedocs.io/en/latest/", None),
358
    "click": ("https://click.palletsprojects.com/en/latest", None),
359
}
360
myst_enable_extensions = [
361
    "tasklist",
362
    "strikethrough",
363
    "fieldlist",
364
]
365
myst_heading_anchors = 3
366
# Apidoc extension config
367
apidoc_module_dir = "../cookiecutter"
368
apidoc_output_dir = "."
369
apidoc_toc_file = False
370
apidoc_extra_args = ["-t", "_templates"]
371

372
autodoc_member_order = "groupwise"
373
autodoc_typehints = "none"
374

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

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

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

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