Debian Codegraph @

docs/conf.py

raw
1 # IPython Kernel documentation build configuration file, created by
2 # sphinx-quickstart on Mon Oct 5 11:32:44 2015.
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 shutil
15 from pathlib import Path
16 from typing import Any
17
18 from intersphinx_registry import get_intersphinx_mapping
19
20 # If extensions (or modules to document with autodoc) are in another directory,
21 # add these directories to sys.path here. If the directory is relative to the
22 # documentation root, use os.path.abspath to make it absolute, like shown here.
23 # sys.path.insert(0, os.path.abspath('.'))
24
25 # -- General configuration ------------------------------------------------
26
27 # If your documentation needs a minimal Sphinx version, state it here.
28 # needs_sphinx = '1.0'
29
30 # Add any Sphinx extension module names here, as strings. They can be
31 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32 # ones.
33 extensions = [
34 "myst_parser",
35 "sphinx.ext.autodoc",
36 "sphinx.ext.intersphinx",
37 "sphinxcontrib_github_alt",
38 "sphinx_autodoc_typehints",
39 ]
40
41 try:
42 import enchant # noqa: F401
43
44 extensions += ["sphinxcontrib.spelling"]
45 except ImportError:
46 pass
47
48
49 github_project_url = "https://github.com/ipython/ipykernel"
50
51 # Add any paths that contain templates here, relative to this directory.
52 templates_path = ["_templates"]
53
54 # The suffix(es) of source filenames.
55 # You can specify multiple suffix as a list of string:
56 # source_suffix = ['.rst', '.md']
57 source_suffix = ".rst"
58
59 # The encoding of source files.
60 # source_encoding = 'utf-8-sig'
61
62 # The master toctree document.
63 master_doc = "index"
64
65 # General information about the project.
66 project = "IPython Kernel"
67 copyright = "2015, IPython Development Team"
68 author = "IPython Development Team"
69
70 # The version info for the project you're documenting, acts as replacement for
71 # |version| and |release|, also used in various other places throughout the
72 # built documents.
73 #
74
75 version_ns: dict[str, Any] = {}
76 here = Path(__file__).parent.resolve()
77 version_py = Path(here) / os.pardir / "ipykernel" / "_version.py"
78 with open(version_py) as f:
79 exec(compile(f.read(), version_py, "exec"), version_ns)
80
81 # The short X.Y version.
82 version = "%i.%i" % version_ns["version_info"][:2]
83 # The full version, including alpha/beta/rc tags.
84 release = version_ns["__version__"]
85
86 # The language for content autogenerated by Sphinx. Refer to documentation
87 # for a list of supported languages.
88 #
89 # This is also used if you do content translation via gettext catalogs.
90 # Usually you set "language" from the command line for these cases.
91 language = "en"
92
93 # There are two options for replacing |today|: either, you set today to some
94 # non-false value, then it is used:
95 # today = ''
96 # Else, today_fmt is used as the format for a strftime call.
97 # today_fmt = '%B %d, %Y'
98
99 # List of patterns, relative to source directory, that match files and
100 # directories to ignore when looking for source files.
101 exclude_patterns = ["_build"]
102
103 # The reST default role (used for this markup: `text`) to use for all
104 # documents.
105 default_role = "literal"
106
107 # If true, '()' will be appended to :func: etc. cross-reference text.
108 # add_function_parentheses = True
109
110 # If true, the current module name will be prepended to all description
111 # unit titles (such as .. function::).
112 # add_module_names = True
113
114 # If true, sectionauthor and moduleauthor directives will be shown in the
115 # output. They are ignored by default.
116 # show_authors = False
117
118 # The name of the Pygments (syntax highlighting) style to use.
119 pygments_style = "sphinx"
120
121 # A list of ignored prefixes for module index sorting.
122 # modindex_common_prefix = []
123
124 # If true, keep warnings as "system message" paragraphs in the built documents.
125 # keep_warnings = False
126
127 # If true, `todo` and `todoList` produce output, else they produce nothing.
128 todo_include_todos = False
129
130
131 # -- Options for HTML output ----------------------------------------------
132
133 # The theme to use for HTML and HTML Help pages. See the documentation for
134 # a list of builtin themes.
135 html_theme = "pydata_sphinx_theme"
136
137 # Theme options are theme-specific and customize the look and feel of a theme
138 # further. For a list of options available for each theme, see the
139 # documentation.
140 html_theme_options = {"navigation_with_keys": False}
141
142 # Add any paths that contain custom themes here, relative to this directory.
143 # html_theme_path = []
144
145 # The name for this set of Sphinx documents. If None, it defaults to
146 # "<project> v<release> documentation".
147 # html_title = None
148
149 # A shorter title for the navigation bar. Default is the same as html_title.
150 # html_short_title = None
151
152 # The name of an image file (relative to this directory) to place at the top
153 # of the sidebar.
154 # html_logo = None
155
156 # The name of an image file (within the static path) to use as favicon of the
157 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
158 # pixels large.
159 # html_favicon = None
160
161 # Add any paths that contain custom static files (such as style sheets) here,
162 # relative to this directory. They are copied after the builtin static files,
163 # so a file named "default.css" will overwrite the builtin "default.css".
164 html_static_path: list[str] = []
165
166 # Add any extra paths that contain custom files (such as robots.txt or
167 # .htaccess) here, relative to this directory. These files are copied
168 # directly to the root of the documentation.
169 # html_extra_path = []
170
171 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
172 # using the given strftime format.
173 # html_last_updated_fmt = '%b %d, %Y'
174
175 # If true, SmartyPants will be used to convert quotes and dashes to
176 # typographically correct entities.
177 # html_use_smartypants = True
178
179 # Custom sidebar templates, maps document names to template names.
180 # html_sidebars = {}
181
182 # Additional templates that should be rendered to pages, maps page names to
183 # template names.
184 # html_additional_pages = {}
185
186 # If false, no module index is generated.
187 # html_domain_indices = True
188
189 # If false, no index is generated.
190 # html_use_index = True
191
192 # If true, the index is split into individual pages for each letter.
193 # html_split_index = False
194
195 # If true, links to the reST sources are added to the pages.
196 # html_show_sourcelink = True
197
198 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
199 # html_show_sphinx = True
200
201 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
202 # html_show_copyright = True
203
204 # If true, an OpenSearch description file will be output, and all pages will
205 # contain a <link> tag referring to it. The value of this option must be the
206 # base URL from which the finished HTML is served.
207 # html_use_opensearch = ''
208
209 # This is the file name suffix for HTML files (e.g. ".xhtml").
210 # html_file_suffix = None
211
212 # Language to be used for generating the HTML full-text search index.
213 # Sphinx supports the following languages:
214 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
215 # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
216 # html_search_language = 'en'
217
218 # A dictionary with options for the search language support, empty by default.
219 # Now only 'ja' uses this config value
220 # html_search_options = {'type': 'default'}
221
222 # The name of a javascript file (relative to the configuration directory) that
223 # implements a search results scorer. If empty, the default will be used.
224 # html_search_scorer = 'scorer.js'
225
226 # Output file base name for HTML help builder.
227 htmlhelp_basename = "ipykerneldoc"
228
229 # -- Options for LaTeX output ---------------------------------------------
230
231 latex_elements: dict[str, object] = {}
232
233 # Grouping the document tree into LaTeX files. List of tuples
234 # (source start file, target name, title,
235 # author, documentclass [howto, manual, or own class]).
236 latex_documents = [
237 (
238 master_doc,
239 "ipykernel.tex",
240 "IPython Kernel Documentation",
241 "IPython Development Team",
242 "manual",
243 ),
244 ]
245
246 # The name of an image file (relative to this directory) to place at the top of
247 # the title page.
248 # latex_logo = None
249
250 # For "manual" documents, if this is true, then toplevel headings are parts,
251 # not chapters.
252 # latex_use_parts = False
253
254 # If true, show page references after internal links.
255 # latex_show_pagerefs = False
256
257 # If true, show URL addresses after external links.
258 # latex_show_urls = False
259
260 # Documents to append as an appendix to all manuals.
261 # latex_appendices = []
262
263 # If false, no module index is generated.
264 # latex_domain_indices = True
265
266
267 # -- Options for manual page output ---------------------------------------
268
269 # One entry per manual page. List of tuples
270 # (source start file, name, description, authors, manual section).
271 man_pages = [(master_doc, "ipykernel", "IPython Kernel Documentation", [author], 1)]
272
273 # If true, show URL addresses after external links.
274 # man_show_urls = False
275
276
277 # -- Options for Texinfo output -------------------------------------------
278
279 # Grouping the document tree into Texinfo files. List of tuples
280 # (source start file, target name, title, author,
281 # dir menu entry, description, category)
282 texinfo_documents = [
283 (
284 master_doc,
285 "ipykernel",
286 "IPython Kernel Documentation",
287 author,
288 "ipykernel",
289 "One line description of project.",
290 "Miscellaneous",
291 ),
292 ]
293
294 # Documents to append as an appendix to all manuals.
295 # texinfo_appendices = []
296
297 # If false, no module index is generated.
298 # texinfo_domain_indices = True
299
300 # How to display URL addresses: 'footnote', 'no', or 'inline'.
301 # texinfo_show_urls = 'footnote'
302
303 # If true, do not generate a @detailmenu in the "Top" node's menu.
304 # texinfo_no_detailmenu = False
305
306
307 # Example configuration for intersphinx: refer to the Python standard library.
308
309
310 intersphinx_mapping = get_intersphinx_mapping(packages={"ipython", "python", "jupyter"})
311
312
313 def setup(app):
314 shutil.copy(Path(here) / ".." / "CHANGELOG.md", "changelog.md")