@@ -20,8 +20,8 @@ documentation. There are a few ways to streamline things:
20
20
online twine documentation for details.
21
21
22
22
23
- Release preparation
24
- ===================
23
+ Prior to release
24
+ ================
25
25
26
26
Add/drop Python versions
27
27
------------------------
@@ -39,28 +39,43 @@ wheels for new Python versions after the first Python rc once manylinux and
39
39
cibuildwheel support it. For Python 3.11 we were able to release within a week
40
40
of the rc1 announcement.
41
41
42
+
42
43
Backport Pull Requests
43
44
----------------------
44
45
45
46
Changes that have been marked for this release must be backported to the
46
47
maintenance/1.21.x branch.
47
48
48
- Update release documentation
49
- ----------------------------
50
49
51
- Four documents usually need to be updated or created before making a release:
50
+ Make a release PR
51
+ =================
52
+
53
+ Five documents usually need to be updated or created for the release PR:
52
54
53
55
- The changelog
54
56
- The release-notes
55
57
- The ``.mailmap `` file
56
- - The ``doc/source/release.rst `` file
58
+ - The ``pyproject.toml `` file
59
+ - The ``pyproject.setuppy.toml `` file # 1.26.x only
60
+
61
+ These changes should be made in an ordinary PR against the maintenance branch.
62
+ The commit message should contain a ``[wheel build] `` directive to test if the
63
+ wheels build. Other small, miscellaneous fixes may be part of this PR. The
64
+ commit message might be something like::
65
+
66
+ REL: Prepare for the NumPy 1.20.0 release
67
+
68
+ - Create 1.20.0-changelog.rst.
69
+ - Update 1.20.0-notes.rst.
70
+ - Update .mailmap.
71
+ - Update pyproject.toml
72
+ - Update pyproject.setuppy.toml
73
+
74
+ [wheel build]
57
75
58
- These changes should be made as an ordinary PR against the maintenance branch.
59
- After release all files except ``doc/source/release.rst `` will need to be
60
- forward ported to the main branch.
61
76
62
77
Generate the changelog
63
- ~~~~~~~~~~~~~~~~~~~~~~
78
+ ----------------------
64
79
65
80
The changelog is generated using the changelog tool::
66
81
@@ -75,8 +90,9 @@ file, which is a lot of work. It is best to make several trial runs before
75
90
reaching this point and ping the malefactors using a GitHub issue to get the
76
91
needed information.
77
92
93
+
78
94
Finish the release notes
79
- ~~~~~~~~~~~~~~~~~~~~~~~~
95
+ ------------------------
80
96
81
97
If this is the first release in a series the release note is generated, see
82
98
the release note in ``doc/release/upcoming_changes/README.rst `` to see how to
@@ -91,13 +107,24 @@ done. Note that the ``:orphan:`` markup at the top, if present, will need
91
107
changing to ``.. currentmodule:: numpy `` and the ``doc/source/release.rst ``
92
108
index file will need updating.
93
109
94
- Check the ``pavement.py `` file
95
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96
110
97
- Check that the pavement.py file points to the correct release notes. It should
98
- have been updated after the last release, but if not, fix it now::
111
+ Set the release version
112
+ -----------------------
113
+
114
+ Edit the ``pyproject.toml `` and ``pyproject.setuppy.toml `` files and set the
115
+ release version::
116
+
117
+ $ gvim pyproject.toml pyproject.setuppy.toml
118
+
119
+
120
+ Check the ``pavement.py `` and ``doc/source/release.rst `` files
121
+ --------------------------------------------------------------
122
+
123
+ Check that the ``pavement.py `` file points to the correct release notes. It should
124
+ have been updated after the last release, but if not, fix it now. Also make
125
+ sure that the notes have an entry in the ``release.rst `` file::
99
126
100
- $ gvim pavement.py
127
+ $ gvim pavement.py doc/source/release.rst
101
128
102
129
103
130
Release walkthrough
@@ -109,6 +136,7 @@ need to make adjustments if you have not forked the repository but simply
109
136
cloned it locally. You can also edit ``.git/config `` and add ``upstream `` if it
110
137
isn't already present.
111
138
139
+
112
140
1. Prepare the release commit
113
141
-----------------------------
114
142
@@ -135,42 +163,34 @@ If you need to delete the tag due to error::
135
163
$ git tag -d v1.21.0
136
164
$ git push --delete upstream v1.21.0
137
165
166
+
138
167
2. Build wheels
139
168
---------------
140
169
141
- Build wheels via cibuildwheel (preferred)
142
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143
-
144
170
Tagging the build at the beginning of this process will trigger a wheel build
145
171
via cibuildwheel and upload wheels and an sdist to the staging repo. The CI run
146
172
on github actions (for all x86-based and macOS arm64 wheels) takes about 1 1/4
147
- hours. The CI run on travis (for aarch64) takes less time. You can check for
148
- uploaded files at the `staging repository `_, but note that it is not closely
149
- synched with what you see of the running jobs.
173
+ hours. The CI runs on cirrus (for aarch64 and M1) take less time. You can check
174
+ for uploaded files at the `staging repository `_, but note that it is not
175
+ closely synched with what you see of the running jobs.
150
176
151
177
If you wish to manually trigger a wheel build, you can do so:
152
178
153
179
- On github actions -> `Wheel builder `_ there is a "Run workflow" button, click
154
180
on it and choose the tag to build
155
- - On travis _ there is a "More Options" button, click on it and choose a branch
156
- to build. There does not appear to be an option to build a tag .
181
+ - On Cirrus we don't currently have an easy way to manually trigger builds and
182
+ uploads .
157
183
158
184
If a wheel build fails for unrelated reasons, you can rerun it individually:
159
185
160
186
- On github actions select `Wheel builder `_ click on the commit that contains
161
187
the build you want to rerun. On the left there is a list of wheel builds,
162
188
select the one you want to rerun and on the resulting page hit the
163
189
counterclockwise arrows button.
164
- - On travis _ select the failing build, which will take you to the travis job for
165
- that build. Hit the restart job button.
166
-
167
- Note that if you do need to rerun jobs, you will need to delete the uploaded
168
- file, if any, in the anaconda `staging repository `_, The old files will not be
169
- overwritten.
190
+ - On cirrus we haven't figured it out.
170
191
171
192
.. _`staging repository` : https://anaconda.org/multibuild-wheels-staging/numpy/files
172
193
.. _`Wheel builder` : https://github.com/numpy/numpy/actions/workflows/wheels.yml
173
- .. _travis : https://app.travis-ci.com/github/numpy/numpy
174
194
175
195
176
196
3. Download wheels
@@ -193,28 +213,7 @@ file is updated for continued development::
193
213
$ paver write_release
194
214
195
215
196
- 5. Reset the maintenance branch into a development state (skip for prereleases)
197
- -------------------------------------------------------------------------------
198
-
199
- Create release notes for next release and edit them to set the version. These
200
- notes will be a skeleton and have little content::
201
-
202
- $ cp doc/source/release/template.rst doc/source/release/1.21.1-notes.rst
203
- $ gvim doc/source/release/1.21.1-notes.rst
204
- $ git add doc/source/release/1.21.1-notes.rst
205
-
206
- Add new release notes to the documentation release list and update the
207
- ``RELEASE_NOTES `` variable in ``pavement.py ``::
208
-
209
- $ gvim doc/source/release.rst pavement.py
210
-
211
- Commit the result::
212
-
213
- $ git commit -a -m"REL: prepare 1.21.x for further development"
214
- $ git push upstream HEAD
215
-
216
-
217
- 6. Upload to PyPI
216
+ 5. Upload to PyPI
218
217
-----------------
219
218
220
219
Upload to PyPI using ``twine ``. A recent version of ``twine `` of is needed
@@ -233,7 +232,7 @@ wheel. PyPI only allows a single source distribution, here we have
233
232
chosen the zip archive.
234
233
235
234
236
- 7 . Upload files to github
235
+ 6 . Upload files to github
237
236
-------------------------
238
237
239
238
Go to `<https://github.com/numpy/numpy/releases >`_, there should be a ``v1.21.0
@@ -252,7 +251,7 @@ may take several tries to get it look right. Then
252
251
- Hit the ``{Publish,Update} release `` button at the bottom.
253
252
254
253
255
- 8 . Upload documents to numpy.org (skip for prereleases)
254
+ 7 . Upload documents to numpy.org (skip for prereleases)
256
255
-------------------------------------------------------
257
256
258
257
.. note :: You will need a GitHub personal access token to push the update.
@@ -263,10 +262,8 @@ and most patch releases. ``make merge-doc`` clones the ``numpy/doc`` repo into
263
262
264
263
$ git clean -xdfq
265
264
$ git co v1.21.0
266
- $ pushd doc
267
- $ make docenv && source docenv/bin/activate
268
- $ make merge-doc
269
- $ pushd build/merge
265
+ $ python -m spin docs merge-doc --build
266
+ $ pushd doc/build/merge
270
267
271
268
If the release series is a new one, you will need to add a new section to the
272
269
``doc/build/merge/index.html `` front page just after the "insert here" comment::
@@ -299,11 +296,30 @@ Once everything seems satisfactory, update, commit and upload the changes::
299
296
$ python3 update.py
300
297
$ git commit -a -m"Add documentation for v1.21.0"
301
298
$ git push
302
- $ deactivate
303
- $ popd
304
299
$ popd
305
300
306
301
302
+ 8. Reset the maintenance branch into a development state (skip for prereleases)
303
+ -------------------------------------------------------------------------------
304
+
305
+ Create release notes for next release and edit them to set the version. These
306
+ notes will be a skeleton and have little content::
307
+
308
+ $ cp doc/source/release/template.rst doc/source/release/1.21.1-notes.rst
309
+ $ gvim doc/source/release/1.21.1-notes.rst
310
+ $ git add doc/source/release/1.21.1-notes.rst
311
+
312
+ Add new release notes to the documentation release list and update the
313
+ ``RELEASE_NOTES `` variable in ``pavement.py ``::
314
+
315
+ $ gvim doc/source/release.rst pavement.py
316
+
317
+ Commit the result::
318
+
319
+ $ git commit -a -m"REL: prepare 1.21.x for further development"
320
+ $ git push upstream HEAD
321
+
322
+
307
323
9. Announce the release on numpy.org (skip for prereleases)
308
324
-----------------------------------------------------------
309
325
@@ -327,6 +343,7 @@ commit and push::
327
343
328
344
Go to your Github fork and make a pull request.
329
345
346
+
330
347
10. Announce to mailing lists
331
348
-----------------------------
332
349
@@ -337,8 +354,8 @@ as generated for the release notes above. If you crosspost, make sure that
337
354
python-announce-list is BCC so that replies will not be sent to that list.
338
355
339
356
340
- 11. Post-release tasks (skip for prereleases)
341
- ---------------------------------------------
357
+ 11. Post-release update main (skip for prereleases)
358
+ ---------------------------------------------------
342
359
343
360
Checkout main and forward port the documentation changes::
344
361
@@ -353,6 +370,7 @@ Checkout main and forward port the documentation changes::
353
370
354
371
Go to GitHub and make a PR.
355
372
373
+
356
374
12. Update oldest-supported-numpy
357
375
---------------------------------
358
376
0 commit comments