##// END OF EJS Templates
Update release docs for PEP 527
Thomas Kluyver -
Show More
@@ -1,246 +1,246 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%3A-GitHub-workflow#milestones>`_.
51 <https://github.com/ipython/ipython/wiki/Dev%3A-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 3. Make sure the repository is clean
90 3. Make sure the repository is clean
91 ------------------------------------
91 ------------------------------------
92
92
93 of any file that could be problematic.
93 of any file that could be problematic.
94 Remove all non-tracked files with:
94 Remove all non-tracked files with:
95
95
96 .. code::
96 .. code::
97
97
98 git clean -xfdi
98 git clean -xfdi
99
99
100 This will ask for confirmation before removing all untracked files. Make
100 This will ask for confirmation before removing all untracked files. Make
101 sure the ``dist/`` folder is clean to avoid any stale builds from
101 sure the ``dist/`` folder is clean to avoid any stale builds from
102 previous build attempts.
102 previous build attempts.
103
103
104
104
105 4. Update the release version number
105 4. Update the release version number
106 ------------------------------------
106 ------------------------------------
107
107
108 Edit ``IPython/core/release.py`` to have the current version.
108 Edit ``IPython/core/release.py`` to have the current version.
109
109
110 in particular, update version number and ``_version_extra`` content in
110 in particular, update version number and ``_version_extra`` content in
111 ``IPython/core/release.py``.
111 ``IPython/core/release.py``.
112
112
113 Step 5 will validate your changes automatically, but you might still want to
113 Step 5 will validate your changes automatically, but you might still want to
114 make sure the version number matches pep440.
114 make sure the version number matches pep440.
115
115
116 In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist``
116 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
117 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
118 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
119 is no separator between the '3' and the 'r'. Check the environment variable
120 ``$VERSION`` as well.
120 ``$VERSION`` as well.
121
121
122 You will likely just have to modify/comment/uncomment one of the lines setting
122 You will likely just have to modify/comment/uncomment one of the lines setting
123 ``_version_extra``
123 ``_version_extra``
124
124
125
125
126 5. Run the `tools/build_release` script
126 5. Run the `tools/build_release` script
127 ---------------------------------------
127 ---------------------------------------
128
128
129 Running ``tools/build_release`` does all the file checking and building that
129 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
130 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.
131 the build procedure runs OK, and tests other steps in the release process.
132
132
133 The ``build_release`` script will in particular verify that the version number
133 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.
134 match PEP 440, in order to avoid surprise at the time of build upload.
135
135
136 We encourage creating a test build of the docs as well.
136 We encourage creating a test build of the docs as well.
137
137
138 6. Create and push the new tag
138 6. Create and push the new tag
139 ------------------------------
139 ------------------------------
140
140
141 Commit the changes to release.py::
141 Commit the changes to release.py::
142
142
143 git commit -am "release $VERSION"
143 git commit -am "release $VERSION"
144 git push origin $BRANCH
144 git push origin $BRANCH
145
145
146 Create and push the tag::
146 Create and push the tag::
147
147
148 git tag -am "release $VERSION" "$VERSION"
148 git tag -am "release $VERSION" "$VERSION"
149 git push origin --tags
149 git push origin --tags
150
150
151 Update release.py back to ``x.y-dev`` or ``x.y-maint``, and re-add the
151 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::
152 ``development`` entry in ``docs/source/whatsnew/index.rst`` and push::
153
153
154 git commit -am "back to development"
154 git commit -am "back to development"
155 git push origin $BRANCH
155 git push origin $BRANCH
156
156
157 7. Get a fresh clone
157 7. Get a fresh clone
158 --------------------
158 --------------------
159
159
160 Get a fresh clone of the tag for building the release::
160 Get a fresh clone of the tag for building the release::
161
161
162 cd /tmp
162 cd /tmp
163 git clone --depth 1 https://github.com/ipython/ipython.git -b "$VERSION"
163 git clone --depth 1 https://github.com/ipython/ipython.git -b "$VERSION"
164 cd ipython
164 cd ipython
165
165
166 .. note::
166 .. note::
167
167
168 You can aslo cleanup the current working repository with ``git clean -xfdi``
168 You can aslo cleanup the current working repository with ``git clean -xfdi``
169
169
170 8. Run the release script
170 8. Run the release script
171 -------------------------
171 -------------------------
172
172
173 Run the ``release`` script, this step requires having a current wheel, Python
173 Run the ``release`` script, this step requires having a current wheel, Python
174 >=3.4 and Python 2.7.::
174 >=3.4 and Python 2.7.::
175
175
176 ./tools/release
176 ./tools/release
177
177
178 This makes the tarballs, zipfiles, and wheels, and put them under the ``dist/``
178 This makes the tarballs and wheels, and puts them under the ``dist/``
179 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
179 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
180 uploading them to PyPI. We do not use an universal wheel as each wheel
180 uploading them to PyPI. We do not use an universal wheel as each wheel
181 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
181 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
182 Python it is built for. Using an universal wheel would prevent this.
182 Python it is built for. Using an universal wheel would prevent this.
183
183
184 Use the following to actually upload the result of the build::
184 Use the following to actually upload the result of the build::
185
185
186 ./tools/release upload
186 ./tools/release upload
187
187
188 It should posts them to ``archive.ipython.org``.
188 It should posts them to ``archive.ipython.org``.
189
189
190 You will need to use `twine <https://github.com/pypa/twine>`_ ) manually to
190 You will need to use `twine <https://github.com/pypa/twine>`_ ) manually to
191 actually upload on PyPI. Unlike setuptools, twine is able to upload packages
191 actually upload on PyPI. Unlike setuptools, twine is able to upload packages
192 over SSL.
192 over SSL.
193
193
194 twine upload dist/*
194 twine upload dist/*
195
195
196
196
197 PyPI/Warehouse will automatically hide previous releases. If you are uploading
197 PyPI/Warehouse will automatically hide previous releases. If you are uploading
198 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
198 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
199
199
200
200
201 9. Draft a short release announcement
201 9. Draft a short release announcement
202 -------------------------------------
202 -------------------------------------
203
203
204 The announcement should include:
204 The announcement should include:
205
205
206 - release highlights
206 - release highlights
207 - a link to the html version of the *What's new* section of the documentation
207 - a link to the html version of the *What's new* section of the documentation
208 - a link to upgrade or installation tips (if necessary)
208 - a link to upgrade or installation tips (if necessary)
209
209
210 Post the announcement to the mailing list and or blog, and link from Twitter.
210 Post the announcement to the mailing list and or blog, and link from Twitter.
211
211
212 .. note::
212 .. note::
213
213
214 If you are doing a RC or Beta, you can likely skip the next steps.
214 If you are doing a RC or Beta, you can likely skip the next steps.
215
215
216 10. Update milestones on GitHub
216 10. Update milestones on GitHub
217 -------------------------------
217 -------------------------------
218
218
219 These steps will bring milestones up to date:
219 These steps will bring milestones up to date:
220
220
221 - close the just released milestone
221 - close the just released milestone
222 - open a new milestone for the next release (x, y+1), if the milestone doesn't
222 - open a new milestone for the next release (x, y+1), if the milestone doesn't
223 exist already
223 exist already
224
224
225 11. Update the IPython website
225 11. Update the IPython website
226 ------------------------------
226 ------------------------------
227
227
228 The IPython website should document the new release:
228 The IPython website should document the new release:
229
229
230 - add release announcement (news, announcements)
230 - add release announcement (news, announcements)
231 - update current version and download links
231 - update current version and download links
232 - update links on the documentation page (especially if a major release)
232 - update links on the documentation page (especially if a major release)
233
233
234 12. Update readthedocs
234 12. Update readthedocs
235 ----------------------
235 ----------------------
236
236
237 Make sure to update readthedocs and set the latest tag as stable, as well as
237 Make sure to update readthedocs and set the latest tag as stable, as well as
238 checking that previous release is still building under its own tag.
238 checking that previous release is still building under its own tag.
239
239
240
240
241 13. Celebrate!
241 13. Celebrate!
242 --------------
242 --------------
243
243
244 Celebrate the release and please thank the contributors for their work. Great
244 Celebrate the release and please thank the contributors for their work. Great
245 job!
245 job!
246
246
General Comments 0
You need to be logged in to leave comments. Login now