##// END OF EJS Templates
Update backport instructions just to see if autobackport works.
Matthias Bussonnier -
Show More
@@ -1,311 +1,318 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 instructions 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 Backporting Pull requests
14 Backporting Pull requests
15 -------------------------
15 -------------------------
16
16
17 All pull requests should usually be made against ``master``, if a Pull Request
17 All pull requests should usually be made against ``master``, if a Pull Request
18 need to be backported to an earlier release; then it should be tagged with the
18 need to be backported to an earlier release; then it should be tagged with the
19 correct ``milestone``.
19 correct ``milestone``.
20
20
21 If you are an admin on the IPython repository just mention the **backport bot** to
21 If you tag a pull request with a milestone **before** merging the pull request,
22 do the work for you. The bot is evolving so instructions may be different. At
22 and the base ref is `master`, then our backport bot should automatically create
23 the time of this writing you can use::
23 a corresponding pull-request that backport on the correct branch.
24
25 If you are an admin on the IPython repository you can also just mention the
26 **backport bot** to do the work for you. The bot is evolving so instructions may
27 be different. At the time of this writing you can use::
24
28
25 @meeseeksdev[bot] backport [to <branchname>]
29 @meeseeksdev[bot] backport [to <branchname>]
26
30
27 The bot will attempt to backport the current pull-request and issue a PR if
31 The bot will attempt to backport the current pull-request and issue a PR if
28 possible. If the milestone is set on the issue you can omit the branch to
32 possible. If the milestone is set on the issue you can omit the branch to
29 backport to.
33 backport to.
30
34
31 .. note::
35 .. note::
32
36
33 The ``@`` and ``[dev]`` when mentioning the bot should be optional and can
37 The ``@`` and ``[dev]`` when mentioning the bot should be optional and can
34 be omitted.
38 be omitted.
35
39
40 If the pull request cannot be automatically backported, the bot should tell you
41 so on the PR and apply a "Need manual backport" tag to the origin PR.
42
36
43
37 Backport with ghpro
44 Backport with ghpro
38 -------------------
45 -------------------
39
46
40 We can also use `ghpro <https://pypi.python.org/pypi/ghpro>`
47 We can also use `ghpro <https://pypi.python.org/pypi/ghpro>`
41 to automatically list and apply the PR on other branches. For example:
48 to automatically list and apply the PR on other branches. For example:
42
49
43 .. code-block:: bash
50 .. code-block:: bash
44
51
45 $ backport-pr todo --milestone 5.2
52 $ backport-pr todo --milestone 5.2
46 [...snip..]
53 [...snip..]
47 The following PRs have been backported
54 The following PRs have been backported
48 9848
55 9848
49 9851
56 9851
50 9953
57 9953
51 9955
58 9955
52 The following PRs should be backported:
59 The following PRs should be backported:
53 9417
60 9417
54 9863
61 9863
55 9925
62 9925
56 9947
63 9947
57
64
58 $ backport-pr apply 5.x 9947
65 $ backport-pr apply 5.x 9947
59 [...snip...]
66 [...snip...]
60
67
61
68
62 .. _release_process:
69 .. _release_process:
63
70
64 =======================
71 =======================
65 IPython release process
72 IPython release process
66 =======================
73 =======================
67
74
68 This document contains the process that is used to create an IPython release.
75 This document contains the process that is used to create an IPython release.
69
76
70 Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython``
77 Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython``
71 repository automates most of the release process. This document serves as a
78 repository automates most of the release process. This document serves as a
72 handy reminder and checklist for the release manager.
79 handy reminder and checklist for the release manager.
73
80
74 During the release process, you might need the extra following dependencies:
81 During the release process, you might need the extra following dependencies:
75
82
76 - ``keyring`` to access your GitHub authentication tokens
83 - ``keyring`` to access your GitHub authentication tokens
77 - ``graphviz`` to generate some graphs in the documentation
84 - ``graphviz`` to generate some graphs in the documentation
78 - ``ghpro`` to generate the stats
85 - ``ghpro`` to generate the stats
79
86
80 Make sure you have all the required dependencies to run the tests as well.
87 Make sure you have all the required dependencies to run the tests as well.
81
88
82
89
83 1. Set Environment variables
90 1. Set Environment variables
84 ----------------------------
91 ----------------------------
85
92
86 Set environment variables to document previous release tag, current
93 Set environment variables to document previous release tag, current
87 release milestone, current release version, and git tag.
94 release milestone, current release version, and git tag.
88
95
89 These variables may be used later to copy/paste as answers to the script
96 These variables may be used later to copy/paste as answers to the script
90 questions instead of typing the appropriate command when the time comes. These
97 questions instead of typing the appropriate command when the time comes. These
91 variables are not used by the scripts directly; therefore, there is no need to
98 variables are not used by the scripts directly; therefore, there is no need to
92 ``export`` them. The format for bash is as follows, but note that these values
99 ``export`` them. The format for bash is as follows, but note that these values
93 are just an example valid only for the 5.0 release; you'll need to update them
100 are just an example valid only for the 5.0 release; you'll need to update them
94 for the release you are actually making::
101 for the release you are actually making::
95
102
96 PREV_RELEASE=4.2.1
103 PREV_RELEASE=4.2.1
97 MILESTONE=5.0
104 MILESTONE=5.0
98 VERSION=5.0.0
105 VERSION=5.0.0
99 BRANCH=master
106 BRANCH=master
100
107
101
108
102 2. Create GitHub stats and finish release note
109 2. Create GitHub stats and finish release note
103 ----------------------------------------------
110 ----------------------------------------------
104
111
105 .. note::
112 .. note::
106
113
107 This step is optional if making a Beta or RC release.
114 This step is optional if making a Beta or RC release.
108
115
109 .. note::
116 .. note::
110
117
111 Before generating the GitHub stats, verify that all closed issues and pull
118 Before generating the GitHub stats, verify that all closed issues and pull
112 requests have `appropriate milestones
119 requests have `appropriate milestones
113 <https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow#milestones>`_.
120 <https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow#milestones>`_.
114 `This search
121 `This search
115 <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_
122 <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_
116 should return no results before creating the GitHub stats.
123 should return no results before creating the GitHub stats.
117
124
118 If a major release:
125 If a major release:
119
126
120 - merge any pull request notes into what's new::
127 - merge any pull request notes into what's new::
121
128
122 python tools/update_whatsnew.py
129 python tools/update_whatsnew.py
123
130
124 - update ``docs/source/whatsnew/development.rst``, to ensure it covers
131 - update ``docs/source/whatsnew/development.rst``, to ensure it covers
125 the major release features
132 the major release features
126
133
127 - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is
134 - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is
128 the numerical release version
135 the numerical release version
129
136
130 - generate summary of GitHub contributions, which can be done with::
137 - generate summary of GitHub contributions, which can be done with::
131
138
132 python tools/github_stats.py --milestone $MILESTONE > stats.rst
139 python tools/github_stats.py --milestone $MILESTONE > stats.rst
133
140
134 which may need some manual cleanup of ``stats.rst``. Add the cleaned
141 which may need some manual cleanup of ``stats.rst``. Add the cleaned
135 ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst``
142 ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst``
136 where ``X`` is the numerical release version (don't forget to add it to
143 where ``X`` is the numerical release version (don't forget to add it to
137 the git repo as well). If creating a major release, make a new
144 the git repo as well). If creating a major release, make a new
138 ``github-stats-X.rst`` file; if creating a minor release, the content
145 ``github-stats-X.rst`` file; if creating a minor release, the content
139 from ``stats.rst`` may simply be added to the top of an existing
146 from ``stats.rst`` may simply be added to the top of an existing
140 ``github-stats-X.rst`` file. Finally, edit
147 ``github-stats-X.rst`` file. Finally, edit
141 ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X``
148 ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X``
142 file you just created and remove temporarily the first entry called
149 file you just created and remove temporarily the first entry called
143 ``development`` (you'll need to add it back after release).
150 ``development`` (you'll need to add it back after release).
144
151
145 Make sure that the stats file has a header or it won't be rendered in
152 Make sure that the stats file has a header or it won't be rendered in
146 the final documentation.
153 the final documentation.
147
154
148 To find duplicates and update `.mailmap`, use::
155 To find duplicates and update `.mailmap`, use::
149
156
150 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
157 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
151
158
152 If a minor release you might need to do some of the above points manually, and
159 If a minor release you might need to do some of the above points manually, and
153 forward port the changes.
160 forward port the changes.
154
161
155 3. Make sure the repository is clean
162 3. Make sure the repository is clean
156 ------------------------------------
163 ------------------------------------
157
164
158 of any file that could be problematic.
165 of any file that could be problematic.
159 Remove all non-tracked files with:
166 Remove all non-tracked files with:
160
167
161 .. code::
168 .. code::
162
169
163 git clean -xfdi
170 git clean -xfdi
164
171
165 This will ask for confirmation before removing all untracked files. Make
172 This will ask for confirmation before removing all untracked files. Make
166 sure the ``dist/`` folder is clean to avoid any stale builds from
173 sure the ``dist/`` folder is clean to avoid any stale builds from
167 previous build attempts.
174 previous build attempts.
168
175
169
176
170 4. Update the release version number
177 4. Update the release version number
171 ------------------------------------
178 ------------------------------------
172
179
173 Edit ``IPython/core/release.py`` to have the current version.
180 Edit ``IPython/core/release.py`` to have the current version.
174
181
175 in particular, update version number and ``_version_extra`` content in
182 in particular, update version number and ``_version_extra`` content in
176 ``IPython/core/release.py``.
183 ``IPython/core/release.py``.
177
184
178 Step 5 will validate your changes automatically, but you might still want to
185 Step 5 will validate your changes automatically, but you might still want to
179 make sure the version number matches pep440.
186 make sure the version number matches pep440.
180
187
181 In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist``
188 In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist``
182 and ``bdist`` will appear as different releases. For example, a valid version
189 and ``bdist`` will appear as different releases. For example, a valid version
183 number for a release candidate (rc) release is: ``1.3rc1``. Notice that there
190 number for a release candidate (rc) release is: ``1.3rc1``. Notice that there
184 is no separator between the '3' and the 'r'. Check the environment variable
191 is no separator between the '3' and the 'r'. Check the environment variable
185 ``$VERSION`` as well.
192 ``$VERSION`` as well.
186
193
187 You will likely just have to modify/comment/uncomment one of the lines setting
194 You will likely just have to modify/comment/uncomment one of the lines setting
188 ``_version_extra``
195 ``_version_extra``
189
196
190
197
191 5. Run the `tools/build_release` script
198 5. Run the `tools/build_release` script
192 ---------------------------------------
199 ---------------------------------------
193
200
194 Running ``tools/build_release`` does all the file checking and building that
201 Running ``tools/build_release`` does all the file checking and building that
195 the real release script will do. This makes test installations, checks that
202 the real release script will do. This makes test installations, checks that
196 the build procedure runs OK, and tests other steps in the release process.
203 the build procedure runs OK, and tests other steps in the release process.
197
204
198 The ``build_release`` script will in particular verify that the version number
205 The ``build_release`` script will in particular verify that the version number
199 match PEP 440, in order to avoid surprise at the time of build upload.
206 match PEP 440, in order to avoid surprise at the time of build upload.
200
207
201 We encourage creating a test build of the docs as well.
208 We encourage creating a test build of the docs as well.
202
209
203 6. Create and push the new tag
210 6. Create and push the new tag
204 ------------------------------
211 ------------------------------
205
212
206 Commit the changes to release.py::
213 Commit the changes to release.py::
207
214
208 git commit -am "release $VERSION"
215 git commit -am "release $VERSION"
209 git push origin $BRANCH
216 git push origin $BRANCH
210
217
211 Create and push the tag::
218 Create and push the tag::
212
219
213 git tag -am "release $VERSION" "$VERSION"
220 git tag -am "release $VERSION" "$VERSION"
214 git push origin --tags
221 git push origin --tags
215
222
216 Update release.py back to ``x.y-dev`` or ``x.y-maint``, and re-add the
223 Update release.py back to ``x.y-dev`` or ``x.y-maint``, and re-add the
217 ``development`` entry in ``docs/source/whatsnew/index.rst`` and push::
224 ``development`` entry in ``docs/source/whatsnew/index.rst`` and push::
218
225
219 git commit -am "back to development"
226 git commit -am "back to development"
220 git push origin $BRANCH
227 git push origin $BRANCH
221
228
222 Now checkout the tag we just made::
229 Now checkout the tag we just made::
223
230
224 git checkout $VERSION
231 git checkout $VERSION
225
232
226 7. Run the release script
233 7. Run the release script
227 -------------------------
234 -------------------------
228
235
229 Run the ``release`` script, this step requires having a current wheel, Python
236 Run the ``release`` script, this step requires having a current wheel, Python
230 >=3.4 and Python 2.7.::
237 >=3.4 and Python 2.7.::
231
238
232 ./tools/release
239 ./tools/release
233
240
234 This makes the tarballs and wheels, and puts them under the ``dist/``
241 This makes the tarballs and wheels, and puts them under the ``dist/``
235 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
242 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
236 uploading them to PyPI. We do not use an universal wheel as each wheel
243 uploading them to PyPI. We do not use an universal wheel as each wheel
237 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
244 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
238 Python it is built for. Using an universal wheel would prevent this.
245 Python it is built for. Using an universal wheel would prevent this.
239
246
240 Use the following to actually upload the result of the build::
247 Use the following to actually upload the result of the build::
241
248
242 ./tools/release upload
249 ./tools/release upload
243
250
244 It should posts them to ``archive.ipython.org`` and to PyPI.
251 It should posts them to ``archive.ipython.org`` and to PyPI.
245
252
246 PyPI/Warehouse will automatically hide previous releases. If you are uploading
253 PyPI/Warehouse will automatically hide previous releases. If you are uploading
247 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
254 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
248
255
249
256
250 8. Draft a short release announcement
257 8. Draft a short release announcement
251 -------------------------------------
258 -------------------------------------
252
259
253 The announcement should include:
260 The announcement should include:
254
261
255 - release highlights
262 - release highlights
256 - a link to the html version of the *What's new* section of the documentation
263 - a link to the html version of the *What's new* section of the documentation
257 - a link to upgrade or installation tips (if necessary)
264 - a link to upgrade or installation tips (if necessary)
258
265
259 Post the announcement to the mailing list and or blog, and link from Twitter.
266 Post the announcement to the mailing list and or blog, and link from Twitter.
260
267
261 .. note::
268 .. note::
262
269
263 If you are doing a RC or Beta, you can likely skip the next steps.
270 If you are doing a RC or Beta, you can likely skip the next steps.
264
271
265 9. Update milestones on GitHub
272 9. Update milestones on GitHub
266 -------------------------------
273 -------------------------------
267
274
268 These steps will bring milestones up to date:
275 These steps will bring milestones up to date:
269
276
270 - close the just released milestone
277 - close the just released milestone
271 - open a new milestone for the next release (x, y+1), if the milestone doesn't
278 - open a new milestone for the next release (x, y+1), if the milestone doesn't
272 exist already
279 exist already
273
280
274 10. Update the IPython website
281 10. Update the IPython website
275 ------------------------------
282 ------------------------------
276
283
277 The IPython website should document the new release:
284 The IPython website should document the new release:
278
285
279 - add release announcement (news, announcements)
286 - add release announcement (news, announcements)
280 - update current version and download links
287 - update current version and download links
281 - update links on the documentation page (especially if a major release)
288 - update links on the documentation page (especially if a major release)
282
289
283 11. Update readthedocs
290 11. Update readthedocs
284 ----------------------
291 ----------------------
285
292
286 Make sure to update readthedocs and set the latest tag as stable, as well as
293 Make sure to update readthedocs and set the latest tag as stable, as well as
287 checking that previous release is still building under its own tag.
294 checking that previous release is still building under its own tag.
288
295
289 12. Update the Conda-Forge feedstock
296 12. Update the Conda-Forge feedstock
290 ------------------------------------
297 ------------------------------------
291
298
292 Follow the instructions on `the repository <https://github.com/conda-forge/ipython-feedstock>`_
299 Follow the instructions on `the repository <https://github.com/conda-forge/ipython-feedstock>`_
293
300
294 13. Celebrate!
301 13. Celebrate!
295 --------------
302 --------------
296
303
297 Celebrate the release and please thank the contributors for their work. Great
304 Celebrate the release and please thank the contributors for their work. Great
298 job!
305 job!
299
306
300
307
301
308
302 Old Documentation
309 Old Documentation
303 =================
310 =================
304
311
305 Out of date documentation is still available and have been kept for archival purposes.
312 Out of date documentation is still available and have been kept for archival purposes.
306
313
307 .. note::
314 .. note::
308
315
309 Developers documentation used to be on the IPython wiki, but are now out of
316 Developers documentation used to be on the IPython wiki, but are now out of
310 date. The wiki is though still available for historical reasons: `Old IPython
317 date. The wiki is though still available for historical reasons: `Old IPython
311 GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_
318 GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_
General Comments 0
You need to be logged in to leave comments. Login now