##// END OF EJS Templates
Merge branch 'main' into main
Nelson Ferreira -
r27959:718af292 merge
parent child Browse files
Show More
@@ -1,90 +1,118 b''
1 ## Triaging Issues
1 ## Triaging Issues
2
2
3 On the IPython repository, we strive to trust users and give them responsibility.
3 On the IPython repository, we strive to trust users and give them responsibility.
4 By using one of our bots, any user can close issues or add/remove
4 By using one of our bots, any user can close issues or add/remove
5 labels by mentioning the bot and asking it to do things on your behalf.
5 labels by mentioning the bot and asking it to do things on your behalf.
6
6
7 To close an issue (or PR), even if you did not create it, use the following:
7 To close an issue (or PR), even if you did not create it, use the following:
8
8
9 > @meeseeksdev close
9 > @meeseeksdev close
10
10
11 This command can be in the middle of another comment, but must start on its
11 This command can be in the middle of another comment, but must start on its
12 own line.
12 own line.
13
13
14 To add labels to an issue, ask the bot to `tag` with a comma-separated list of
14 To add labels to an issue, ask the bot to `tag` with a comma-separated list of
15 tags to add:
15 tags to add:
16
16
17 > @meeseeksdev tag windows, documentation
17 > @meeseeksdev tag windows, documentation
18
18
19 Only already pre-created tags can be added. So far, the list is limited to:
19 Only already pre-created tags can be added. So far, the list is limited to:
20 `async/await`, `backported`, `help wanted`, `documentation`, `notebook`,
20 `async/await`, `backported`, `help wanted`, `documentation`, `notebook`,
21 `tab-completion`, `windows`
21 `tab-completion`, `windows`
22
22
23 To remove a label, use the `untag` command:
23 To remove a label, use the `untag` command:
24
24
25 > @meeseeksdev untag windows, documentation
25 > @meeseeksdev untag windows, documentation
26
26
27 We'll be adding additional capabilities for the bot and will share them here
27 We'll be adding additional capabilities for the bot and will share them here
28 when they are ready to be used.
28 when they are ready to be used.
29
29
30 ## Opening an Issue
30 ## Opening an Issue
31
31
32 When opening a new Issue, please take the following steps:
32 When opening a new Issue, please take the following steps:
33
33
34 1. Search GitHub and/or Google for your issue to avoid duplicate reports.
34 1. Search GitHub and/or Google for your issue to avoid duplicate reports.
35 Keyword searches for your error messages are most helpful.
35 Keyword searches for your error messages are most helpful.
36 2. If possible, try updating to main and reproducing your issue,
36 2. If possible, try updating to main and reproducing your issue,
37 because we may have already fixed it.
37 because we may have already fixed it.
38 3. Try to include a minimal reproducible test case.
38 3. Try to include a minimal reproducible test case.
39 4. Include relevant system information. Start with the output of:
39 4. Include relevant system information. Start with the output of:
40
40
41 python -c "import IPython; print(IPython.sys_info())"
41 python -c "import IPython; print(IPython.sys_info())"
42
42
43 And include any relevant package versions, depending on the issue, such as
43 And include any relevant package versions, depending on the issue, such as
44 matplotlib, numpy, Qt, Qt bindings (PyQt/PySide), tornado, web browser, etc.
44 matplotlib, numpy, Qt, Qt bindings (PyQt/PySide), tornado, web browser, etc.
45
45
46 ## Pull Requests
46 ## Pull Requests
47
47
48 Some guidelines on contributing to IPython:
48 Some guidelines on contributing to IPython:
49
49
50 * All work is submitted via Pull Requests.
50 * All work is submitted via Pull Requests.
51 * Pull Requests can be submitted as soon as there is code worth discussing.
51 * Pull Requests can be submitted as soon as there is code worth discussing.
52 Pull Requests track the branch, so you can continue to work after the PR is submitted.
52 Pull Requests track the branch, so you can continue to work after the PR is submitted.
53 Review and discussion can begin well before the work is complete,
53 Review and discussion can begin well before the work is complete,
54 and the more discussion the better.
54 and the more discussion the better.
55 The worst case is that the PR is closed.
55 The worst case is that the PR is closed.
56 * Pull Requests should generally be made against main
56 * Pull Requests should generally be made against main
57 * Pull Requests should be tested, if feasible:
57 * Pull Requests should be tested, if feasible:
58 - bugfixes should include regression tests.
58 - bugfixes should include regression tests.
59 - new behavior should at least get minimal exercise.
59 - new behavior should at least get minimal exercise.
60 * New features and backwards-incompatible changes should be documented by adding
60 * New features and backwards-incompatible changes should be documented by adding
61 a new file to the [pr](docs/source/whatsnew/pr) directory, see [the README.md
61 a new file to the [pr](docs/source/whatsnew/pr) directory, see [the README.md
62 there](docs/source/whatsnew/pr/README.md) for details.
62 there](docs/source/whatsnew/pr/README.md) for details.
63 * Don't make 'cleanup' pull requests just to change code style.
63 * Don't make 'cleanup' pull requests just to change code style.
64 We don't follow any style guide strictly, and we consider formatting changes
64 We don't follow any style guide strictly, and we consider formatting changes
65 unnecessary noise.
65 unnecessary noise.
66 If you're making functional changes, you can clean up the specific pieces of
66 If you're making functional changes, you can clean up the specific pieces of
67 code you're working on.
67 code you're working on.
68
68
69 [Travis](http://travis-ci.org/#!/ipython/ipython) does a pretty good job testing
69 [GitHub Actions](https://github.com/ipython/ipython/actions/workflows/test.yml) does
70 IPython and Pull Requests, but it may make sense to manually perform tests,
70 a pretty good job testing IPython and Pull Requests,
71 but it may make sense to manually perform tests,
71 particularly for PRs that affect `IPython.parallel` or Windows.
72 particularly for PRs that affect `IPython.parallel` or Windows.
72
73
73 For more detailed information, see our [GitHub Workflow](https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow).
74 For more detailed information, see our [GitHub Workflow](https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow).
74
75
75 ## Running Tests
76 ## Running Tests
76
77
77 All the tests can be run by using
78 All the tests can be run by using
78 ```shell
79 ```shell
79 pytest
80 pytest
80 ```
81 ```
81
82
82 All the tests for a single module (for example **test_alias**) can be run by using the fully qualified path to the module.
83 All the tests for a single module (for example **test_alias**) can be run by using the fully qualified path to the module.
83 ```shell
84 ```shell
84 pytest IPython/core/tests/test_alias.py
85 pytest IPython/core/tests/test_alias.py
85 ```
86 ```
86
87
87 Only a single test (for example **test_alias_lifecycle**) within a single file can be run by adding the specific test after a `::` at the end:
88 Only a single test (for example **test_alias_lifecycle**) within a single file can be run by adding the specific test after a `::` at the end:
88 ```shell
89 ```shell
89 pytest IPython/core/tests/test_alias.py::test_alias_lifecycle
90 pytest IPython/core/tests/test_alias.py::test_alias_lifecycle
90 ```
91 ```
92
93 ## Code style
94
95 * Before committing, run `darker -r 60625f241f298b5039cb2debc365db38aa7bb522 <file path>` to apply selective `black` formatting on modified regions using [darker](https://github.com/akaihola/darker).
96 * For newly added modules or refactors, please enable static typing analysis with `mypy` for the modified module by adding the file path in [`mypy.yml`](https://github.com/ipython/ipython/blob/main/.github/workflows/mypy.yml) workflow.
97 * As described in the pull requests section, please avoid excessive formatting changes; if a formatting-only commit is necessary, consider adding its hash to [`.git-blame-ignore-revs`](https://github.com/ipython/ipython/blob/main/.git-blame-ignore-revs) file.
98
99 ## Documentation
100
101 Sphinx documentation can be built locally using standard sphinx `make` commands. To build HTML documentation from the root of the project, execute:
102
103 ```shell
104 pip install -r docs/requirements.txt # only needed once
105 make -C docs/ html SPHINXOPTS="-W"
106 ```
107
108 To force update of the API documentation, precede the `make` command with:
109
110 ```shell
111 python3 docs/autogen_api.py
112 ```
113
114 Similarly, to force-update the configuration, run:
115
116 ```shell
117 python3 docs/autogen_config.py
118 ```
@@ -1,174 +1,174 b''
1 .. image:: https://codecov.io/github/ipython/ipython/coverage.svg?branch=main
1 .. image:: https://codecov.io/github/ipython/ipython/coverage.svg?branch=main
2 :target: https://codecov.io/github/ipython/ipython?branch=main
2 :target: https://codecov.io/github/ipython/ipython?branch=main
3
3
4 .. image:: https://img.shields.io/pypi/v/IPython.svg
4 .. image:: https://img.shields.io/pypi/v/IPython.svg
5 :target: https://pypi.python.org/pypi/ipython
5 :target: https://pypi.python.org/pypi/ipython
6
6
7 .. image:: https://github.com/ipython/ipython/actions/workflows/test.yml/badge.svg
7 .. image:: https://github.com/ipython/ipython/actions/workflows/test.yml/badge.svg
8 :target: https://github.com/ipython/ipython/actions/workflows/test.yml)
8 :target: https://github.com/ipython/ipython/actions/workflows/test.yml
9
9
10 .. image:: https://www.codetriage.com/ipython/ipython/badges/users.svg
10 .. image:: https://www.codetriage.com/ipython/ipython/badges/users.svg
11 :target: https://www.codetriage.com/ipython/ipython/
11 :target: https://www.codetriage.com/ipython/ipython/
12
12
13 .. image:: https://raster.shields.io/badge/Follows-NEP29-brightgreen.png
13 .. image:: https://raster.shields.io/badge/Follows-NEP29-brightgreen.png
14 :target: https://numpy.org/neps/nep-0029-deprecation_policy.html
14 :target: https://numpy.org/neps/nep-0029-deprecation_policy.html
15
15
16 .. image:: https://tidelift.com/badges/package/pypi/ipython?style=flat
16 .. image:: https://tidelift.com/badges/package/pypi/ipython?style=flat
17 :target: https://tidelift.com/subscription/pkg/pypi-ipython
17 :target: https://tidelift.com/subscription/pkg/pypi-ipython
18
18
19
19
20 ===========================================
20 ===========================================
21 IPython: Productive Interactive Computing
21 IPython: Productive Interactive Computing
22 ===========================================
22 ===========================================
23
23
24 Overview
24 Overview
25 ========
25 ========
26
26
27 Welcome to IPython. Our full documentation is available on `ipython.readthedocs.io
27 Welcome to IPython. Our full documentation is available on `ipython.readthedocs.io
28 <https://ipython.readthedocs.io/en/stable/>`_ and contains information on how to install, use, and
28 <https://ipython.readthedocs.io/en/stable/>`_ and contains information on how to install, use, and
29 contribute to the project.
29 contribute to the project.
30 IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.
30 IPython (Interactive Python) is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.
31
31
32 **IPython versions and Python Support**
32 **IPython versions and Python Support**
33
33
34 Starting with IPython 7.10, IPython follows `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_
34 Starting with IPython 7.10, IPython follows `NEP 29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_
35
35
36 **IPython 7.17+** requires Python version 3.7 and above.
36 **IPython 7.17+** requires Python version 3.7 and above.
37
37
38 **IPython 7.10+** requires Python version 3.6 and above.
38 **IPython 7.10+** requires Python version 3.6 and above.
39
39
40 **IPython 7.0** requires Python version 3.5 and above.
40 **IPython 7.0** requires Python version 3.5 and above.
41
41
42 **IPython 6.x** requires Python version 3.3 and above.
42 **IPython 6.x** requires Python version 3.3 and above.
43
43
44 **IPython 5.x LTS** is the compatible release for Python 2.7.
44 **IPython 5.x LTS** is the compatible release for Python 2.7.
45 If you require Python 2 support, you **must** use IPython 5.x LTS. Please
45 If you require Python 2 support, you **must** use IPython 5.x LTS. Please
46 update your project configurations and requirements as necessary.
46 update your project configurations and requirements as necessary.
47
47
48
48
49 The Notebook, Qt console and a number of other pieces are now parts of *Jupyter*.
49 The Notebook, Qt console and a number of other pieces are now parts of *Jupyter*.
50 See the `Jupyter installation docs <https://jupyter.readthedocs.io/en/latest/install.html>`__
50 See the `Jupyter installation docs <https://jupyter.readthedocs.io/en/latest/install.html>`__
51 if you want to use these.
51 if you want to use these.
52
52
53 Main features of IPython
53 Main features of IPython
54 ========================
54 ========================
55 Comprehensive object introspection.
55 Comprehensive object introspection.
56
56
57 Input history, persistent across sessions.
57 Input history, persistent across sessions.
58
58
59 Caching of output results during a session with automatically generated references.
59 Caching of output results during a session with automatically generated references.
60
60
61 Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.
61 Extensible tab completion, with support by default for completion of python variables and keywords, filenames and function keywords.
62
62
63 Extensible system of β€˜magic’ commands for controlling the environment and performing many tasks related to IPython or the operating system.
63 Extensible system of β€˜magic’ commands for controlling the environment and performing many tasks related to IPython or the operating system.
64
64
65 A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).
65 A rich configuration system with easy switching between different setups (simpler than changing $PYTHONSTARTUP environment variables every time).
66
66
67 Session logging and reloading.
67 Session logging and reloading.
68
68
69 Extensible syntax processing for special purpose situations.
69 Extensible syntax processing for special purpose situations.
70
70
71 Access to the system shell with user-extensible alias system.
71 Access to the system shell with user-extensible alias system.
72
72
73 Easily embeddable in other Python programs and GUIs.
73 Easily embeddable in other Python programs and GUIs.
74
74
75 Integrated access to the pdb debugger and the Python profiler.
75 Integrated access to the pdb debugger and the Python profiler.
76
76
77
77
78 Development and Instant running
78 Development and Instant running
79 ===============================
79 ===============================
80
80
81 You can find the latest version of the development documentation on `readthedocs
81 You can find the latest version of the development documentation on `readthedocs
82 <https://ipython.readthedocs.io/en/latest/>`_.
82 <https://ipython.readthedocs.io/en/latest/>`_.
83
83
84 You can run IPython from this directory without even installing it system-wide
84 You can run IPython from this directory without even installing it system-wide
85 by typing at the terminal::
85 by typing at the terminal::
86
86
87 $ python -m IPython
87 $ python -m IPython
88
88
89 Or see the `development installation docs
89 Or see the `development installation docs
90 <https://ipython.readthedocs.io/en/latest/install/install.html#installing-the-development-version>`_
90 <https://ipython.readthedocs.io/en/latest/install/install.html#installing-the-development-version>`_
91 for the latest revision on read the docs.
91 for the latest revision on read the docs.
92
92
93 Documentation and installation instructions for older version of IPython can be
93 Documentation and installation instructions for older version of IPython can be
94 found on the `IPython website <https://ipython.org/documentation.html>`_
94 found on the `IPython website <https://ipython.org/documentation.html>`_
95
95
96
96
97
97
98 IPython requires Python version 3 or above
98 IPython requires Python version 3 or above
99 ==========================================
99 ==========================================
100
100
101 Starting with version 6.0, IPython does not support Python 2.7, 3.0, 3.1, or
101 Starting with version 6.0, IPython does not support Python 2.7, 3.0, 3.1, or
102 3.2.
102 3.2.
103
103
104 For a version compatible with Python 2.7, please install the 5.x LTS Long Term
104 For a version compatible with Python 2.7, please install the 5.x LTS Long Term
105 Support version.
105 Support version.
106
106
107 If you are encountering this error message you are likely trying to install or
107 If you are encountering this error message you are likely trying to install or
108 use IPython from source. You need to checkout the remote 5.x branch. If you are
108 use IPython from source. You need to checkout the remote 5.x branch. If you are
109 using git the following should work::
109 using git the following should work::
110
110
111 $ git fetch origin
111 $ git fetch origin
112 $ git checkout 5.x
112 $ git checkout 5.x
113
113
114 If you encounter this error message with a regular install of IPython, then you
114 If you encounter this error message with a regular install of IPython, then you
115 likely need to update your package manager, for example if you are using `pip`
115 likely need to update your package manager, for example if you are using `pip`
116 check the version of pip with::
116 check the version of pip with::
117
117
118 $ pip --version
118 $ pip --version
119
119
120 You will need to update pip to the version 9.0.1 or greater. If you are not using
120 You will need to update pip to the version 9.0.1 or greater. If you are not using
121 pip, please inquiry with the maintainers of the package for your package
121 pip, please inquiry with the maintainers of the package for your package
122 manager.
122 manager.
123
123
124 For more information see one of our blog posts:
124 For more information see one of our blog posts:
125
125
126 https://blog.jupyter.org/release-of-ipython-5-0-8ce60b8d2e8e
126 https://blog.jupyter.org/release-of-ipython-5-0-8ce60b8d2e8e
127
127
128 As well as the following Pull-Request for discussion:
128 As well as the following Pull-Request for discussion:
129
129
130 https://github.com/ipython/ipython/pull/9900
130 https://github.com/ipython/ipython/pull/9900
131
131
132 This error does also occur if you are invoking ``setup.py`` directly – which you
132 This error does also occur if you are invoking ``setup.py`` directly – which you
133 should not – or are using ``easy_install`` If this is the case, use ``pip
133 should not – or are using ``easy_install`` If this is the case, use ``pip
134 install .`` instead of ``setup.py install`` , and ``pip install -e .`` instead
134 install .`` instead of ``setup.py install`` , and ``pip install -e .`` instead
135 of ``setup.py develop`` If you are depending on IPython as a dependency you may
135 of ``setup.py develop`` If you are depending on IPython as a dependency you may
136 also want to have a conditional dependency on IPython depending on the Python
136 also want to have a conditional dependency on IPython depending on the Python
137 version::
137 version::
138
138
139 install_req = ['ipython']
139 install_req = ['ipython']
140 if sys.version_info[0] < 3 and 'bdist_wheel' not in sys.argv:
140 if sys.version_info[0] < 3 and 'bdist_wheel' not in sys.argv:
141 install_req.remove('ipython')
141 install_req.remove('ipython')
142 install_req.append('ipython<6')
142 install_req.append('ipython<6')
143
143
144 setup(
144 setup(
145 ...
145 ...
146 install_requires=install_req
146 install_requires=install_req
147 )
147 )
148
148
149 Alternatives to IPython
149 Alternatives to IPython
150 =======================
150 =======================
151
151
152 IPython may not be to your taste; if that's the case there might be similar
152 IPython may not be to your taste; if that's the case there might be similar
153 project that you might want to use:
153 project that you might want to use:
154
154
155 - The classic Python REPL.
155 - The classic Python REPL.
156 - `bpython <https://bpython-interpreter.org/>`_
156 - `bpython <https://bpython-interpreter.org/>`_
157 - `mypython <https://www.asmeurer.com/mypython/>`_
157 - `mypython <https://www.asmeurer.com/mypython/>`_
158 - `ptpython and ptipython <https://pypi.org/project/ptpython/>`_
158 - `ptpython and ptipython <https://pypi.org/project/ptpython/>`_
159 - `Xonsh <https://xon.sh/>`_
159 - `Xonsh <https://xon.sh/>`_
160
160
161 Ignoring commits with git blame.ignoreRevsFile
161 Ignoring commits with git blame.ignoreRevsFile
162 ==============================================
162 ==============================================
163
163
164 As of git 2.23, it is possible to make formatting changes without breaking
164 As of git 2.23, it is possible to make formatting changes without breaking
165 ``git blame``. See the `git documentation
165 ``git blame``. See the `git documentation
166 <https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile>`_
166 <https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile>`_
167 for more details.
167 for more details.
168
168
169 To use this feature you must:
169 To use this feature you must:
170
170
171 - Install git >= 2.23
171 - Install git >= 2.23
172 - Configure your local git repo by running:
172 - Configure your local git repo by running:
173 - POSIX: ``tools\configure-git-blame-ignore-revs.sh``
173 - POSIX: ``tools\configure-git-blame-ignore-revs.sh``
174 - Windows: ``tools\configure-git-blame-ignore-revs.bat``
174 - Windows: ``tools\configure-git-blame-ignore-revs.bat``
@@ -1,251 +1,252 b''
1 # Simple tool to help for release
1 # Simple tool to help for release
2 # when releasing with bash, simple source it to get asked questions.
2 # when releasing with bash, simple source it to get asked questions.
3
3
4 # misc check before starting
4 # misc check before starting
5
5
6 python -c 'import keyring'
6 python -c 'import keyring'
7 python -c 'import twine'
7 python -c 'import twine'
8 python -c 'import sphinx'
8 python -c 'import sphinx'
9 python -c 'import sphinx_rtd_theme'
9 python -c 'import sphinx_rtd_theme'
10 python -c 'import pytest'
10 python -c 'import pytest'
11 python -c 'import build'
11
12
12
13
13 BLACK=$(tput setaf 1)
14 BLACK=$(tput setaf 1)
14 RED=$(tput setaf 1)
15 RED=$(tput setaf 1)
15 GREEN=$(tput setaf 2)
16 GREEN=$(tput setaf 2)
16 YELLOW=$(tput setaf 3)
17 YELLOW=$(tput setaf 3)
17 BLUE=$(tput setaf 4)
18 BLUE=$(tput setaf 4)
18 MAGENTA=$(tput setaf 5)
19 MAGENTA=$(tput setaf 5)
19 CYAN=$(tput setaf 6)
20 CYAN=$(tput setaf 6)
20 WHITE=$(tput setaf 7)
21 WHITE=$(tput setaf 7)
21 NOR=$(tput sgr0)
22 NOR=$(tput sgr0)
22
23
23
24
24 echo "Will use $BLUE'$EDITOR'$NOR to edit files when necessary"
25 echo "Will use $BLUE'$EDITOR'$NOR to edit files when necessary"
25 echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: "
26 echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: "
26 read input
27 read input
27 PREV_RELEASE=${input:-$PREV_RELEASE}
28 PREV_RELEASE=${input:-$PREV_RELEASE}
28 echo -n "MILESTONE (X.y) [$MILESTONE]: "
29 echo -n "MILESTONE (X.y) [$MILESTONE]: "
29 read input
30 read input
30 MILESTONE=${input:-$MILESTONE}
31 MILESTONE=${input:-$MILESTONE}
31 echo -n "VERSION (X.y.z) [$VERSION]:"
32 echo -n "VERSION (X.y.z) [$VERSION]:"
32 read input
33 read input
33 VERSION=${input:-$VERSION}
34 VERSION=${input:-$VERSION}
34 echo -n "BRANCH (main|X.y) [$BRANCH]:"
35 echo -n "BRANCH (main|X.y) [$BRANCH]:"
35 read input
36 read input
36 BRANCH=${input:-$BRANCH}
37 BRANCH=${input:-$BRANCH}
37
38
38 ask_section(){
39 ask_section(){
39 echo
40 echo
40 echo $BLUE"$1"$NOR
41 echo $BLUE"$1"$NOR
41 echo -n $GREEN"Press Enter to continue, S to skip: "$NOR
42 echo -n $GREEN"Press Enter to continue, S to skip: "$NOR
42 if [ "$ZSH_NAME" = "zsh" ] ; then
43 if [ "$ZSH_NAME" = "zsh" ] ; then
43 read -k1 value
44 read -k1 value
44 value=${value%$'\n'}
45 value=${value%$'\n'}
45 else
46 else
46 read -n1 value
47 read -n1 value
47 fi
48 fi
48 if [ -z "$value" ] || [ $value = 'y' ]; then
49 if [ -z "$value" ] || [ $value = 'y' ]; then
49 return 0
50 return 0
50 fi
51 fi
51 return 1
52 return 1
52 }
53 }
53
54
54
55
55 maybe_edit(){
56 maybe_edit(){
56 echo
57 echo
57 echo $BLUE"$1"$NOR
58 echo $BLUE"$1"$NOR
58 echo -n $GREEN"Press ${BLUE}e$GREEN to Edit ${BLUE}$1$GREEN, any other keys to skip: "$NOR
59 echo -n $GREEN"Press ${BLUE}e$GREEN to Edit ${BLUE}$1$GREEN, any other keys to skip: "$NOR
59 if [ "$ZSH_NAME" = "zsh" ] ; then
60 if [ "$ZSH_NAME" = "zsh" ] ; then
60 read -k1 value
61 read -k1 value
61 value=${value%$'\n'}
62 value=${value%$'\n'}
62 else
63 else
63 read -n1 value
64 read -n1 value
64 fi
65 fi
65
66
66 echo
67 echo
67 if [ $value = 'e' ] ; then
68 if [ $value = 'e' ] ; then
68 $=EDITOR $1
69 $=EDITOR $1
69 fi
70 fi
70 }
71 }
71
72
72
73
73
74
74 echo
75 echo
75 if ask_section "Updating what's new with information from docs/source/whatsnew/pr"
76 if ask_section "Updating what's new with information from docs/source/whatsnew/pr"
76 then
77 then
77 python tools/update_whatsnew.py
78 python tools/update_whatsnew.py
78
79
79 echo
80 echo
80 echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR
81 echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR
81 echo $GREEN"Press enter to continue"$NOR
82 echo $GREEN"Press enter to continue"$NOR
82 read
83 read
83 fi
84 fi
84
85
85 if ask_section "Gen Stats, and authors"
86 if ask_section "Gen Stats, and authors"
86 then
87 then
87
88
88 echo
89 echo
89 echo $BLUE"here are all the authors that contributed to this release:"$NOR
90 echo $BLUE"here are all the authors that contributed to this release:"$NOR
90 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
91 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
91
92
92 echo
93 echo
93 echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap."
94 echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap."
94 echo $GREEN"Press enter to continue:"$NOR
95 echo $GREEN"Press enter to continue:"$NOR
95 read
96 read
96
97
97 echo $BLUE"generating stats"$NOR
98 echo $BLUE"generating stats"$NOR
98 python tools/github_stats.py --milestone $MILESTONE > stats.rst
99 python tools/github_stats.py --milestone $MILESTONE > stats.rst
99
100
100 echo $BLUE"stats.rst files generated."$NOR
101 echo $BLUE"stats.rst files generated."$NOR
101 echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR
102 echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR
102 echo $GREEN"press enter to continue."$NOR
103 echo $GREEN"press enter to continue."$NOR
103 read
104 read
104
105
105 fi
106 fi
106
107
107 if ask_section "Generate API difference (using frapuccino)"
108 if ask_section "Generate API difference (using frapuccino)"
108 then
109 then
109 echo $BLUE"Checking out $PREV_RELEASE"$NOR
110 echo $BLUE"Checking out $PREV_RELEASE"$NOR
110 git checkout $PREV_RELEASE
111 git checkout $PREV_RELEASE
111 sleep 1
112 sleep 1
112 echo $BLUE"Saving API to file $PREV_RELEASE"$NOR
113 echo $BLUE"Saving API to file $PREV_RELEASE"$NOR
113 frappuccino IPython IPython.kernel IPython.lib IPython.qt IPython.lib.kernel IPython.html IPython.frontend IPython.external --save IPython-$PREV_RELEASE.json
114 frappuccino IPython IPython.kernel IPython.lib IPython.qt IPython.lib.kernel IPython.html IPython.frontend IPython.external --save IPython-$PREV_RELEASE.json
114 echo $BLUE"coming back to $BRANCH"$NOR
115 echo $BLUE"coming back to $BRANCH"$NOR
115 git checkout $BRANCH
116 git checkout $BRANCH
116 sleep 1
117 sleep 1
117 echo $BLUE"comparing ..."$NOR
118 echo $BLUE"comparing ..."$NOR
118 frappuccino IPython IPython.kernel IPython.lib --compare IPython-$PREV_RELEASE.json
119 frappuccino IPython IPython.kernel IPython.lib --compare IPython-$PREV_RELEASE.json
119 echo $GREEN"Use the above guideline to write an API changelog ..."$NOR
120 echo $GREEN"Use the above guideline to write an API changelog ..."$NOR
120 echo $GREEN"Press any keys to continue"$NOR
121 echo $GREEN"Press any keys to continue"$NOR
121 read
122 read
122 fi
123 fi
123
124
124 echo "Cleaning repository"
125 echo "Cleaning repository"
125 git clean -xfdi
126 git clean -xfdi
126
127
127 echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR
128 echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR
128 echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py${NOR}"
129 echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py${NOR}"
129 sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py
130 sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py
130 rm IPython/core/release.pybkp
131 rm IPython/core/release.pybkp
131 git diff | cat
132 git diff | cat
132 maybe_edit IPython/core/release.py
133 maybe_edit IPython/core/release.py
133
134
134 echo $GREEN"Press enter to continue"$NOR
135 echo $GREEN"Press enter to continue"$NOR
135 read
136 read
136
137
137 if ask_section "Build the documentation ?"
138 if ask_section "Build the documentation ?"
138 then
139 then
139 make html -C docs
140 make html -C docs
140 echo
141 echo
141 echo $GREEN"Check the docs, press enter to continue"$NOR
142 echo $GREEN"Check the docs, press enter to continue"$NOR
142 read
143 read
143
144
144 fi
145 fi
145
146
146 if ask_section "Should we commit, tag, push... etc ? "
147 if ask_section "Should we commit, tag, push... etc ? "
147 then
148 then
148 echo
149 echo
149 echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S"
150 echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S"
150 echo $GREEN"Press enter to commit"$NOR
151 echo $GREEN"Press enter to commit"$NOR
151 read
152 read
152 git commit -am "release $VERSION" -S
153 git commit -am "release $VERSION" -S
153
154
154 echo
155 echo
155 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
156 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
156 echo $GREEN"Make sure you can push"$NOR
157 echo $GREEN"Make sure you can push"$NOR
157 echo $GREEN"Press enter to continue"$NOR
158 echo $GREEN"Press enter to continue"$NOR
158 read
159 read
159 git push origin $BRANCH
160 git push origin $BRANCH
160
161
161 echo
162 echo
162 echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
163 echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
163 echo $GREEN"Press enter to tag commit"$NOR
164 echo $GREEN"Press enter to tag commit"$NOR
164 read
165 read
165 git tag -am "release $VERSION" "$VERSION" -s
166 git tag -am "release $VERSION" "$VERSION" -s
166
167
167 echo
168 echo
168 echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
169 echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
169 echo $GREEN"Press enter to continue"$NOR
170 echo $GREEN"Press enter to continue"$NOR
170 read
171 read
171 git push origin $VERSION
172 git push origin $VERSION
172
173
173
174
174 echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py"
175 echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py"
175 echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py${NOR}"
176 echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py${NOR}"
176 sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py
177 sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py
177 rm IPython/core/release.pybkp
178 rm IPython/core/release.pybkp
178 git diff | cat
179 git diff | cat
179 echo $GREEN"Please bump ${RED}the minor version number${NOR}"
180 echo $GREEN"Please bump ${RED}the minor version number${NOR}"
180 maybe_edit IPython/core/release.py
181 maybe_edit IPython/core/release.py
181 echo ${BLUE}"Do not commit yet – we'll do it later."$NOR
182 echo ${BLUE}"Do not commit yet – we'll do it later."$NOR
182
183
183
184
184 echo $GREEN"Press enter to continue"$NOR
185 echo $GREEN"Press enter to continue"$NOR
185 read
186 read
186
187
187 echo
188 echo
188 echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR
189 echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR
189 echo $GREEN"Press enter to commit"$NOR
190 echo $GREEN"Press enter to commit"$NOR
190 read
191 read
191 git commit -am "back to dev"
192 git commit -am "back to dev"
192
193
193 echo
194 echo
194 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
195 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
195 echo $GREEN"Press enter to continue"$NOR
196 echo $GREEN"Press enter to continue"$NOR
196 read
197 read
197 git push origin $BRANCH
198 git push origin $BRANCH
198
199
199
200
200 echo
201 echo
201 echo $BLUE"let's : git checkout $VERSION"$NOR
202 echo $BLUE"let's : git checkout $VERSION"$NOR
202 echo $GREEN"Press enter to continue"$NOR
203 echo $GREEN"Press enter to continue"$NOR
203 read
204 read
204 git checkout $VERSION
205 git checkout $VERSION
205 fi
206 fi
206
207
207 if ask_section "Should we build and release ?"
208 if ask_section "Should we build and release ?"
208 then
209 then
209
210
210 echo $BLUE"going to set SOURCE_DATE_EPOCH"$NOR
211 echo $BLUE"going to set SOURCE_DATE_EPOCH"$NOR
211 echo $BLUE'export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)'$NOR
212 echo $BLUE'export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)'$NOR
212 echo $GREEN"Press enter to continue"$NOR
213 echo $GREEN"Press enter to continue"$NOR
213 read
214 read
214
215
215 export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
216 export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
216
217
217 echo $BLUE"SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH"$NOR
218 echo $BLUE"SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH"$NOR
218 echo $GREEN"Press enter to continue"$NOR
219 echo $GREEN"Press enter to continue"$NOR
219 read
220 read
220
221
221
222
222
223
223 echo
224 echo
224 echo $BLUE"Attempting to build package..."$NOR
225 echo $BLUE"Attempting to build package..."$NOR
225
226
226 tools/release
227 tools/release
227
228
228
229
229 echo $RED'$ shasum -a 256 dist/*'
230 echo $RED'$ shasum -a 256 dist/*'
230 shasum -a 256 dist/*
231 shasum -a 256 dist/*
231 echo $NOR
232 echo $NOR
232
233
233 echo $BLUE"We are going to rebuild, node the hash above, and compare them to the rebuild"$NOR
234 echo $BLUE"We are going to rebuild, node the hash above, and compare them to the rebuild"$NOR
234 echo $GREEN"Press enter to continue"$NOR
235 echo $GREEN"Press enter to continue"$NOR
235 read
236 read
236
237
237 echo
238 echo
238 echo $BLUE"Attempting to build package..."$NOR
239 echo $BLUE"Attempting to build package..."$NOR
239
240
240 tools/release
241 tools/release
241
242
242 echo $RED"Check the shasum for SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
243 echo $RED"Check the shasum for SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
243 echo $RED'$ shasum -a 256 dist/*'
244 echo $RED'$ shasum -a 256 dist/*'
244 shasum -a 256 dist/*
245 shasum -a 256 dist/*
245 echo $NOR
246 echo $NOR
246
247
247 if ask_section "upload packages ?"
248 if ask_section "upload packages ?"
248 then
249 then
249 tools/release upload
250 tools/release upload
250 fi
251 fi
251 fi
252 fi
General Comments 0
You need to be logged in to leave comments. Login now