1
- This is a walkthrough of the NumPy 1.21 .0 release on Linux, modified for
1
+ This is a walkthrough of the NumPy 2.1 .0 release on Linux, modified for
2
2
building with GitHub Actions and cibuildwheels and uploading to the
3
3
`anaconda.org staging repository for NumPy <https://anaconda.org/multibuild-wheels-staging/numpy >`_.
4
- The commands can be copied into the command line, but be sure to replace 1.21 .0
4
+ The commands can be copied into the command line, but be sure to replace 2.1 .0
5
5
by the correct version. This should be read together with the
6
6
:ref: `general release guide <prepare_release >`.
7
7
@@ -44,42 +44,62 @@ Backport pull requests
44
44
----------------------
45
45
46
46
Changes that have been marked for this release must be backported to the
47
- maintenance/1.21.x branch.
47
+ maintenance/2.1.x branch.
48
+
49
+ Update 2.1.0 milestones
50
+ -----------------------
51
+
52
+ Look at the issues/prs with 2.1.0 milestones and either push them off to a
53
+ later version, or maybe remove the milestone.
48
54
49
55
50
56
Make a release PR
51
57
=================
52
58
53
- Five documents usually need to be updated or created for the release PR:
59
+ Four documents usually need to be updated or created for the release PR:
54
60
55
61
- The changelog
56
62
- The release-notes
57
63
- The ``.mailmap `` file
58
64
- The ``pyproject.toml `` file
59
- - The ``pyproject.toml.setuppy `` file # 1.26.x only
60
65
61
66
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
67
+ The commit heading should contain a ``[wheel build] `` directive to test if the
63
68
wheels build. Other small, miscellaneous fixes may be part of this PR. The
64
69
commit message might be something like::
65
70
66
- REL: Prepare for the NumPy 1.20. 0 release
71
+ REL: Prepare for the NumPy 2.1. 0 release [wheel build]
67
72
68
- - Create 1.20 .0-changelog.rst.
69
- - Update 1.20 .0-notes.rst.
73
+ - Create 2.1 .0-changelog.rst.
74
+ - Update 2.1 .0-notes.rst.
70
75
- Update .mailmap.
71
76
- Update pyproject.toml
72
- - Update pyproject.toml.setuppy
73
77
74
- [wheel build]
78
+
79
+ Set the release version
80
+ -----------------------
81
+
82
+ Check the ``pyproject.toml `` file and set the release version if needed::
83
+
84
+ $ gvim pyproject.toml
85
+
86
+
87
+ Check the ``pavement.py `` and ``doc/source/release.rst `` files
88
+ --------------------------------------------------------------
89
+
90
+ Check that the ``pavement.py `` file points to the correct release notes. It should
91
+ have been updated after the last release, but if not, fix it now. Also make
92
+ sure that the notes have an entry in the ``release.rst `` file::
93
+
94
+ $ gvim pavement.py doc/source/release.rst
75
95
76
96
77
97
Generate the changelog
78
98
----------------------
79
99
80
100
The changelog is generated using the changelog tool::
81
101
82
- $ spin changelog $GITHUB v1.20 .0..maintenance/1.21. x > doc/changelog/1.21 .0-changelog.rst
102
+ $ spin changelog $GITHUB v2.0 .0..maintenance/2.1. x > doc/changelog/2.1 .0-changelog.rst
83
103
84
104
where ``GITHUB `` contains your GitHub access token. The text will need to be
85
105
checked for non-standard contributor names and dependabot entries removed. It
@@ -95,36 +115,20 @@ Finish the release notes
95
115
------------------------
96
116
97
117
If there are any release notes snippets in ``doc/release/upcoming_changes/ ``,
98
- run ``spin docs `` to build the docs, incorporate the contents of the generated
99
- ``doc/source/release/notes-towncrier.rst `` file into the release notes file
100
- (e.g., ``doc/source/release/2.3.4-notes.rst ``), and delete the now-processed
101
- snippets in ``doc/release/upcoming_changes/ ``. This is safe to do multiple
102
- times during a release cycle.
103
-
104
- The generated release note will always need some fixups, the introduction will
105
- need to be written, and significant changes should be called out. For patch
106
- releases the changelog text may also be appended, but not for the initial
107
- release as it is too long. Check previous release notes to see how this is
108
- done.
109
-
110
-
111
- Set the release version
112
- -----------------------
113
-
114
- Check the ``pyproject.toml `` and ``pyproject.toml.setuppy `` files and set the
115
- release version if needed::
116
-
117
- $ gvim pyproject.toml pyproject.toml.setuppy
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::
126
-
127
- $ gvim pavement.py doc/source/release.rst
118
+ run ``towncrier ``, which will incorporate the snippets into the
119
+ ``doc/source/release/notes-towncrier.rst `` file, add it to the index, and
120
+ delete the snippets::
121
+
122
+ $ towncrier
123
+ $ gvim doc/source/release/notes-towncrier.rst doc/source/release/2.1.0-notes.rst
124
+
125
+ Once the ``notes-towncrier `` contents has been incorporated into
126
+ the release note it should be cleared and the
127
+ ``.. include:: notes-towncrier.rst `` directive removed from the ``2.1.0-notes.rst ``.
128
+ The notes will always need some fixups, the introduction will need to be
129
+ written, and significant changes should be called out. For patch releases the
130
+ changelog text may also be appended, but not for the initial release as it is
131
+ too long. Check previous release notes to see how this is done.
128
132
129
133
130
134
Release walkthrough
@@ -143,8 +147,8 @@ isn't already present.
143
147
Checkout the branch for the release, make sure it is up to date, and clean the
144
148
repository::
145
149
146
- $ git checkout maintenance/1.21 .x
147
- $ git pull upstream maintenance/1.21 .x
150
+ $ git checkout maintenance/2.1 .x
151
+ $ git pull upstream maintenance/2.1 .x
148
152
$ git submodule update
149
153
$ git clean -xdfq
150
154
@@ -155,13 +159,13 @@ Sanity check::
155
159
Tag the release and push the tag. This requires write permission for the numpy
156
160
repository::
157
161
158
- $ git tag -a -s v1.21 .0 -m"NumPy 1.21 .0 release"
159
- $ git push upstream v1.21 .0
162
+ $ git tag -a -s v2.1 .0 -m"NumPy 2.1 .0 release"
163
+ $ git push upstream v2.1 .0
160
164
161
165
If you need to delete the tag due to error::
162
166
163
- $ git tag -d v1.21 .0
164
- $ git push --delete upstream v1.21 .0
167
+ $ git tag -d v2.1 .0
168
+ $ git push --delete upstream v2.1 .0
165
169
166
170
167
171
2. Build wheels
@@ -187,7 +191,7 @@ If a wheel build fails for unrelated reasons, you can rerun it individually:
187
191
the build you want to rerun. On the left there is a list of wheel builds,
188
192
select the one you want to rerun and on the resulting page hit the
189
193
counterclockwise arrows button.
190
- - On cirrus we haven't figured it out .
194
+ - On cirrus, log into cirrisci, look for the v2.1.0 tag and rerun the failed jobs .
191
195
192
196
.. _`staging repository` : https://anaconda.org/multibuild-wheels-staging/numpy/files
193
197
.. _`Wheel builder` : https://github.com/numpy/numpy/actions/workflows/wheels.yml
@@ -201,7 +205,7 @@ Anaconda staging directory using the ``tools/download-wheels.py`` script::
201
205
202
206
$ cd ../numpy
203
207
$ mkdir -p release/installers
204
- $ python3 tools/download-wheels.py 1.21 .0
208
+ $ python3 tools/download-wheels.py 2.1 .0
205
209
206
210
207
211
4. Generate the README files
@@ -221,7 +225,7 @@ after recent PyPI changes, version ``3.4.1`` was used here::
221
225
222
226
$ cd ../numpy
223
227
$ twine upload release/installers/*.whl
224
- $ twine upload release/installers/numpy-1.21.0.tar .gz # Upload last.
228
+ $ twine upload release/installers/* .gz # Upload last.
225
229
226
230
If one of the commands breaks in the middle, you may need to selectively upload
227
231
the remaining files because PyPI does not allow the same file to be uploaded
@@ -235,18 +239,19 @@ chosen the zip archive.
235
239
6. Upload files to GitHub
236
240
-------------------------
237
241
238
- Go to `<https://github.com/numpy/numpy/releases >`_, there should be a ``v1.21.0
239
- tag ``, click on it and hit the edit button for that tag. There are two ways to
240
- add files, using an editable text window and as binary uploads. Start by
241
- editing the ``release/README.md `` that is translated from the rst version using
242
- pandoc. Things that will need fixing: PR lines from the changelog, if included,
243
- are wrapped and need unwrapping, links should be changed to monospaced text.
244
- Then copy the contents to the clipboard and paste them into the text window. It
245
- may take several tries to get it look right. Then
246
-
247
- - Upload ``release/installers/numpy-1.21.0.tar.gz `` as a binary file.
242
+ Go to `<https://github.com/numpy/numpy/releases >`_, there should be a ``v2.1.0
243
+ tag ``, click on it and hit the edit button for that tag and update the title to
244
+ 'v2.1.0 (<date>). There are two ways to add files, using an editable text
245
+ window and as binary uploads. Start by editing the ``release/README.md `` that
246
+ is translated from the rst version using pandoc. Things that will need fixing:
247
+ PR lines from the changelog, if included, are wrapped and need unwrapping,
248
+ links should be changed to monospaced text. Then copy the contents to the
249
+ clipboard and paste them into the text window. It may take several tries to get
250
+ it look right. Then
251
+
252
+ - Upload ``release/installers/numpy-2.1.0.tar.gz `` as a binary file.
248
253
- Upload ``release/README.rst `` as a binary file.
249
- - Upload ``doc/changelog/1.21 .0-changelog.rst `` as a binary file.
254
+ - Upload ``doc/changelog/2.1 .0-changelog.rst `` as a binary file.
250
255
- Check the pre-release button if this is a pre-releases.
251
256
- Hit the ``{Publish,Update} release `` button at the bottom.
252
257
@@ -261,7 +266,7 @@ and most patch releases. ``make merge-doc`` clones the ``numpy/doc`` repo into
261
266
``doc/build/merge `` and updates it with the new documentation::
262
267
263
268
$ git clean -xdfq
264
- $ git co v1.21 .0
269
+ $ git co v2.1 .0
265
270
$ rm -rf doc/build # want version to be current
266
271
$ python -m spin docs merge-doc --build
267
272
$ pushd doc/build/merge
@@ -288,12 +293,12 @@ from ``numpy.org``::
288
293
289
294
Update the stable link and update::
290
295
291
- $ ln -sfn 1.21 stable
296
+ $ ln -sfn 2.1 stable
292
297
$ ls -l # check the link
293
298
294
299
Once everything seems satisfactory, update, commit and upload the changes::
295
300
296
- $ git commit -a -m"Add documentation for v1.21 .0"
301
+ $ git commit -a -m"Add documentation for v2.1 .0"
297
302
$ git push [email protected] :numpy/doc
298
303
$ popd
299
304
@@ -304,22 +309,22 @@ Once everything seems satisfactory, update, commit and upload the changes::
304
309
Create release notes for next release and edit them to set the version. These
305
310
notes will be a skeleton and have little content::
306
311
307
- $ cp doc/source/release/template.rst doc/source/release/1.21 .1-notes.rst
308
- $ gvim doc/source/release/1.21 .1-notes.rst
309
- $ git add doc/source/release/1.21 .1-notes.rst
312
+ $ cp doc/source/release/template.rst doc/source/release/2.1 .1-notes.rst
313
+ $ gvim doc/source/release/2.1 .1-notes.rst
314
+ $ git add doc/source/release/2.1 .1-notes.rst
310
315
311
316
Add new release notes to the documentation release list and update the
312
317
``RELEASE_NOTES `` variable in ``pavement.py ``::
313
318
314
319
$ gvim doc/source/release.rst pavement.py
315
320
316
- Update the ``version `` in ``pyproject.toml `` and `` pyproject.toml.setuppy `` ::
321
+ Update the ``version `` in ``pyproject.toml ``::
317
322
318
- $ gvim pyproject.toml pyproject.toml.setuppy
323
+ $ gvim pyproject.toml
319
324
320
325
Commit the result::
321
326
322
- $ git commit -a -m"MAINT: prepare 1.21 .x for further development"
327
+ $ git commit -a -m"MAINT: prepare 2.1 .x for further development"
323
328
$ git push origin HEAD
324
329
325
330
Go to GitHub and make a PR. It should be merged quickly.
@@ -333,7 +338,7 @@ This assumes that you have forked `<https://github.com/numpy/numpy.org>`_::
333
338
$ cd ../numpy.org
334
339
$ git checkout main
335
340
$ git pull upstream main
336
- $ git checkout -b announce-numpy-1.21 .0
341
+ $ git checkout -b announce-numpy-2.1 .0
337
342
$ gvim content/en/news.md
338
343
339
344
- For all releases, go to the bottom of the page and add a one line link. Look
@@ -343,7 +348,7 @@ This assumes that you have forked `<https://github.com/numpy/numpy.org>`_::
343
348
344
349
commit and push::
345
350
346
- $ git commit -a -m"announce the NumPy 1.21 .0 release"
351
+ $ git commit -a -m"announce the NumPy 2.1 .0 release"
347
352
$ git push origin HEAD
348
353
349
354
Go to GitHub and make a PR.
@@ -364,13 +369,13 @@ BCC so that replies will not be sent to that list.
364
369
365
370
Checkout main and forward port the documentation changes::
366
371
367
- $ git checkout -b post-1.21 .0-release-update
368
- $ git checkout maintenance/1.21. x doc/source/release/1.21 .0-notes.rst
369
- $ git checkout maintenance/1.21. x doc/changelog/1.21 .0-changelog.rst
370
- $ git checkout maintenance/1.21 .x .mailmap # only if updated for release.
372
+ $ git checkout -b post-2.1 .0-release-update
373
+ $ git checkout maintenance/2.1. x doc/source/release/2.1 .0-notes.rst
374
+ $ git checkout maintenance/2.1. x doc/changelog/2.1 .0-changelog.rst
375
+ $ git checkout maintenance/2.1 .x .mailmap # only if updated for release.
371
376
$ gvim doc/source/release.rst # Add link to new notes
372
377
$ git status # check status before commit
373
- $ git commit -a -m"MAINT: Update main after 1.21 .0 release."
378
+ $ git commit -a -m"MAINT: Update main after 2.1 .0 release."
374
379
$ git push origin HEAD
375
380
376
381
Go to GitHub and make a PR.
0 commit comments