##// END OF EJS Templates
Update phrasing with Carol suggestions.
Matthias Bussonnier -
Show More
@@ -1,295 +1,298 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
19
20 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
20 ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
21
21
22 if ON_RTD:
22 if ON_RTD:
23 # Mock the presence of matplotlib, which we don't have on RTD
23 # Mock the presence of matplotlib, which we don't have on RTD
24 # see
24 # see
25 # http://read-the-docs.readthedocs.io/en/latest/faq.html
25 # http://read-the-docs.readthedocs.io/en/latest/faq.html
26 tags.add('rtd')
26 tags.add('rtd')
27
27
28 # RTD doesn't use the Makefile, so re-run autogen_{things}.py here.
28 # RTD doesn't use the Makefile, so re-run autogen_{things}.py here.
29 for name in ('config', 'api', 'magics', 'shortcuts'):
29 for name in ('config', 'api', 'magics', 'shortcuts'):
30 fname = 'autogen_{}.py'.format(name)
30 fname = 'autogen_{}.py'.format(name)
31 fpath = os.path.abspath(os.path.join('..', fname))
31 fpath = os.path.abspath(os.path.join('..', fname))
32 with open(fpath) as f:
32 with open(fpath) as f:
33 exec(compile(f.read(), fname, 'exec'), {
33 exec(compile(f.read(), fname, 'exec'), {
34 '__file__': fpath,
34 '__file__': fpath,
35 '__name__': '__main__',
35 '__name__': '__main__',
36 })
36 })
37 else:
37 else:
38 import sphinx_rtd_theme
38 import sphinx_rtd_theme
39 html_theme = "sphinx_rtd_theme"
39 html_theme = "sphinx_rtd_theme"
40 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
40 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
41
41
42 # If your extensions are in another directory, add it here. If the directory
42 # If your extensions are in another directory, add it here. If the directory
43 # is relative to the documentation root, use os.path.abspath to make it
43 # is relative to the documentation root, use os.path.abspath to make it
44 # absolute, like shown here.
44 # absolute, like shown here.
45 sys.path.insert(0, os.path.abspath('../sphinxext'))
45 sys.path.insert(0, os.path.abspath('../sphinxext'))
46
46
47 # We load the ipython release info into a dict by explicit execution
47 # We load the ipython release info into a dict by explicit execution
48 iprelease = {}
48 iprelease = {}
49 exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease)
49 exec(compile(open('../../IPython/core/release.py').read(), '../../IPython/core/release.py', 'exec'),iprelease)
50
50
51 # General configuration
51 # General configuration
52 # ---------------------
52 # ---------------------
53
53
54 # Add any Sphinx extension module names here, as strings. They can be extensions
54 # Add any Sphinx extension module names here, as strings. They can be extensions
55 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
55 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
56 extensions = [
56 extensions = [
57 'matplotlib.sphinxext.mathmpl',
57 'matplotlib.sphinxext.mathmpl',
58 'matplotlib.sphinxext.only_directives',
58 'matplotlib.sphinxext.only_directives',
59 'matplotlib.sphinxext.plot_directive',
59 'matplotlib.sphinxext.plot_directive',
60 'sphinx.ext.autodoc',
60 'sphinx.ext.autodoc',
61 'sphinx.ext.autosummary',
61 'sphinx.ext.autosummary',
62 'sphinx.ext.doctest',
62 'sphinx.ext.doctest',
63 'sphinx.ext.inheritance_diagram',
63 'sphinx.ext.inheritance_diagram',
64 'sphinx.ext.intersphinx',
64 'sphinx.ext.intersphinx',
65 'IPython.sphinxext.ipython_console_highlighting',
65 'IPython.sphinxext.ipython_console_highlighting',
66 'IPython.sphinxext.ipython_directive',
66 'IPython.sphinxext.ipython_directive',
67 'sphinx.ext.napoleon', # to preprocess docstrings
67 'sphinx.ext.napoleon', # to preprocess docstrings
68 'github', # for easy GitHub links
68 'github', # for easy GitHub links
69 'magics',
69 'magics',
70 ]
70 ]
71
71
72 if ON_RTD:
72 if ON_RTD:
73 # Remove extensions not currently supported on RTD
73 # Remove extensions not currently supported on RTD
74 extensions.remove('matplotlib.sphinxext.only_directives')
74 extensions.remove('matplotlib.sphinxext.only_directives')
75 extensions.remove('matplotlib.sphinxext.mathmpl')
75 extensions.remove('matplotlib.sphinxext.mathmpl')
76 extensions.remove('matplotlib.sphinxext.plot_directive')
76 extensions.remove('matplotlib.sphinxext.plot_directive')
77 extensions.remove('IPython.sphinxext.ipython_directive')
77 extensions.remove('IPython.sphinxext.ipython_directive')
78 extensions.remove('IPython.sphinxext.ipython_console_highlighting')
78 extensions.remove('IPython.sphinxext.ipython_console_highlighting')
79
79
80 # Add any paths that contain templates here, relative to this directory.
80 # Add any paths that contain templates here, relative to this directory.
81 templates_path = ['_templates']
81 templates_path = ['_templates']
82
82
83 # The suffix of source filenames.
83 # The suffix of source filenames.
84 source_suffix = '.rst'
84 source_suffix = '.rst'
85
85
86 rst_prolog = ''
86 rst_prolog = ''
87
87
88 def is_stable(extra):
88 def is_stable(extra):
89 for ext in {'dev', 'b', 'rc'}:
89 for ext in {'dev', 'b', 'rc'}:
90 if ext in extra:
90 if ext in extra:
91 return False
91 return False
92 return True
92 return True
93
93
94 if is_stable(iprelease['_version_extra']):
94 if is_stable(iprelease['_version_extra']):
95 tags.add('ipystable')
95 tags.add('ipystable')
96 else:
96 else:
97 tags.add('ipydev')
97 tags.add('ipydev')
98 rst_prolog += """
98 rst_prolog += """
99 .. warning::
99 .. warning::
100
100
101 This documentation is for a development version of IPython. There may be
101 This documentation covers a development version of IPython. The development
102 significant differences from the latest stable release.
102 version may differ significantly from the latest stable release.
103 """
103 """
104
104
105 rst_prolog += """
105 rst_prolog += """
106 .. important::
106 .. important::
107
107
108 This is the documentation for IPython version > 6.0 which is had
108 This documentation covers IPython versions 6.0 and higher. Beginning with
109 stopped compatibility for python version lower than 3.3. If you are
109 version 6.0, IPython stopped supporting compatibility with Python versions
110 looking for a version of IPython compatible with python 2.7 please see
110 lower than 3.3 including all versions of Python 2.7.
111 the documentation for the IPython 5.x LTS (Long term support branch)
111
112 If you are looking for an IPython version compatible with Python 2.7,
113 please use the IPython 5.x LTS release and refer to its documentation (LTS
114 is the long term support release).
112
115
113 """
116 """
114
117
115 # The master toctree document.
118 # The master toctree document.
116 master_doc = 'index'
119 master_doc = 'index'
117
120
118 # General substitutions.
121 # General substitutions.
119 project = 'IPython'
122 project = 'IPython'
120 copyright = 'The IPython Development Team'
123 copyright = 'The IPython Development Team'
121
124
122 # ghissue config
125 # ghissue config
123 github_project_url = "https://github.com/ipython/ipython"
126 github_project_url = "https://github.com/ipython/ipython"
124
127
125 # numpydoc config
128 # numpydoc config
126 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
129 numpydoc_show_class_members = False # Otherwise Sphinx emits thousands of warnings
127 numpydoc_class_members_toctree = False
130 numpydoc_class_members_toctree = False
128
131
129 # The default replacements for |version| and |release|, also used in various
132 # The default replacements for |version| and |release|, also used in various
130 # other places throughout the built documents.
133 # other places throughout the built documents.
131 #
134 #
132 # The full version, including alpha/beta/rc tags.
135 # The full version, including alpha/beta/rc tags.
133 release = "%s" % iprelease['version']
136 release = "%s" % iprelease['version']
134 # Just the X.Y.Z part, no '-dev'
137 # Just the X.Y.Z part, no '-dev'
135 version = iprelease['version'].split('-', 1)[0]
138 version = iprelease['version'].split('-', 1)[0]
136
139
137
140
138 # There are two options for replacing |today|: either, you set today to some
141 # There are two options for replacing |today|: either, you set today to some
139 # non-false value, then it is used:
142 # non-false value, then it is used:
140 #today = ''
143 #today = ''
141 # Else, today_fmt is used as the format for a strftime call.
144 # Else, today_fmt is used as the format for a strftime call.
142 today_fmt = '%B %d, %Y'
145 today_fmt = '%B %d, %Y'
143
146
144 # List of documents that shouldn't be included in the build.
147 # List of documents that shouldn't be included in the build.
145 #unused_docs = []
148 #unused_docs = []
146
149
147 # Exclude these glob-style patterns when looking for source files. They are
150 # Exclude these glob-style patterns when looking for source files. They are
148 # relative to the source/ directory.
151 # relative to the source/ directory.
149 exclude_patterns = ['whatsnew/pr']
152 exclude_patterns = ['whatsnew/pr']
150
153
151
154
152 # If true, '()' will be appended to :func: etc. cross-reference text.
155 # If true, '()' will be appended to :func: etc. cross-reference text.
153 #add_function_parentheses = True
156 #add_function_parentheses = True
154
157
155 # If true, the current module name will be prepended to all description
158 # If true, the current module name will be prepended to all description
156 # unit titles (such as .. function::).
159 # unit titles (such as .. function::).
157 #add_module_names = True
160 #add_module_names = True
158
161
159 # If true, sectionauthor and moduleauthor directives will be shown in the
162 # If true, sectionauthor and moduleauthor directives will be shown in the
160 # output. They are ignored by default.
163 # output. They are ignored by default.
161 #show_authors = False
164 #show_authors = False
162
165
163 # The name of the Pygments (syntax highlighting) style to use.
166 # The name of the Pygments (syntax highlighting) style to use.
164 pygments_style = 'sphinx'
167 pygments_style = 'sphinx'
165
168
166 # Set the default role so we can use `foo` instead of ``foo``
169 # Set the default role so we can use `foo` instead of ``foo``
167 default_role = 'literal'
170 default_role = 'literal'
168
171
169 # Options for HTML output
172 # Options for HTML output
170 # -----------------------
173 # -----------------------
171
174
172 # The style sheet to use for HTML and HTML Help pages. A file of that name
175 # The style sheet to use for HTML and HTML Help pages. A file of that name
173 # must exist either in Sphinx' static/ path, or in one of the custom paths
176 # must exist either in Sphinx' static/ path, or in one of the custom paths
174 # given in html_static_path.
177 # given in html_static_path.
175 # html_style = 'default.css'
178 # html_style = 'default.css'
176
179
177
180
178 # The name for this set of Sphinx documents. If None, it defaults to
181 # The name for this set of Sphinx documents. If None, it defaults to
179 # "<project> v<release> documentation".
182 # "<project> v<release> documentation".
180 #html_title = None
183 #html_title = None
181
184
182 # The name of an image file (within the static path) to place at the top of
185 # The name of an image file (within the static path) to place at the top of
183 # the sidebar.
186 # the sidebar.
184 #html_logo = None
187 #html_logo = None
185
188
186 # Add any paths that contain custom static files (such as style sheets) here,
189 # Add any paths that contain custom static files (such as style sheets) here,
187 # relative to this directory. They are copied after the builtin static files,
190 # relative to this directory. They are copied after the builtin static files,
188 # so a file named "default.css" will overwrite the builtin "default.css".
191 # so a file named "default.css" will overwrite the builtin "default.css".
189 html_static_path = ['_static']
192 html_static_path = ['_static']
190
193
191 # Favicon needs the directory name
194 # Favicon needs the directory name
192 html_favicon = '_static/favicon.ico'
195 html_favicon = '_static/favicon.ico'
193 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
196 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
194 # using the given strftime format.
197 # using the given strftime format.
195 html_last_updated_fmt = '%b %d, %Y'
198 html_last_updated_fmt = '%b %d, %Y'
196
199
197 # If true, SmartyPants will be used to convert quotes and dashes to
200 # If true, SmartyPants will be used to convert quotes and dashes to
198 # typographically correct entities.
201 # typographically correct entities.
199 #html_use_smartypants = True
202 #html_use_smartypants = True
200
203
201 # Custom sidebar templates, maps document names to template names.
204 # Custom sidebar templates, maps document names to template names.
202 #html_sidebars = {}
205 #html_sidebars = {}
203
206
204 # Additional templates that should be rendered to pages, maps page names to
207 # Additional templates that should be rendered to pages, maps page names to
205 # template names.
208 # template names.
206 html_additional_pages = {
209 html_additional_pages = {
207 'interactive/htmlnotebook': 'notebook_redirect.html',
210 'interactive/htmlnotebook': 'notebook_redirect.html',
208 'interactive/notebook': 'notebook_redirect.html',
211 'interactive/notebook': 'notebook_redirect.html',
209 'interactive/nbconvert': 'notebook_redirect.html',
212 'interactive/nbconvert': 'notebook_redirect.html',
210 'interactive/public_server': 'notebook_redirect.html',
213 'interactive/public_server': 'notebook_redirect.html',
211 }
214 }
212
215
213 # If false, no module index is generated.
216 # If false, no module index is generated.
214 #html_use_modindex = True
217 #html_use_modindex = True
215
218
216 # If true, the reST sources are included in the HTML build as _sources/<name>.
219 # If true, the reST sources are included in the HTML build as _sources/<name>.
217 #html_copy_source = True
220 #html_copy_source = True
218
221
219 # If true, an OpenSearch description file will be output, and all pages will
222 # If true, an OpenSearch description file will be output, and all pages will
220 # contain a <link> tag referring to it. The value of this option must be the
223 # contain a <link> tag referring to it. The value of this option must be the
221 # base URL from which the finished HTML is served.
224 # base URL from which the finished HTML is served.
222 #html_use_opensearch = ''
225 #html_use_opensearch = ''
223
226
224 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
227 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
225 #html_file_suffix = ''
228 #html_file_suffix = ''
226
229
227 # Output file base name for HTML help builder.
230 # Output file base name for HTML help builder.
228 htmlhelp_basename = 'ipythondoc'
231 htmlhelp_basename = 'ipythondoc'
229
232
230 intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
233 intersphinx_mapping = {'python': ('https://docs.python.org/3/', None),
231 'rpy2': ('https://rpy2.readthedocs.io/en/version_2.8.x/', None),
234 'rpy2': ('https://rpy2.readthedocs.io/en/version_2.8.x/', None),
232 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
235 'traitlets': ('https://traitlets.readthedocs.io/en/latest/', None),
233 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None),
236 'jupyterclient': ('https://jupyter-client.readthedocs.io/en/latest/', None),
234 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/latest/', None),
237 'ipyparallel': ('https://ipyparallel.readthedocs.io/en/latest/', None),
235 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
238 'jupyter': ('https://jupyter.readthedocs.io/en/latest/', None),
236 }
239 }
237
240
238 # Options for LaTeX output
241 # Options for LaTeX output
239 # ------------------------
242 # ------------------------
240
243
241 # The paper size ('letter' or 'a4').
244 # The paper size ('letter' or 'a4').
242 latex_paper_size = 'letter'
245 latex_paper_size = 'letter'
243
246
244 # The font size ('10pt', '11pt' or '12pt').
247 # The font size ('10pt', '11pt' or '12pt').
245 latex_font_size = '11pt'
248 latex_font_size = '11pt'
246
249
247 # Grouping the document tree into LaTeX files. List of tuples
250 # Grouping the document tree into LaTeX files. List of tuples
248 # (source start file, target name, title, author, document class [howto/manual]).
251 # (source start file, target name, title, author, document class [howto/manual]).
249
252
250 latex_documents = [
253 latex_documents = [
251 ('index', 'ipython.tex', 'IPython Documentation',
254 ('index', 'ipython.tex', 'IPython Documentation',
252 u"""The IPython Development Team""", 'manual', True),
255 u"""The IPython Development Team""", 'manual', True),
253 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
256 ('parallel/winhpc_index', 'winhpc_whitepaper.tex',
254 'Using IPython on Windows HPC Server 2008',
257 'Using IPython on Windows HPC Server 2008',
255 u"Brian E. Granger", 'manual', True)
258 u"Brian E. Granger", 'manual', True)
256 ]
259 ]
257
260
258 # The name of an image file (relative to this directory) to place at the top of
261 # The name of an image file (relative to this directory) to place at the top of
259 # the title page.
262 # the title page.
260 #latex_logo = None
263 #latex_logo = None
261
264
262 # For "manual" documents, if this is true, then toplevel headings are parts,
265 # For "manual" documents, if this is true, then toplevel headings are parts,
263 # not chapters.
266 # not chapters.
264 #latex_use_parts = False
267 #latex_use_parts = False
265
268
266 # Additional stuff for the LaTeX preamble.
269 # Additional stuff for the LaTeX preamble.
267 #latex_preamble = ''
270 #latex_preamble = ''
268
271
269 # Documents to append as an appendix to all manuals.
272 # Documents to append as an appendix to all manuals.
270 #latex_appendices = []
273 #latex_appendices = []
271
274
272 # If false, no module index is generated.
275 # If false, no module index is generated.
273 latex_use_modindex = True
276 latex_use_modindex = True
274
277
275
278
276 # Options for texinfo output
279 # Options for texinfo output
277 # --------------------------
280 # --------------------------
278
281
279 texinfo_documents = [
282 texinfo_documents = [
280 (master_doc, 'ipython', 'IPython Documentation',
283 (master_doc, 'ipython', 'IPython Documentation',
281 'The IPython Development Team',
284 'The IPython Development Team',
282 'IPython',
285 'IPython',
283 'IPython Documentation',
286 'IPython Documentation',
284 'Programming',
287 'Programming',
285 1),
288 1),
286 ]
289 ]
287
290
288 modindex_common_prefix = ['IPython.']
291 modindex_common_prefix = ['IPython.']
289
292
290
293
291 # Cleanup
294 # Cleanup
292 # -------
295 # -------
293 # delete release info to avoid pickling errors from sphinx
296 # delete release info to avoid pickling errors from sphinx
294
297
295 del iprelease
298 del iprelease
@@ -1,252 +1,252 b''
1 .. _release_process:
1 .. _release_process:
2
2
3 =======================
3 =======================
4 IPython release process
4 IPython release process
5 =======================
5 =======================
6
6
7 This document contains the process that is used to create an IPython release.
7 This document contains the process that is used to create an IPython release.
8
8
9 Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython``
9 Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython``
10 repository automates most of the release process. This document serves as a
10 repository automates most of the release process. This document serves as a
11 handy reminder and checklist for the release manager.
11 handy reminder and checklist for the release manager.
12
12
13 During the release process, you might need the extra following dependencies:
13 During the release process, you might need the extra following dependencies:
14
14
15 - ``keyring`` to access your GitHub authentication tokens
15 - ``keyring`` to access your GitHub authentication tokens
16 - ``graphviz`` to generate some graphs in the documentation
16 - ``graphviz`` to generate some graphs in the documentation
17
17
18 Make sure you have all the required dependencies to run the tests as well.
18 Make sure you have all the required dependencies to run the tests as well.
19
19
20
20
21 1. Set Environment variables
21 1. Set Environment variables
22 ----------------------------
22 ----------------------------
23
23
24 Set environment variables to document previous release tag, current
24 Set environment variables to document previous release tag, current
25 release milestone, current release version, and git tag.
25 release milestone, current release version, and git tag.
26
26
27 These variables may be used later to copy/paste as answers to the script
27 These variables may be used later to copy/paste as answers to the script
28 questions instead of typing the appropriate command when the time comes. These
28 questions instead of typing the appropriate command when the time comes. These
29 variables are not used by the scripts directly; therefore, there is no need to
29 variables are not used by the scripts directly; therefore, there is no need to
30 ``export`` them. The format for bash is as follows, but note that these values
30 ``export`` them. The format for bash is as follows, but note that these values
31 are just an example valid only for the 5.0 release; you'll need to update them
31 are just an example valid only for the 5.0 release; you'll need to update them
32 for the release you are actually making::
32 for the release you are actually making::
33
33
34 PREV_RELEASE=4.2.1
34 PREV_RELEASE=4.2.1
35 MILESTONE=5.0
35 MILESTONE=5.0
36 VERSION=5.0.0
36 VERSION=5.0.0
37 BRANCH=master
37 BRANCH=master
38
38
39
39
40 2. Create GitHub stats and finish release note
40 2. Create GitHub stats and finish release note
41 ----------------------------------------------
41 ----------------------------------------------
42
42
43 .. note::
43 .. note::
44
44
45 This step is optional if making a Beta or RC release.
45 This step is optional if making a Beta or RC release.
46
46
47 .. note::
47 .. note::
48
48
49 Before generating the GitHub stats, verify that all closed issues and pull
49 Before generating the GitHub stats, verify that all closed issues and pull
50 requests have `appropriate milestones
50 requests have `appropriate milestones
51 <https://github.com/ipython/ipython/wiki/Dev%3A-GitHub-workflow#milestones>`_.
51 <https://github.com/ipython/ipython/wiki/Dev%3A-GitHub-workflow#milestones>`_.
52 `This search
52 `This search
53 <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_
53 <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_
54 should return no results before creating the GitHub stats.
54 should return no results before creating the GitHub stats.
55
55
56 If a major release:
56 If a major release:
57
57
58 - merge any pull request notes into what's new::
58 - merge any pull request notes into what's new::
59
59
60 python tools/update_whatsnew.py
60 python tools/update_whatsnew.py
61
61
62 - update ``docs/source/whatsnew/development.rst``, to ensure it covers
62 - update ``docs/source/whatsnew/development.rst``, to ensure it covers
63 the major release features
63 the major release features
64
64
65 - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is
65 - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is
66 the numerical release version
66 the numerical release version
67
67
68 - generate summary of GitHub contributions, which can be done with::
68 - generate summary of GitHub contributions, which can be done with::
69
69
70 python tools/github_stats.py --milestone $MILESTONE > stats.rst
70 python tools/github_stats.py --milestone $MILESTONE > stats.rst
71
71
72 which may need some manual cleanup of ``stats.rst``. Add the cleaned
72 which may need some manual cleanup of ``stats.rst``. Add the cleaned
73 ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst``
73 ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst``
74 where ``X`` is the numerical release version (don't forget to add it to
74 where ``X`` is the numerical release version (don't forget to add it to
75 the git repo as well). If creating a major release, make a new
75 the git repo as well). If creating a major release, make a new
76 ``github-stats-X.rst`` file; if creating a minor release, the content
76 ``github-stats-X.rst`` file; if creating a minor release, the content
77 from ``stats.rst`` may simply be added to the top of an existing
77 from ``stats.rst`` may simply be added to the top of an existing
78 ``github-stats-X.rst`` file. Finally, edit
78 ``github-stats-X.rst`` file. Finally, edit
79 ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X``
79 ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X``
80 file you just created and remove temporarily the first entry called
80 file you just created and remove temporarily the first entry called
81 ``development`` (you'll need to add it back after release).
81 ``development`` (you'll need to add it back after release).
82
82
83 Make sure that the stats file has a header or it won't be rendered in
83 Make sure that the stats file has a header or it won't be rendered in
84 the final documentation.
84 the final documentation.
85
85
86 To find duplicates and update `.mailmap`, use::
86 To find duplicates and update `.mailmap`, use::
87
87
88 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
88 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
89
89
90 3. Make sure the repository is clean
90 3. Make sure the repository is clean
91 ------------------------------------
91 ------------------------------------
92
92
93 of any file that could be problematic.
93 of any file that could be problematic.
94 Remove all non-tracked files with:
94 Remove all non-tracked files with:
95
95
96 .. code::
96 .. code::
97
97
98 git clean -xfdi
98 git clean -xfdi
99
99
100 This will ask for confirmation before removing all untracked files. Make
100 This will ask for confirmation before removing all untracked files. Make
101 sure the ``dist/`` folder is clean to avoid any stale builds from
101 sure the ``dist/`` folder is clean to avoid any stale builds from
102 previous build attempts.
102 previous build attempts.
103
103
104
104
105 4. Update the release version number
105 4. Update the release version number
106 ------------------------------------
106 ------------------------------------
107
107
108 Edit ``IPython/core/release.py`` to have the current version.
108 Edit ``IPython/core/release.py`` to have the current version.
109
109
110 in particular, update version number and ``_version_extra`` content in
110 in particular, update version number and ``_version_extra`` content in
111 ``IPython/core/release.py``.
111 ``IPython/core/release.py``.
112
112
113 Step 5 will validate your changes automatically, but you might still want to
113 Step 5 will validate your changes automatically, but you might still want to
114 make sure the version number matches pep440.
114 make sure the version number matches pep440.
115
115
116 In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist``
116 In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist``
117 and ``bdist`` will appear as different releases. For example, a valid version
117 and ``bdist`` will appear as different releases. For example, a valid version
118 number for a release candidate (rc) release is: ``1.3rc1``. Notice that there
118 number for a release candidate (rc) release is: ``1.3rc1``. Notice that there
119 is no separator between the '3' and the 'r'. Check the environment variable
119 is no separator between the '3' and the 'r'. Check the environment variable
120 ``$VERSION`` as well.
120 ``$VERSION`` as well.
121
121
122 You will likely just have to modify/comment/uncomment one of the lines setting
122 You will likely just have to modify/comment/uncomment one of the lines setting
123 ``_version_extra``
123 ``_version_extra``
124
124
125
125
126 5. Run the `tools/build_release` script
126 5. Run the `tools/build_release` script
127 ---------------------------------------
127 ---------------------------------------
128
128
129 Running ``tools/build_release`` does all the file checking and building that
129 Running ``tools/build_release`` does all the file checking and building that
130 the real release script will do. This makes test installations, checks that
130 the real release script will do. This makes test installations, checks that
131 the build procedure runs OK, and tests other steps in the release process.
131 the build procedure runs OK, and tests other steps in the release process.
132
132
133 The ``build_release`` script will in particular verify that the version number
133 The ``build_release`` script will in particular verify that the version number
134 match PEP 440, in order to avoid surprise at the time of build upload.
134 match PEP 440, in order to avoid surprise at the time of build upload.
135
135
136 We encourage creating a test build of the docs as well.
136 We encourage creating a test build of the docs as well.
137
137
138 6. Create and push the new tag
138 6. Create and push the new tag
139 ------------------------------
139 ------------------------------
140
140
141 Commit the changes to release.py::
141 Commit the changes to release.py::
142
142
143 git commit -am "release $VERSION"
143 git commit -am "release $VERSION"
144 git push origin $BRANCH
144 git push origin $BRANCH
145
145
146 Create and push the tag::
146 Create and push the tag::
147
147
148 git tag -am "release $VERSION" "$VERSION"
148 git tag -am "release $VERSION" "$VERSION"
149 git push origin --tags
149 git push origin --tags
150
150
151 Update release.py back to ``x.y-dev`` or ``x.y-maint``, and re-add the
151 Update release.py back to ``x.y-dev`` or ``x.y-maint``, and re-add the
152 ``development`` entry in ``docs/source/whatsnew/index.rst`` and push::
152 ``development`` entry in ``docs/source/whatsnew/index.rst`` and push::
153
153
154 git commit -am "back to development"
154 git commit -am "back to development"
155 git push origin $BRANCH
155 git push origin $BRANCH
156
156
157 7. Get a fresh clone
157 7. Get a fresh clone
158 --------------------
158 --------------------
159
159
160 Get a fresh clone of the tag for building the release::
160 Get a fresh clone of the tag for building the release::
161
161
162 cd /tmp
162 cd /tmp
163 git clone --depth 1 https://github.com/ipython/ipython.git -b "$VERSION"
163 git clone --depth 1 https://github.com/ipython/ipython.git -b "$VERSION"
164 cd ipython
164 cd ipython
165
165
166 .. note::
166 .. note::
167
167
168 You can aslo cleanup the current working repository with ``git clean -xfdi``
168 You can aslo cleanup the current working repository with ``git clean -xfdi``
169
169
170 8. Run the release script
170 8. Run the release script
171 -------------------------
171 -------------------------
172
172
173 .. important::
173 .. important::
174
174
175 Following releases instructions have information to release IPython 5.x and
175 These steps cover instructions for creating releases of IPython 5.x LTS and
176 6.x both on python 2 and python 3. When reasing IPython 6+, ignore the step
176 IPython 6.x. Ignore release steps for Python 2 when releasing IPython 6.x
177 for python2.
177 which no longer supports Python 2.
178
178
179 Run the ``release`` script, this step requires having a current wheel, Python
179 Run the ``release`` script, this step requires having a current wheel, Python
180 >=3.4 and Python 2.7.::
180 >=3.4 and Python 2.7.::
181
181
182 ./tools/release
182 ./tools/release
183
183
184 This makes the tarballs, zipfiles, and wheels, and put them under the ``dist/``
184 This makes the tarballs, zipfiles, and wheels, and put them under the ``dist/``
185 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
185 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
186 uploading them to PyPI. We do not use an universal wheel as each wheel
186 uploading them to PyPI. We do not use an universal wheel as each wheel
187 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
187 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
188 Python it is built for. Using an universal wheel would prevent this.
188 Python it is built for. Using an universal wheel would prevent this.
189
189
190 Use the following to actually upload the result of the build::
190 Use the following to actually upload the result of the build::
191
191
192 ./tools/release upload
192 ./tools/release upload
193
193
194 It should posts them to ``archive.ipython.org``.
194 It should posts them to ``archive.ipython.org``.
195
195
196 You will need to use `twine <https://github.com/pypa/twine>`_ ) manually to
196 You will need to use `twine <https://github.com/pypa/twine>`_ ) manually to
197 actually upload on PyPI. Unlike setuptools, twine is able to upload packages
197 actually upload on PyPI. Unlike setuptools, twine is able to upload packages
198 over SSL::
198 over SSL::
199
199
200 twine upload dist/*
200 twine upload dist/*
201
201
202
202
203 PyPI/Warehouse will automatically hide previous releases. If you are uploading
203 PyPI/Warehouse will automatically hide previous releases. If you are uploading
204 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
204 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
205
205
206
206
207 9. Draft a short release announcement
207 9. Draft a short release announcement
208 -------------------------------------
208 -------------------------------------
209
209
210 The announcement should include:
210 The announcement should include:
211
211
212 - release highlights
212 - release highlights
213 - a link to the html version of the *What's new* section of the documentation
213 - a link to the html version of the *What's new* section of the documentation
214 - a link to upgrade or installation tips (if necessary)
214 - a link to upgrade or installation tips (if necessary)
215
215
216 Post the announcement to the mailing list and or blog, and link from Twitter.
216 Post the announcement to the mailing list and or blog, and link from Twitter.
217
217
218 .. note::
218 .. note::
219
219
220 If you are doing a RC or Beta, you can likely skip the next steps.
220 If you are doing a RC or Beta, you can likely skip the next steps.
221
221
222 10. Update milestones on GitHub
222 10. Update milestones on GitHub
223 -------------------------------
223 -------------------------------
224
224
225 These steps will bring milestones up to date:
225 These steps will bring milestones up to date:
226
226
227 - close the just released milestone
227 - close the just released milestone
228 - open a new milestone for the next release (x, y+1), if the milestone doesn't
228 - open a new milestone for the next release (x, y+1), if the milestone doesn't
229 exist already
229 exist already
230
230
231 11. Update the IPython website
231 11. Update the IPython website
232 ------------------------------
232 ------------------------------
233
233
234 The IPython website should document the new release:
234 The IPython website should document the new release:
235
235
236 - add release announcement (news, announcements)
236 - add release announcement (news, announcements)
237 - update current version and download links
237 - update current version and download links
238 - update links on the documentation page (especially if a major release)
238 - update links on the documentation page (especially if a major release)
239
239
240 12. Update readthedocs
240 12. Update readthedocs
241 ----------------------
241 ----------------------
242
242
243 Make sure to update readthedocs and set the latest tag as stable, as well as
243 Make sure to update readthedocs and set the latest tag as stable, as well as
244 checking that previous release is still building under its own tag.
244 checking that previous release is still building under its own tag.
245
245
246
246
247 13. Celebrate!
247 13. Celebrate!
248 --------------
248 --------------
249
249
250 Celebrate the release and please thank the contributors for their work. Great
250 Celebrate the release and please thank the contributors for their work. Great
251 job!
251 job!
252
252
@@ -1,256 +1,256 b''
1 .. _overview:
1 .. _overview:
2
2
3 ========
3 ========
4 Overview
4 Overview
5 ========
5 ========
6
6
7 One of Python's most useful features is its interactive interpreter.
7 One of Python's most useful features is its interactive interpreter.
8 It allows for very fast testing of ideas without the overhead of
8 It allows for very fast testing of ideas without the overhead of
9 creating test files as is typical in most programming languages.
9 creating test files as is typical in most programming languages.
10 However, the interpreter supplied with the standard Python distribution
10 However, the interpreter supplied with the standard Python distribution
11 is somewhat limited for extended interactive use.
11 is somewhat limited for extended interactive use.
12
12
13 The goal of IPython is to create a comprehensive environment for
13 The goal of IPython is to create a comprehensive environment for
14 interactive and exploratory computing. To support this goal, IPython
14 interactive and exploratory computing. To support this goal, IPython
15 has three main components:
15 has three main components:
16
16
17 * An enhanced interactive Python shell.
17 * An enhanced interactive Python shell.
18
18
19 * A decoupled :ref:`two-process communication model <ipythonzmq>`, which
19 * A decoupled :ref:`two-process communication model <ipythonzmq>`, which
20 allows for multiple clients to connect to a computation kernel, most notably
20 allows for multiple clients to connect to a computation kernel, most notably
21 the web-based notebook provided with `Jupyter <https://jupyter.org>`_.
21 the web-based notebook provided with `Jupyter <https://jupyter.org>`_.
22
22
23 * An architecture for interactive parallel computing now part of the
23 * An architecture for interactive parallel computing now part of the
24 `ipyparallel` package.
24 `ipyparallel` package.
25
25
26 All of IPython is open source (released under the revised BSD license).
26 All of IPython is open source (released under the revised BSD license).
27
27
28 Enhanced interactive Python shell
28 Enhanced interactive Python shell
29 =================================
29 =================================
30
30
31 IPython's interactive shell (:command:`ipython`), has the following goals,
31 IPython's interactive shell (:command:`ipython`), has the following goals,
32 amongst others:
32 amongst others:
33
33
34 1. Provide an interactive shell superior to Python's default. IPython
34 1. Provide an interactive shell superior to Python's default. IPython
35 has many features for tab-completion, object introspection, system shell
35 has many features for tab-completion, object introspection, system shell
36 access, command history retrieval across sessions, and its own special
36 access, command history retrieval across sessions, and its own special
37 command system for adding functionality when working interactively. It
37 command system for adding functionality when working interactively. It
38 tries to be a very efficient environment both for Python code development
38 tries to be a very efficient environment both for Python code development
39 and for exploration of problems using Python objects (in situations like
39 and for exploration of problems using Python objects (in situations like
40 data analysis).
40 data analysis).
41
41
42 2. Serve as an embeddable, ready to use interpreter for your own
42 2. Serve as an embeddable, ready to use interpreter for your own
43 programs. An interactive IPython shell can be started with a single call
43 programs. An interactive IPython shell can be started with a single call
44 from inside another program, providing access to the current namespace.
44 from inside another program, providing access to the current namespace.
45 This can be very useful both for debugging purposes and for situations
45 This can be very useful both for debugging purposes and for situations
46 where a blend of batch-processing and interactive exploration are needed.
46 where a blend of batch-processing and interactive exploration are needed.
47
47
48 3. Offer a flexible framework which can be used as the base
48 3. Offer a flexible framework which can be used as the base
49 environment for working with other systems, with Python as the underlying
49 environment for working with other systems, with Python as the underlying
50 bridge language. Specifically scientific environments like Mathematica,
50 bridge language. Specifically scientific environments like Mathematica,
51 IDL and Matlab inspired its design, but similar ideas can be
51 IDL and Matlab inspired its design, but similar ideas can be
52 useful in many fields.
52 useful in many fields.
53
53
54 4. Allow interactive testing of threaded graphical toolkits. IPython
54 4. Allow interactive testing of threaded graphical toolkits. IPython
55 has support for interactive, non-blocking control of GTK, Qt, WX, GLUT, and
55 has support for interactive, non-blocking control of GTK, Qt, WX, GLUT, and
56 OS X applications via special threading flags. The normal Python
56 OS X applications via special threading flags. The normal Python
57 shell can only do this for Tkinter applications.
57 shell can only do this for Tkinter applications.
58
58
59 Main features of the interactive shell
59 Main features of the interactive shell
60 --------------------------------------
60 --------------------------------------
61
61
62 * Dynamic object introspection. One can access docstrings, function
62 * Dynamic object introspection. One can access docstrings, function
63 definition prototypes, source code, source files and other details
63 definition prototypes, source code, source files and other details
64 of any object accessible to the interpreter with a single
64 of any object accessible to the interpreter with a single
65 keystroke (:samp:`?`, and using :samp:`??` provides additional detail).
65 keystroke (:samp:`?`, and using :samp:`??` provides additional detail).
66
66
67 * Searching through modules and namespaces with :samp:`*` wildcards, both
67 * Searching through modules and namespaces with :samp:`*` wildcards, both
68 when using the :samp:`?` system and via the :samp:`%psearch` command.
68 when using the :samp:`?` system and via the :samp:`%psearch` command.
69
69
70 * Completion in the local namespace, by typing :kbd:`TAB` at the prompt.
70 * Completion in the local namespace, by typing :kbd:`TAB` at the prompt.
71 This works for keywords, modules, methods, variables and files in the
71 This works for keywords, modules, methods, variables and files in the
72 current directory. This is supported via the ``prompt_toolkit`` library.
72 current directory. This is supported via the ``prompt_toolkit`` library.
73 Custom completers can be implemented easily for different purposes
73 Custom completers can be implemented easily for different purposes
74 (system commands, magic arguments etc.)
74 (system commands, magic arguments etc.)
75
75
76 * Numbered input/output prompts with command history (persistent
76 * Numbered input/output prompts with command history (persistent
77 across sessions and tied to each profile), full searching in this
77 across sessions and tied to each profile), full searching in this
78 history and caching of all input and output.
78 history and caching of all input and output.
79
79
80 * User-extensible 'magic' commands. A set of commands prefixed with
80 * User-extensible 'magic' commands. A set of commands prefixed with
81 :samp:`%` or :samp:`%%` is available for controlling IPython itself and provides
81 :samp:`%` or :samp:`%%` is available for controlling IPython itself and provides
82 directory control, namespace information and many aliases to
82 directory control, namespace information and many aliases to
83 common system shell commands.
83 common system shell commands.
84
84
85 * Alias facility for defining your own system aliases.
85 * Alias facility for defining your own system aliases.
86
86
87 * Complete system shell access. Lines starting with :samp:`!` are passed
87 * Complete system shell access. Lines starting with :samp:`!` are passed
88 directly to the system shell, and using :samp:`!!` or :samp:`var = !cmd`
88 directly to the system shell, and using :samp:`!!` or :samp:`var = !cmd`
89 captures shell output into python variables for further use.
89 captures shell output into python variables for further use.
90
90
91 * The ability to expand python variables when calling the system shell. In a
91 * The ability to expand python variables when calling the system shell. In a
92 shell command, any python variable prefixed with :samp:`$` is expanded. A
92 shell command, any python variable prefixed with :samp:`$` is expanded. A
93 double :samp:`$$` allows passing a literal :samp:`$` to the shell (for access
93 double :samp:`$$` allows passing a literal :samp:`$` to the shell (for access
94 to shell and environment variables like :envvar:`PATH`).
94 to shell and environment variables like :envvar:`PATH`).
95
95
96 * Filesystem navigation, via a magic :samp:`%cd` command, along with a
96 * Filesystem navigation, via a magic :samp:`%cd` command, along with a
97 persistent bookmark system (using :samp:`%bookmark`) for fast access to
97 persistent bookmark system (using :samp:`%bookmark`) for fast access to
98 frequently visited directories.
98 frequently visited directories.
99
99
100 * A lightweight persistence framework via the :samp:`%store` command, which
100 * A lightweight persistence framework via the :samp:`%store` command, which
101 allows you to save arbitrary Python variables. These get restored
101 allows you to save arbitrary Python variables. These get restored
102 when you run the :samp:`%store -r` command.
102 when you run the :samp:`%store -r` command.
103
103
104 * Automatic indentation and highlighting of code as you type (through the
104 * Automatic indentation and highlighting of code as you type (through the
105 `prompt_toolkit` library).
105 `prompt_toolkit` library).
106
106
107 * Macro system for quickly re-executing multiple lines of previous
107 * Macro system for quickly re-executing multiple lines of previous
108 input with a single name via the :samp:`%macro` command. Macros can be
108 input with a single name via the :samp:`%macro` command. Macros can be
109 stored persistently via :samp:`%store` and edited via :samp:`%edit`.
109 stored persistently via :samp:`%store` and edited via :samp:`%edit`.
110
110
111 * Session logging (you can then later use these logs as code in your
111 * Session logging (you can then later use these logs as code in your
112 programs). Logs can optionally timestamp all input, and also store
112 programs). Logs can optionally timestamp all input, and also store
113 session output (marked as comments, so the log remains valid
113 session output (marked as comments, so the log remains valid
114 Python source code).
114 Python source code).
115
115
116 * Session restoring: logs can be replayed to restore a previous
116 * Session restoring: logs can be replayed to restore a previous
117 session to the state where you left it.
117 session to the state where you left it.
118
118
119 * Verbose and colored exception traceback printouts. Easier to parse
119 * Verbose and colored exception traceback printouts. Easier to parse
120 visually, and in verbose mode they produce a lot of useful
120 visually, and in verbose mode they produce a lot of useful
121 debugging information (basically a terminal version of the cgitb
121 debugging information (basically a terminal version of the cgitb
122 module).
122 module).
123
123
124 * Auto-parentheses via the :samp:`%autocall` command: callable objects can be
124 * Auto-parentheses via the :samp:`%autocall` command: callable objects can be
125 executed without parentheses: :samp:`sin 3` is automatically converted to
125 executed without parentheses: :samp:`sin 3` is automatically converted to
126 :samp:`sin(3)`
126 :samp:`sin(3)`
127
127
128 * Auto-quoting: using :samp:`,`, or :samp:`;` as the first character forces
128 * Auto-quoting: using :samp:`,`, or :samp:`;` as the first character forces
129 auto-quoting of the rest of the line: :samp:`,my_function a b` becomes
129 auto-quoting of the rest of the line: :samp:`,my_function a b` becomes
130 automatically :samp:`my_function("a","b")`, while :samp:`;my_function a b`
130 automatically :samp:`my_function("a","b")`, while :samp:`;my_function a b`
131 becomes :samp:`my_function("a b")`.
131 becomes :samp:`my_function("a b")`.
132
132
133 * Extensible input syntax. You can define filters that pre-process
133 * Extensible input syntax. You can define filters that pre-process
134 user input to simplify input in special situations. This allows
134 user input to simplify input in special situations. This allows
135 for example pasting multi-line code fragments which start with
135 for example pasting multi-line code fragments which start with
136 :samp:`>>>` or :samp:`...` such as those from other python sessions or the
136 :samp:`>>>` or :samp:`...` such as those from other python sessions or the
137 standard Python documentation.
137 standard Python documentation.
138
138
139 * Flexible :ref:`configuration system <config_overview>`. It uses a
139 * Flexible :ref:`configuration system <config_overview>`. It uses a
140 configuration file which allows permanent setting of all command-line
140 configuration file which allows permanent setting of all command-line
141 options, module loading, code and file execution. The system allows
141 options, module loading, code and file execution. The system allows
142 recursive file inclusion, so you can have a base file with defaults and
142 recursive file inclusion, so you can have a base file with defaults and
143 layers which load other customizations for particular projects.
143 layers which load other customizations for particular projects.
144
144
145 * Embeddable. You can call IPython as a python shell inside your own
145 * Embeddable. You can call IPython as a python shell inside your own
146 python programs. This can be used both for debugging code or for
146 python programs. This can be used both for debugging code or for
147 providing interactive abilities to your programs with knowledge
147 providing interactive abilities to your programs with knowledge
148 about the local namespaces (very useful in debugging and data
148 about the local namespaces (very useful in debugging and data
149 analysis situations).
149 analysis situations).
150
150
151 * Easy debugger access. You can set IPython to call up an enhanced version of
151 * Easy debugger access. You can set IPython to call up an enhanced version of
152 the Python debugger (pdb) every time there is an uncaught exception. This
152 the Python debugger (pdb) every time there is an uncaught exception. This
153 drops you inside the code which triggered the exception with all the data
153 drops you inside the code which triggered the exception with all the data
154 live and it is possible to navigate the stack to rapidly isolate the source
154 live and it is possible to navigate the stack to rapidly isolate the source
155 of a bug. The :samp:`%run` magic command (with the :samp:`-d` option) can run
155 of a bug. The :samp:`%run` magic command (with the :samp:`-d` option) can run
156 any script under pdb's control, automatically setting initial breakpoints for
156 any script under pdb's control, automatically setting initial breakpoints for
157 you. This version of pdb has IPython-specific improvements, including
157 you. This version of pdb has IPython-specific improvements, including
158 tab-completion and traceback coloring support. For even easier debugger
158 tab-completion and traceback coloring support. For even easier debugger
159 access, try :samp:`%debug` after seeing an exception.
159 access, try :samp:`%debug` after seeing an exception.
160
160
161 * Profiler support. You can run single statements (similar to
161 * Profiler support. You can run single statements (similar to
162 :samp:`profile.run()`) or complete programs under the profiler's control.
162 :samp:`profile.run()`) or complete programs under the profiler's control.
163 While this is possible with standard cProfile or profile modules,
163 While this is possible with standard cProfile or profile modules,
164 IPython wraps this functionality with magic commands (see :samp:`%prun`
164 IPython wraps this functionality with magic commands (see :samp:`%prun`
165 and :samp:`%run -p`) convenient for rapid interactive work.
165 and :samp:`%run -p`) convenient for rapid interactive work.
166
166
167 * Simple timing information. You can use the :samp:`%timeit` command to get
167 * Simple timing information. You can use the :samp:`%timeit` command to get
168 the execution time of a Python statement or expression. This machinery is
168 the execution time of a Python statement or expression. This machinery is
169 intelligent enough to do more repetitions for commands that finish very
169 intelligent enough to do more repetitions for commands that finish very
170 quickly in order to get a better estimate of their running time.
170 quickly in order to get a better estimate of their running time.
171
171
172 .. sourcecode:: ipython
172 .. sourcecode:: ipython
173
173
174 In [1]: %timeit 1+1
174 In [1]: %timeit 1+1
175 10000000 loops, best of 3: 25.5 ns per loop
175 10000000 loops, best of 3: 25.5 ns per loop
176
176
177 In [2]: %timeit [math.sin(x) for x in range(5000)]
177 In [2]: %timeit [math.sin(x) for x in range(5000)]
178 1000 loops, best of 3: 719 Β΅s per loop
178 1000 loops, best of 3: 719 Β΅s per loop
179
179
180 ..
180 ..
181
181
182 To get the timing information for more than one expression, use the
182 To get the timing information for more than one expression, use the
183 :samp:`%%timeit` cell magic command.
183 :samp:`%%timeit` cell magic command.
184
184
185
185
186 * Doctest support. The special :samp:`%doctest_mode` command toggles a mode
186 * Doctest support. The special :samp:`%doctest_mode` command toggles a mode
187 to use doctest-compatible prompts, so you can use IPython sessions as
187 to use doctest-compatible prompts, so you can use IPython sessions as
188 doctest code. By default, IPython also allows you to paste existing
188 doctest code. By default, IPython also allows you to paste existing
189 doctests, and strips out the leading :samp:`>>>` and :samp:`...` prompts in
189 doctests, and strips out the leading :samp:`>>>` and :samp:`...` prompts in
190 them.
190 them.
191
191
192 .. _ipythonzmq:
192 .. _ipythonzmq:
193
193
194 Decoupled two-process model
194 Decoupled two-process model
195 ==============================
195 ==============================
196
196
197 IPython has abstracted and extended the notion of a traditional
197 IPython has abstracted and extended the notion of a traditional
198 *Read-Evaluate-Print Loop* (REPL) environment by decoupling the *evaluation*
198 *Read-Evaluate-Print Loop* (REPL) environment by decoupling the *evaluation*
199 into its own process. We call this process a **kernel**: it receives execution
199 into its own process. We call this process a **kernel**: it receives execution
200 instructions from clients and communicates the results back to them.
200 instructions from clients and communicates the results back to them.
201
201
202 This decoupling allows us to have several clients connected to the same
202 This decoupling allows us to have several clients connected to the same
203 kernel, and even allows clients and kernels to live on different machines.
203 kernel, and even allows clients and kernels to live on different machines.
204 With the exclusion of the traditional single process terminal-based IPython
204 With the exclusion of the traditional single process terminal-based IPython
205 (what you start if you run ``ipython`` without any subcommands), all
205 (what you start if you run ``ipython`` without any subcommands), all
206 other IPython machinery uses this two-process model. Most of this is now part
206 other IPython machinery uses this two-process model. Most of this is now part
207 of the `Jupyter` project, whis includes ``jupyter console``, ``jupyter
207 of the `Jupyter` project, whis includes ``jupyter console``, ``jupyter
208 qtconsole``, and ``jupyter notebook``.
208 qtconsole``, and ``jupyter notebook``.
209
209
210 As an example, this means that when you start ``jupyter qtconsole``, you're
210 As an example, this means that when you start ``jupyter qtconsole``, you're
211 really starting two processes, a kernel and a Qt-based client can send
211 really starting two processes, a kernel and a Qt-based client can send
212 commands to and receive results from that kernel. If there is already a kernel
212 commands to and receive results from that kernel. If there is already a kernel
213 running that you want to connect to, you can pass the ``--existing`` flag
213 running that you want to connect to, you can pass the ``--existing`` flag
214 which will skip initiating a new kernel and connect to the most recent kernel,
214 which will skip initiating a new kernel and connect to the most recent kernel,
215 instead. To connect to a specific kernel once you have several kernels
215 instead. To connect to a specific kernel once you have several kernels
216 running, use the ``%connect_info`` magic to get the unique connection file,
216 running, use the ``%connect_info`` magic to get the unique connection file,
217 which will be something like ``--existing kernel-19732.json`` but with
217 which will be something like ``--existing kernel-19732.json`` but with
218 different numbers which correspond to the Process ID of the kernel.
218 different numbers which correspond to the Process ID of the kernel.
219
219
220 You can read more about using `jupyter qtconsole
220 You can read more about using `jupyter qtconsole
221 <http://jupyter.org/qtconsole/>`_, and
221 <http://jupyter.org/qtconsole/>`_, and
222 `jupyter notebook <http://jupyter-notebook.readthedocs.io/en/latest/>`_. There
222 `jupyter notebook <http://jupyter-notebook.readthedocs.io/en/latest/>`_. There
223 is also a :ref:`message spec <messaging>` which documents the protocol for
223 is also a :ref:`message spec <messaging>` which documents the protocol for
224 communication between kernels
224 communication between kernels
225 and clients.
225 and clients.
226
226
227 .. seealso::
227 .. seealso::
228
228
229 `Frontend/Kernel Model`_ example notebook
229 `Frontend/Kernel Model`_ example notebook
230
230
231
231
232 Interactive parallel computing
232 Interactive parallel computing
233 ==============================
233 ==============================
234
234
235
235
236 This functionality is optional and now part of the `ipyparallel
236 This functionality is optional and now part of the `ipyparallel
237 <http://ipyparallel.readthedocs.io/>`_ project.
237 <http://ipyparallel.readthedocs.io/>`_ project.
238
238
239 Portability and Python requirements
239 Portability and Python requirements
240 -----------------------------------
240 -----------------------------------
241
241
242 Version 6.0 of IPython work with python 3.3 and above.
242 Version 6.0+ supports compatibility with Python 3.3 and higher.
243 Version 2.0 to 5 works with Python 2.7 and 3.3 or above.
243 Versions 2.0 to 5.x work with Python 2.7.x releases and Python 3.3 and higher.
244 Version 1.0 additionally worked with Python 2.6 and 3.2.
244 Version 1.0 additionally worked with Python 2.6 and 3.2.
245 Version 0.12 was the first version to fully support Python 3.
245 Version 0.12 was the first version to fully support Python 3.
246
246
247 IPython is known to work on the following operating systems:
247 IPython is known to work on the following operating systems:
248
248
249 * Linux
249 * Linux
250 * Most other Unix-like OSs (AIX, Solaris, BSD, etc.)
250 * Most other Unix-like OSs (AIX, Solaris, BSD, etc.)
251 * Mac OS X
251 * Mac OS X
252 * Windows (CygWin, XP, Vista, etc.)
252 * Windows (CygWin, XP, Vista, etc.)
253
253
254 See :ref:`here <install_index>` for instructions on how to install IPython.
254 See :ref:`here <install_index>` for instructions on how to install IPython.
255
255
256 .. include:: links.txt
256 .. include:: links.txt
General Comments 0
You need to be logged in to leave comments. Login now