##// END OF EJS Templates
trying something else
Coco Mishra -
Show More
@@ -0,0 +1,7 b''
1 {%- extends "sphinx_rtd_theme/breadcrumbs.html" %}
2
3 {% block breadcrumbs_aside %}
4 {% if not meta or meta.get('github_url') != 'hide' %}
5 {{ super() }}
6 {% endif %}
7 {% endblock %}
@@ -1,318 +1,318 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 #
2 #
3 # IPython documentation build configuration file.
3 # IPython documentation build configuration file.
4
4
5 # NOTE: This file has been edited manually from the auto-generated one from
5 # NOTE: This file has been edited manually from the auto-generated one from
6 # sphinx. Do NOT delete and re-generate. If any changes from sphinx are
6 # sphinx. Do NOT delete and re-generate. If any changes from sphinx are
7 # needed, generate a scratch one and merge by hand any new fields needed.
7 # needed, generate a scratch one and merge by hand any new fields needed.
8
8
9 #
9 #
10 # This file is execfile()d with the current directory set to its containing dir.
10 # This file is execfile()d with the current directory set to its containing dir.
11 #
11 #
12 # The contents of this file are pickled, so don't put values in the namespace
12 # The contents of this file are pickled, so don't put values in the namespace
13 # that aren't pickleable (module imports are okay, they're removed automatically).
13 # that aren't pickleable (module imports are okay, they're removed automatically).
14 #
14 #
15 # All configuration values have a default value; values that are commented out
15 # All configuration values have a default value; values that are commented out
16 # serve to show the default value.
16 # serve to show the default value.
17
17
18 import sys, os
18 import sys, os
19 from pathlib import Path
19 from pathlib import Path
20
20
21 # http://read-the-docs.readthedocs.io/en/latest/faq.html
21 # http://read-the-docs.readthedocs.io/en/latest/faq.html
22 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
22 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
23
23
24 if ON_RTD:
24 if ON_RTD:
25 tags.add('rtd')
25 tags.add('rtd')
26
26
27 # RTD doesn't use the Makefile, so re-run autogen_{things}.py here.
27 # RTD doesn't use the Makefile, so re-run autogen_{things}.py here.
28 for name in ("config", "api", "magics", "shortcuts"):
28 for name in ("config", "api", "magics", "shortcuts"):
29 fname = Path("autogen_{}.py".format(name))
29 fname = Path("autogen_{}.py".format(name))
30 fpath = (Path(__file__).parent).joinpath("..", fname)
30 fpath = (Path(__file__).parent).joinpath("..", fname)
31 with open(fpath) as f:
31 with open(fpath) as f:
32 exec(compile(f.read(), fname, 'exec'), {
32 exec(compile(f.read(), fname, 'exec'), {
33 '__file__': fpath,
33 '__file__': fpath,
34 '__name__': '__main__',
34 '__name__': '__main__',
35 })
35 })
36 else:
36 else:
37 import sphinx_rtd_theme
37 import sphinx_rtd_theme
38 html_theme = "sphinx_rtd_theme"
38 html_theme = "sphinx_rtd_theme"
39 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
39 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
40
40
41 html_show_sourcelink = False
41 # html_show_sourcelink = False
42
42
43 # If your extensions are in another directory, add it here. If the directory
43 # If your extensions are in another directory, add it here. If the directory
44 # is relative to the documentation root, use os.path.abspath to make it
44 # is relative to the documentation root, use os.path.abspath to make it
45 # absolute, like shown here.
45 # absolute, like shown here.
46 sys.path.insert(0, os.path.abspath('../sphinxext'))
46 sys.path.insert(0, os.path.abspath('../sphinxext'))
47
47
48 # We load the ipython release info into a dict by explicit execution
48 # We load the ipython release info into a dict by explicit execution
49 iprelease = {}
49 iprelease = {}
50 exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease)
50 exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease)
51
51
52 # General configuration
52 # General configuration
53 # ---------------------
53 # ---------------------
54
54
55 # Add any Sphinx extension module names here, as strings. They can be extensions
55 # Add any Sphinx extension module names here, as strings. They can be extensions
56 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
56 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
57 extensions = [
57 extensions = [
58 'sphinx.ext.autodoc',
58 'sphinx.ext.autodoc',
59 'sphinx.ext.autosummary',
59 'sphinx.ext.autosummary',
60 'sphinx.ext.doctest',
60 'sphinx.ext.doctest',
61 'sphinx.ext.inheritance_diagram',
61 'sphinx.ext.inheritance_diagram',
62 'sphinx.ext.intersphinx',
62 'sphinx.ext.intersphinx',
63 'sphinx.ext.graphviz',
63 'sphinx.ext.graphviz',
64 'IPython.sphinxext.ipython_console_highlighting',
64 'IPython.sphinxext.ipython_console_highlighting',
65 'IPython.sphinxext.ipython_directive',
65 'IPython.sphinxext.ipython_directive',
66 'sphinx.ext.napoleon', # to preprocess docstrings
66 'sphinx.ext.napoleon', # to preprocess docstrings
67 'github', # for easy GitHub links
67 'github', # for easy GitHub links
68 'magics',
68 'magics',
69 'configtraits',
69 'configtraits',
70 ]
70 ]
71
71
72 # Add any paths that contain templates here, relative to this directory.
72 # Add any paths that contain templates here, relative to this directory.
73 templates_path = ['_templates']
73 templates_path = ['_templates']
74
74
75 # The suffix of source filenames.
75 # The suffix of source filenames.
76 source_suffix = '.rst'
76 source_suffix = '.rst'
77
77
78 rst_prolog = ''
78 rst_prolog = ''
79
79
80 def is_stable(extra):
80 def is_stable(extra):
81 for ext in {'dev', 'b', 'rc'}:
81 for ext in {'dev', 'b', 'rc'}:
82 if ext in extra:
82 if ext in extra:
83 return False
83 return False
84 return True
84 return True
85
85
86 if is_stable(iprelease['_version_extra']):
86 if is_stable(iprelease['_version_extra']):
87 tags.add('ipystable')
87 tags.add('ipystable')
88 print('Adding Tag: ipystable')
88 print('Adding Tag: ipystable')
89 else:
89 else:
90 tags.add('ipydev')
90 tags.add('ipydev')
91 print('Adding Tag: ipydev')
91 print('Adding Tag: ipydev')
92 rst_prolog += """
92 rst_prolog += """
93 .. warning::
93 .. warning::
94
94
95 This documentation covers a development version of IPython. The development
95 This documentation covers a development version of IPython. The development
96 version may differ significantly from the latest stable release.
96 version may differ significantly from the latest stable release.
97 """
97 """
98
98
99 rst_prolog += """
99 rst_prolog += """
100 .. important::
100 .. important::
101
101
102 This documentation covers IPython versions 6.0 and higher. Beginning with
102 This documentation covers IPython versions 6.0 and higher. Beginning with
103 version 6.0, IPython stopped supporting compatibility with Python versions
103 version 6.0, IPython stopped supporting compatibility with Python versions
104 lower than 3.3 including all versions of Python 2.7.
104 lower than 3.3 including all versions of Python 2.7.
105
105
106 If you are looking for an IPython version compatible with Python 2.7,
106 If you are looking for an IPython version compatible with Python 2.7,
107 please use the IPython 5.x LTS release and refer to its documentation (LTS
107 please use the IPython 5.x LTS release and refer to its documentation (LTS
108 is the long term support release).
108 is the long term support release).
109
109
110 """
110 """
111
111
112 # The master toctree document.
112 # The master toctree document.
113 master_doc = 'index'
113 master_doc = 'index'
114
114
115 # General substitutions.
115 # General substitutions.
116 project = 'IPython'
116 project = 'IPython'
117 copyright = 'The IPython Development Team'
117 copyright = 'The IPython Development Team'
118
118
119 # ghissue config
119 # ghissue config
120 github_project_url = "https://github.com/ipython/ipython"
120 github_project_url = "https://github.com/ipython/ipython"
121
121
122 # numpydoc config
122 # numpydoc config
123 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
123 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
124 numpydoc_class_members_toctree = False
124 numpydoc_class_members_toctree = False
125 warning_is_error = True
125 warning_is_error = True
126
126
127 import logging
127 import logging
128
128
129 class ConfigtraitFilter(logging.Filter):
129 class ConfigtraitFilter(logging.Filter):
130 """
130 """
131 This is a filter to remove in sphinx 3+ the error about config traits being duplicated.
131 This is a filter to remove in sphinx 3+ the error about config traits being duplicated.
132
132
133 As we autogenerate configuration traits from, subclasses have lots of
133 As we autogenerate configuration traits from, subclasses have lots of
134 duplication and we want to silence them. Indeed we build on travis with
134 duplication and we want to silence them. Indeed we build on travis with
135 warnings-as-error set to True, so those duplicate items make the build fail.
135 warnings-as-error set to True, so those duplicate items make the build fail.
136 """
136 """
137
137
138 def filter(self, record):
138 def filter(self, record):
139 if record.args and record.args[0] == 'configtrait' and 'duplicate' in record.msg:
139 if record.args and record.args[0] == 'configtrait' and 'duplicate' in record.msg:
140 return False
140 return False
141 return True
141 return True
142
142
143 ct_filter = ConfigtraitFilter()
143 ct_filter = ConfigtraitFilter()
144
144
145 import sphinx.util
145 import sphinx.util
146 logger = sphinx.util.logging.getLogger('sphinx.domains.std').logger
146 logger = sphinx.util.logging.getLogger('sphinx.domains.std').logger
147
147
148 logger.addFilter(ct_filter)
148 logger.addFilter(ct_filter)
149
149
150 # The default replacements for |version| and |release|, also used in various
150 # The default replacements for |version| and |release|, also used in various
151 # other places throughout the built documents.
151 # other places throughout the built documents.
152 #
152 #
153 # The full version, including alpha/beta/rc tags.
153 # The full version, including alpha/beta/rc tags.
154 release = "%s" % iprelease['version']
154 release = "%s" % iprelease['version']
155 # Just the X.Y.Z part, no '-dev'
155 # Just the X.Y.Z part, no '-dev'
156 version = iprelease['version'].split('-', 1)[0]
156 version = iprelease['version'].split('-', 1)[0]
157
157
158
158
159 # There are two options for replacing |today|: either, you set today to some
159 # There are two options for replacing |today|: either, you set today to some
160 # non-false value, then it is used:
160 # non-false value, then it is used:
161 #today = ''
161 #today = ''
162 # Else, today_fmt is used as the format for a strftime call.
162 # Else, today_fmt is used as the format for a strftime call.
163 today_fmt = '%B %d, %Y'
163 today_fmt = '%B %d, %Y'
164
164
165 # List of documents that shouldn't be included in the build.
165 # List of documents that shouldn't be included in the build.
166 #unused_docs = []
166 #unused_docs = []
167
167
168 # Exclude these glob-style patterns when looking for source files. They are
168 # Exclude these glob-style patterns when looking for source files. They are
169 # relative to the source/ directory.
169 # relative to the source/ directory.
170 exclude_patterns = []
170 exclude_patterns = []
171
171
172
172
173 # If true, '()' will be appended to :func: etc. cross-reference text.
173 # If true, '()' will be appended to :func: etc. cross-reference text.
174 #add_function_parentheses = True
174 #add_function_parentheses = True
175
175
176 # If true, the current module name will be prepended to all description
176 # If true, the current module name will be prepended to all description
177 # unit titles (such as .. function::).
177 # unit titles (such as .. function::).
178 #add_module_names = True
178 #add_module_names = True
179
179
180 # If true, sectionauthor and moduleauthor directives will be shown in the
180 # If true, sectionauthor and moduleauthor directives will be shown in the
181 # output. They are ignored by default.
181 # output. They are ignored by default.
182 #show_authors = False
182 #show_authors = False
183
183
184 # The name of the Pygments (syntax highlighting) style to use.
184 # The name of the Pygments (syntax highlighting) style to use.
185 pygments_style = 'sphinx'
185 pygments_style = 'sphinx'
186
186
187 # Set the default role so we can use `foo` instead of ``foo``
187 # Set the default role so we can use `foo` instead of ``foo``
188 default_role = 'literal'
188 default_role = 'literal'
189
189
190 # Options for HTML output
190 # Options for HTML output
191 # -----------------------
191 # -----------------------
192
192
193 # The style sheet to use for HTML and HTML Help pages. A file of that name
193 # The style sheet to use for HTML and HTML Help pages. A file of that name
194 # must exist either in Sphinx' static/ path, or in one of the custom paths
194 # must exist either in Sphinx' static/ path, or in one of the custom paths
195 # given in html_static_path.
195 # given in html_static_path.
196 # html_style = 'default.css'
196 # html_style = 'default.css'
197
197
198
198
199 # The name for this set of Sphinx documents. If None, it defaults to
199 # The name for this set of Sphinx documents. If None, it defaults to
200 # "<project> v<release> documentation".
200 # "<project> v<release> documentation".
201 #html_title = None
201 #html_title = None
202
202
203 # The name of an image file (within the static path) to place at the top of
203 # The name of an image file (within the static path) to place at the top of
204 # the sidebar.
204 # the sidebar.
205 #html_logo = None
205 #html_logo = None
206
206
207 # Add any paths that contain custom static files (such as style sheets) here,
207 # Add any paths that contain custom static files (such as style sheets) here,
208 # relative to this directory. They are copied after the builtin static files,
208 # relative to this directory. They are copied after the builtin static files,
209 # so a file named "default.css" will overwrite the builtin "default.css".
209 # so a file named "default.css" will overwrite the builtin "default.css".
210 html_static_path = ['_static']
210 html_static_path = ['_static']
211
211
212 # Favicon needs the directory name
212 # Favicon needs the directory name
213 html_favicon = '_static/favicon.ico'
213 html_favicon = '_static/favicon.ico'
214 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
214 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
215 # using the given strftime format.
215 # using the given strftime format.
216 html_last_updated_fmt = '%b %d, %Y'
216 html_last_updated_fmt = '%b %d, %Y'
217
217
218 # If true, SmartyPants will be used to convert quotes and dashes to
218 # If true, SmartyPants will be used to convert quotes and dashes to
219 # typographically correct entities.
219 # typographically correct entities.
220 #html_use_smartypants = True
220 #html_use_smartypants = True
221
221
222 # Custom sidebar templates, maps document names to template names.
222 # Custom sidebar templates, maps document names to template names.
223 #html_sidebars = {}
223 #html_sidebars = {}
224
224
225 # Additional templates that should be rendered to pages, maps page names to
225 # Additional templates that should be rendered to pages, maps page names to
226 # template names.
226 # template names.
227 html_additional_pages = {
227 html_additional_pages = {
228 'interactive/htmlnotebook': 'notebook_redirect.html',
228 'interactive/htmlnotebook': 'notebook_redirect.html',
229 'interactive/notebook': 'notebook_redirect.html',
229 'interactive/notebook': 'notebook_redirect.html',
230 'interactive/nbconvert': 'notebook_redirect.html',
230 'interactive/nbconvert': 'notebook_redirect.html',
231 'interactive/public_server': 'notebook_redirect.html',
231 'interactive/public_server': 'notebook_redirect.html',
232 }
232 }
233
233
234 # If false, no module index is generated.
234 # If false, no module index is generated.
235 #html_use_modindex = True
235 #html_use_modindex = True
236
236
237 # If true, the reST sources are included in the HTML build as _sources/<name>.
237 # If true, the reST sources are included in the HTML build as _sources/<name>.
238 #html_copy_source = True
238 #html_copy_source = True
239
239
240 # If true, an OpenSearch description file will be output, and all pages will
240 # If true, an OpenSearch description file will be output, and all pages will
241 # contain a <link> tag referring to it. The value of this option must be the
241 # contain a <link> tag referring to it. The value of this option must be the
242 # base URL from which the finished HTML is served.
242 # base URL from which the finished HTML is served.
243 #html_use_opensearch = ''
243 #html_use_opensearch = ''
244
244
245 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
245 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
246 #html_file_suffix = ''
246 #html_file_suffix = ''
247
247
248 # Output file base name for HTML help builder.
248 # Output file base name for HTML help builder.
249 htmlhelp_basename = 'ipythondoc'
249 htmlhelp_basename = 'ipythondoc'
250
250
251 intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
251 intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
252 'rpy2': ('https://rpy2.github.io/doc/latest/html/', None),
252 'rpy2': ('https://rpy2.github.io/doc/latest/html/', None),
253 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None),
253 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None),
254 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
254 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
255 'jedi': ('https://jedi.readthedocs.io/en/latest/', None),
255 'jedi': ('https://jedi.readthedocs.io/en/latest/', None),
256 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
256 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
257 'ipykernel': ('https://ipykernel.readthedocs.io/en/latest/', None),
257 'ipykernel': ('https://ipykernel.readthedocs.io/en/latest/', None),
258 'prompt_toolkit' : ('https://python-prompt-toolkit.readthedocs.io/en/stable/', None),
258 'prompt_toolkit' : ('https://python-prompt-toolkit.readthedocs.io/en/stable/', None),
259 'ipywidgets': ('https://ipywidgets.readthedocs.io/en/stable/', None),
259 'ipywidgets': ('https://ipywidgets.readthedocs.io/en/stable/', None),
260 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/stable/', None),
260 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/stable/', None),
261 'pip': ('https://pip.pypa.io/en/stable/', None)
261 'pip': ('https://pip.pypa.io/en/stable/', None)
262 }
262 }
263
263
264 # Options for LaTeX output
264 # Options for LaTeX output
265 # ------------------------
265 # ------------------------
266
266
267 # The font size ('10pt', '11pt' or '12pt').
267 # The font size ('10pt', '11pt' or '12pt').
268 latex_font_size = '11pt'
268 latex_font_size = '11pt'
269
269
270 # Grouping the document tree into LaTeX files. List of tuples
270 # Grouping the document tree into LaTeX files. List of tuples
271 # (source start file, target name, title, author, document class [howto/manual]).
271 # (source start file, target name, title, author, document class [howto/manual]).
272
272
273 latex_documents = [
273 latex_documents = [
274 ('index', 'ipython.tex', 'IPython Documentation',
274 ('index', 'ipython.tex', 'IPython Documentation',
275 u"""The IPython Development Team""", 'manual', True),
275 u"""The IPython Development Team""", 'manual', True),
276 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
276 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
277 'Using IPython on Windows HPC Server 2008',
277 'Using IPython on Windows HPC Server 2008',
278 u"Brian E. Granger", 'manual', True)
278 u"Brian E. Granger", 'manual', True)
279 ]
279 ]
280
280
281 # The name of an image file (relative to this directory) to place at the top of
281 # The name of an image file (relative to this directory) to place at the top of
282 # the title page.
282 # the title page.
283 #latex_logo = None
283 #latex_logo = None
284
284
285 # For "manual" documents, if this is true, then toplevel headings are parts,
285 # For "manual" documents, if this is true, then toplevel headings are parts,
286 # not chapters.
286 # not chapters.
287 #latex_use_parts = False
287 #latex_use_parts = False
288
288
289 # Additional stuff for the LaTeX preamble.
289 # Additional stuff for the LaTeX preamble.
290 #latex_preamble = ''
290 #latex_preamble = ''
291
291
292 # Documents to append as an appendix to all manuals.
292 # Documents to append as an appendix to all manuals.
293 #latex_appendices = []
293 #latex_appendices = []
294
294
295 # If false, no module index is generated.
295 # If false, no module index is generated.
296 latex_use_modindex = True
296 latex_use_modindex = True
297
297
298
298
299 # Options for texinfo output
299 # Options for texinfo output
300 # --------------------------
300 # --------------------------
301
301
302 texinfo_documents = [
302 texinfo_documents = [
303 (master_doc, 'ipython', 'IPython Documentation',
303 (master_doc, 'ipython', 'IPython Documentation',
304 'The IPython Development Team',
304 'The IPython Development Team',
305 'IPython',
305 'IPython',
306 'IPython Documentation',
306 'IPython Documentation',
307 'Programming',
307 'Programming',
308 1),
308 1),
309 ]
309 ]
310
310
311 modindex_common_prefix = ['IPython.']
311 modindex_common_prefix = ['IPython.']
312
312
313
313
314 # Cleanup
314 # Cleanup
315 # -------
315 # -------
316 # delete release info to avoid pickling errors from sphinx
316 # delete release info to avoid pickling errors from sphinx
317
317
318 del iprelease
318 del iprelease
General Comments 0
You need to be logged in to leave comments. Login now