Debian Codegraph @

docs/conf.py

raw ◀ ▶
2 Debian patches touch this file
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # Jupyter console documentation build configuration file, created by
5 # sphinx-quickstart on Mon Jun 8 14:18:13 2015.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing 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 sys
17 import os
18 import shlex
19 import shutil
20 from typing import Dict
21
22 # If extensions (or modules to document with autodoc) are in another directory,
23 # add these directories to sys.path here. If the directory is relative to the
24 # documentation root, use os.path.abspath to make it absolute, like shown here.
25
26 # add repo root to sys.path
27 # docs_dir = root/docs
28 docsdir = os.path.abspath(os.path.dirname(__file__))
29 reporoot = os.path.dirname(os.path.dirname(docsdir))
30 sys.path.insert(0, reporoot)
31
32
33 if os.environ.get('READTHEDOCS', ''):
34 # RTD doesn't use the Makefile, so re-run autogen_config.py here.
35
36 with open('autogen_config.py') as f:
37 exec(compile(f.read(), 'autogen_config.py', 'exec'), {})
38
39 # -- General configuration ------------------------------------------------
40
41 # If your documentation needs a minimal Sphinx version, state it here.
42 #needs_sphinx = '1.0'
43
44 # Add any Sphinx extension module names here, as strings. They can be
45 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
46 # ones.
47 extensions = [
48 'sphinx.ext.intersphinx',
49 ]
50
51 github_project_url = "https://github.com/jupyter/jupyter_console"
52
53 # Add any paths that contain templates here, relative to this directory.
54 templates_path = ['_templates']
55
56 # The suffix(es) of source filenames.
57 # You can specify multiple suffix as a list of string:
58 # source_suffix = ['.rst', '.md']
59 source_suffix = '.rst'
60
61 # The encoding of source files.
62 #source_encoding = 'utf-8-sig'
63
64 # The master toctree document.
65 master_doc = 'index'
66
67 # General information about the project.
68 project = 'Jupyter console'
69 copyright = '2015, The Jupyter Development Team'
70 author = 'The Jupyter Development Team'
71
72 # The version info for the project you're documenting, acts as replacement for
73 # |version| and |release|, also used in various other places throughout the
74 # built documents.
75 #
76
77 version_ns: Dict = {}
78 version_py = os.path.join('..', 'jupyter_console', '_version.py')
79 with open(version_py) as f:
80 exec(compile(f.read(), version_py, 'exec'), version_ns)
81
82 # The short X.Y version.
83 version = '%i.%i' % version_ns['version_info'][:2]
84 # The full version, including alpha/beta/rc tags.
85 release = version_ns['__version__']
86
87 # The language for content autogenerated by Sphinx. Refer to documentation
88 # for a list of supported languages.
89 #
90 # This is also used if you do content translation via gettext catalogs.
91 # Usually you set "language" from the command line for these cases.
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 # A list of ignored prefixes for module index sorting.
123 #modindex_common_prefix = []
124
125 # If true, keep warnings as "system message" paragraphs in the built documents.
126 #keep_warnings = False
127
128 # If true, `todo` and `todoList` produce output, else they produce nothing.
129 todo_include_todos = 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 = 'alabaster'
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
143 # Add any paths that contain custom themes here, relative to this directory.
144 #html_theme_path = []
145
146 # The name for this set of Sphinx documents. If None, it defaults to
147 # "<project> v<release> documentation".
148 #html_title = None
149
150 # A shorter title for the navigation bar. Default is the same as html_title.
151 #html_short_title = None
152
153 # The name of an image file (relative to this directory) to place at the top
154 # of the sidebar.
155 #html_logo = None
156
157 # The name of an image file (within the static path) to use as favicon of the
158 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
159 # pixels large.
160 #html_favicon = None
161
162 # Add any paths that contain custom static files (such as style sheets) here,
163 # relative to this directory. They are copied after the builtin static files,
164 # so a file named "default.css" will overwrite the builtin "default.css".
165 #html_static_path = ['_static']
166
167 # Add any extra paths that contain custom files (such as robots.txt or
168 # .htaccess) here, relative to this directory. These files are copied
169 # directly to the root of the documentation.
170 #html_extra_path = []
171
172 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
173 # using the given strftime format.
174 #html_last_updated_fmt = '%b %d, %Y'
175
176 # If true, SmartyPants will be used to convert quotes and dashes to
177 # typographically correct entities.
178 #html_use_smartypants = True
179
180 # Custom sidebar templates, maps document names to template names.
181 #html_sidebars = {}
182
183 # Additional templates that should be rendered to pages, maps page names to
184 # template names.
185 #html_additional_pages = {}
186
187 # If false, no module index is generated.
188 #html_domain_indices = True
189
190 # If false, no index is generated.
191 #html_use_index = True
192
193 # If true, the index is split into individual pages for each letter.
194 #html_split_index = False
195
196 # If true, links to the reST sources are added to the pages.
197 #html_show_sourcelink = True
198
199 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
200 #html_show_sphinx = True
201
202 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
203 #html_show_copyright = True
204
205 # If true, an OpenSearch description file will be output, and all pages will
206 # contain a <link> tag referring to it. The value of this option must be the
207 # base URL from which the finished HTML is served.
208 #html_use_opensearch = ''
209
210 # This is the file name suffix for HTML files (e.g. ".xhtml").
211 #html_file_suffix = None
212
213 # Language to be used for generating the HTML full-text search index.
214 # Sphinx supports the following languages:
215 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
216 # 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
217 #html_search_language = 'en'
218
219 # A dictionary with options for the search language support, empty by default.
220 # Now only 'ja' uses this config value
221 #html_search_options = {'type': 'default'}
222
223 # The name of a javascript file (relative to the configuration directory) that
224 # implements a search results scorer. If empty, the default will be used.
225 #html_search_scorer = 'scorer.js'
226
227 # Output file base name for HTML help builder.
228 htmlhelp_basename = 'Jupyterconsoledoc'
229
230 # -- Options for LaTeX output ---------------------------------------------
231
232 #latex_elements = {
233 # The paper size ('letterpaper' or 'a4paper').
234 #'papersize': 'letterpaper',
235
236 # The font size ('10pt', '11pt' or '12pt').
237 #'pointsize': '10pt',
238
239 # Additional stuff for the LaTeX preamble.
240 #'preamble': '',
241
242 # Latex figure (float) alignment
243 #'figure_align': 'htbp',
244 #}
245
246 # Grouping the document tree into LaTeX files. List of tuples
247 # (source start file, target name, title,
248 # author, documentclass [howto, manual, or own class]).
249 latex_documents = [
250 (master_doc, 'Jupyterconsole.tex', 'Jupyter console Documentation',
251 'The Jupyter Development Team', 'manual'),
252 ]
253
254 # The name of an image file (relative to this directory) to place at the top of
255 # the title page.
256 #latex_logo = None
257
258 # For "manual" documents, if this is true, then toplevel headings are parts,
259 # not chapters.
260 #latex_use_parts = False
261
262 # If true, show page references after internal links.
263 #latex_show_pagerefs = False
264
265 # If true, show URL addresses after external links.
266 #latex_show_urls = False
267
268 # Documents to append as an appendix to all manuals.
269 #latex_appendices = []
270
271 # If false, no module index is generated.
272 #latex_domain_indices = True
273
274
275 # -- Options for manual page output ---------------------------------------
276
277 # One entry per manual page. List of tuples
278 # (source start file, name, description, authors, manual section).
279 man_pages = [
280 (master_doc, 'jupyterconsole', 'Jupyter console Documentation',
281 [author], 1)
282 ]
283
284 # If true, show URL addresses after external links.
285 #man_show_urls = False
286
287
288 # -- Options for Texinfo output -------------------------------------------
289
290 # Grouping the document tree into Texinfo files. List of tuples
291 # (source start file, target name, title, author,
292 # dir menu entry, description, category)
293 texinfo_documents = [
294 (master_doc, 'Jupyterconsole', 'Jupyter console Documentation',
295 author, 'Jupyterconsole', 'One line description of project.',
296 'Miscellaneous'),
297 ]
298
299 # Documents to append as an appendix to all manuals.
300 #texinfo_appendices = []
301
302 # If false, no module index is generated.
303 #texinfo_domain_indices = True
304
305 # How to display URL addresses: 'footnote', 'no', or 'inline'.
306 #texinfo_show_urls = 'footnote'
307
308 # If true, do not generate a @detailmenu in the "Top" node's menu.
309 #texinfo_no_detailmenu = False
310
311
312 # Example configuration for intersphinx: refer to the Python standard library.
•313 intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
314
315 # on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
316 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
317
318 if not on_rtd: # only import and set the theme if we're building docs locally
319 import sphinx_rtd_theme
320 html_theme = 'sphinx_rtd_theme'
321 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
322
323 # otherwise, readthedocs.org uses their theme by default, so no need to specify it
324
325
326 def setup(app):
327 HERE = os.path.abspath(os.path.dirname(__file__))
328 dest = os.path.join(HERE, 'changelog.md')
329 shutil.copy(os.path.join(HERE, '..', 'CHANGELOG.md'), dest)