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