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