##// END OF EJS Templates
Merge pull request #10221 from Carreau/release-instructions...
Thomas Kluyver -
r23277:852ac92e merge
parent child Browse files
Show More
@@ -1,56 +1,76 b''
1 .. _core_developer_guide:
1 .. _core_developer_guide:
2
2
3 =================================
3 =================================
4 Guide for IPython core Developers
4 Guide for IPython core Developers
5 =================================
5 =================================
6
6
7 This guide documents the development of IPython itself. Alternatively,
7 This guide documents the development of IPython itself. Alternatively,
8 developers of third party tools and libraries that use IPython should see the
8 developers of third party tools and libraries that use IPython should see the
9 :doc:`../development/index`.
9 :doc:`../development/index`.
10
10
11
11
12 For instruction on how to make a developer install see :ref:`devinstall`.
12 For instructions on how to make a developer install see :ref:`devinstall`.
13
13
14 .. toctree::
14 .. toctree::
15 :maxdepth: 1
15 :maxdepth: 1
16
16
17 release_process
17 release_process
18
18
19
19
20 Backporting Pull requests
20 Backporting Pull requests
21 -------------------------
21 -------------------------
22
22
23 All pull requests should usually be made against ``master``, if a Pull Request
23 All pull requests should usually be made against ``master``, if a Pull Request
24 need to be backported to an earlier release; then it should be tagged with the
24 need to be backported to an earlier release; then it should be tagged with the
25 correct ``milestone``. We then use `ghpro <https://pypi.python.org/pypi/ghpro>`
25 correct ``milestone``.
26
27 If you are an admin on the IPython repository just mention the **backport bot** to
28 do the work for you. The bot is evolving so instructions may be different. At
29 the time of this writing you can use::
30
31 @meeseeksdev[bot] backport to <branchname>
32
33 The bot will attempt to backport the current pull-request and issue a PR if
34 possible.
35
36 .. note::
37
38 The ``@`` and ``[dev]`` when mentioning the bot should be optional and can
39 be omitted.
40
41
42 Backport with ghpro
43 -------------------
44
45 We can also use `ghpro <https://pypi.python.org/pypi/ghpro>`
26 to automatically list and apply the PR on other branches. For example:
46 to automatically list and apply the PR on other branches. For example:
27
47
28 .. code-block:: bash
48 .. code-block:: bash
29
49
30 $ backport-pr todo --milestone 5.2
50 $ backport-pr todo --milestone 5.2
31 [...snip..]
51 [...snip..]
32 The following PRs have been backported
52 The following PRs have been backported
33 9848
53 9848
34 9851
54 9851
35 9953
55 9953
36 9955
56 9955
37 The following PRs should be backported:
57 The following PRs should be backported:
38 9417
58 9417
39 9863
59 9863
40 9925
60 9925
41 9947
61 9947
42
62
43 $ backport-pr apply 5.x 9947
63 $ backport-pr apply 5.x 9947
44 [...snip...]
64 [...snip...]
45
65
46
66
47 Old Documentation
67 Old Documentation
48 =================
68 =================
49
69
50 Out of date documentation is still available and have been kept for archival purposes.
70 Out of date documentation is still available and have been kept for archival purposes.
51
71
52 .. note::
72 .. note::
53
73
54 Developers documentation used to be on the IPython wiki, but are now out of
74 Developers documentation used to be on the IPython wiki, but are now out of
55 date. The wiki is though still available for historical reasons: `Old IPython
75 date. The wiki is though still available for historical reasons: `Old IPython
56 GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_
76 GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_
@@ -1,252 +1,259 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:-GitHub-workflow#milestones>`_.
51 <https://github.com/ipython/ipython/wiki/Dev:-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 If a minor release you might need to do some of the above points manually, and
91 forward port the changes.
92
90 3. Make sure the repository is clean
93 3. Make sure the repository is clean
91 ------------------------------------
94 ------------------------------------
92
95
93 of any file that could be problematic.
96 of any file that could be problematic.
94 Remove all non-tracked files with:
97 Remove all non-tracked files with:
95
98
96 .. code::
99 .. code::
97
100
98 git clean -xfdi
101 git clean -xfdi
99
102
100 This will ask for confirmation before removing all untracked files. Make
103 This will ask for confirmation before removing all untracked files. Make
101 sure the ``dist/`` folder is clean to avoid any stale builds from
104 sure the ``dist/`` folder is clean to avoid any stale builds from
102 previous build attempts.
105 previous build attempts.
103
106
104
107
105 4. Update the release version number
108 4. Update the release version number
106 ------------------------------------
109 ------------------------------------
107
110
108 Edit ``IPython/core/release.py`` to have the current version.
111 Edit ``IPython/core/release.py`` to have the current version.
109
112
110 in particular, update version number and ``_version_extra`` content in
113 in particular, update version number and ``_version_extra`` content in
111 ``IPython/core/release.py``.
114 ``IPython/core/release.py``.
112
115
113 Step 5 will validate your changes automatically, but you might still want to
116 Step 5 will validate your changes automatically, but you might still want to
114 make sure the version number matches pep440.
117 make sure the version number matches pep440.
115
118
116 In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist``
119 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
120 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
121 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
122 is no separator between the '3' and the 'r'. Check the environment variable
120 ``$VERSION`` as well.
123 ``$VERSION`` as well.
121
124
122 You will likely just have to modify/comment/uncomment one of the lines setting
125 You will likely just have to modify/comment/uncomment one of the lines setting
123 ``_version_extra``
126 ``_version_extra``
124
127
125
128
126 5. Run the `tools/build_release` script
129 5. Run the `tools/build_release` script
127 ---------------------------------------
130 ---------------------------------------
128
131
129 Running ``tools/build_release`` does all the file checking and building that
132 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
133 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.
134 the build procedure runs OK, and tests other steps in the release process.
132
135
133 The ``build_release`` script will in particular verify that the version number
136 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.
137 match PEP 440, in order to avoid surprise at the time of build upload.
135
138
136 We encourage creating a test build of the docs as well.
139 We encourage creating a test build of the docs as well.
137
140
138 6. Create and push the new tag
141 6. Create and push the new tag
139 ------------------------------
142 ------------------------------
140
143
141 Commit the changes to release.py::
144 Commit the changes to release.py::
142
145
143 git commit -am "release $VERSION"
146 git commit -am "release $VERSION"
144 git push origin $BRANCH
147 git push origin $BRANCH
145
148
146 Create and push the tag::
149 Create and push the tag::
147
150
148 git tag -am "release $VERSION" "$VERSION"
151 git tag -am "release $VERSION" "$VERSION"
149 git push origin --tags
152 git push origin --tags
150
153
151 Update release.py back to ``x.y-dev`` or ``x.y-maint``, and re-add the
154 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::
155 ``development`` entry in ``docs/source/whatsnew/index.rst`` and push::
153
156
154 git commit -am "back to development"
157 git commit -am "back to development"
155 git push origin $BRANCH
158 git push origin $BRANCH
156
159
157 7. Get a fresh clone
160 7. Get a fresh clone
158 --------------------
161 --------------------
159
162
160 Get a fresh clone of the tag for building the release::
163 Get a fresh clone of the tag for building the release::
161
164
162 cd /tmp
165 cd /tmp
163 git clone --depth 1 https://github.com/ipython/ipython.git -b "$VERSION"
166 git clone --depth 1 https://github.com/ipython/ipython.git -b "$VERSION"
164 cd ipython
167 cd ipython
165
168
166 .. note::
169 .. note::
167
170
168 You can aslo cleanup the current working repository with ``git clean -xfdi``
171 You can aslo cleanup the current working repository with ``git clean -xfdi``
169
172
170 8. Run the release script
173 8. Run the release script
171 -------------------------
174 -------------------------
172
175
173 .. important::
176 .. important::
174
177
175 These steps cover instructions for creating releases of IPython 5.x LTS and
178 These steps cover instructions for creating releases of IPython 5.x LTS and
176 IPython 6.x. Ignore release steps for Python 2 when releasing IPython 6.x
179 IPython 6.x. Ignore release steps for Python 2 when releasing IPython 6.x
177 which no longer supports Python 2.
180 which no longer supports Python 2.
178
181
179 Run the ``release`` script, this step requires having a current wheel, Python
182 Run the ``release`` script, this step requires having a current wheel, Python
180 >=3.4 and Python 2.7.::
183 >=3.4 and Python 2.7.::
181
184
182 ./tools/release
185 ./tools/release
183
186
184 This makes the tarballs and wheels, and puts them under the ``dist/``
187 This makes the tarballs and wheels, and puts them under the ``dist/``
185 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
188 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
189 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
190 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
188 Python it is built for. Using an universal wheel would prevent this.
191 Python it is built for. Using an universal wheel would prevent this.
189
192
190 Use the following to actually upload the result of the build::
193 Use the following to actually upload the result of the build::
191
194
192 ./tools/release upload
195 ./tools/release upload
193
196
194 It should posts them to ``archive.ipython.org``.
197 It should posts them to ``archive.ipython.org``.
195
198
196 You will need to use `twine <https://github.com/pypa/twine>`_ ) manually to
199 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
200 actually upload on PyPI. Unlike setuptools, twine is able to upload packages
198 over SSL::
201 over SSL::
199
202
200 twine upload dist/*
203 twine upload dist/*
201
204
202
205
203 PyPI/Warehouse will automatically hide previous releases. If you are uploading
206 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.
207 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
205
208
206
209
207 9. Draft a short release announcement
210 9. Draft a short release announcement
208 -------------------------------------
211 -------------------------------------
209
212
210 The announcement should include:
213 The announcement should include:
211
214
212 - release highlights
215 - release highlights
213 - a link to the html version of the *What's new* section of the documentation
216 - 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)
217 - a link to upgrade or installation tips (if necessary)
215
218
216 Post the announcement to the mailing list and or blog, and link from Twitter.
219 Post the announcement to the mailing list and or blog, and link from Twitter.
217
220
218 .. note::
221 .. note::
219
222
220 If you are doing a RC or Beta, you can likely skip the next steps.
223 If you are doing a RC or Beta, you can likely skip the next steps.
221
224
222 10. Update milestones on GitHub
225 10. Update milestones on GitHub
223 -------------------------------
226 -------------------------------
224
227
225 These steps will bring milestones up to date:
228 These steps will bring milestones up to date:
226
229
227 - close the just released milestone
230 - close the just released milestone
228 - open a new milestone for the next release (x, y+1), if the milestone doesn't
231 - open a new milestone for the next release (x, y+1), if the milestone doesn't
229 exist already
232 exist already
230
233
231 11. Update the IPython website
234 11. Update the IPython website
232 ------------------------------
235 ------------------------------
233
236
234 The IPython website should document the new release:
237 The IPython website should document the new release:
235
238
236 - add release announcement (news, announcements)
239 - add release announcement (news, announcements)
237 - update current version and download links
240 - update current version and download links
238 - update links on the documentation page (especially if a major release)
241 - update links on the documentation page (especially if a major release)
239
242
240 12. Update readthedocs
243 12. Update readthedocs
241 ----------------------
244 ----------------------
242
245
243 Make sure to update readthedocs and set the latest tag as stable, as well as
246 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.
247 checking that previous release is still building under its own tag.
245
248
249 13. Update the Conda-Forge feedstock
250 ------------------------------------
251
252 Follow the instructions on `the repository <https://github.com/conda-forge/ipython-feedstock>`_
246
253
247 13. Celebrate!
254 14. Celebrate!
248 --------------
255 --------------
249
256
250 Celebrate the release and please thank the contributors for their work. Great
257 Celebrate the release and please thank the contributors for their work. Great
251 job!
258 job!
252
259
General Comments 0
You need to be logged in to leave comments. Login now