Skip to content

Commit 0753a86

Browse files
committed
DOC: Update the RELEASE_WALKTHROUGH.rst file.
[skip cirrus] [skip azp] [skip actions]
1 parent e6e2948 commit 0753a86

File tree

1 file changed

+83
-78
lines changed

1 file changed

+83
-78
lines changed

doc/RELEASE_WALKTHROUGH.rst

Lines changed: 83 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
22
building with GitHub Actions and cibuildwheels and uploading to the
33
`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
55
by the correct version. This should be read together with the
66
:ref:`general release guide <prepare_release>`.
77

@@ -44,42 +44,62 @@ Backport pull requests
4444
----------------------
4545

4646
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.
4854

4955

5056
Make a release PR
5157
=================
5258

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:
5460

5561
- The changelog
5662
- The release-notes
5763
- The ``.mailmap`` file
5864
- The ``pyproject.toml`` file
59-
- The ``pyproject.toml.setuppy`` file # 1.26.x only
6065

6166
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
6368
wheels build. Other small, miscellaneous fixes may be part of this PR. The
6469
commit message might be something like::
6570

66-
REL: Prepare for the NumPy 1.20.0 release
71+
REL: Prepare for the NumPy 2.1.0 release [wheel build]
6772

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.
7075
- Update .mailmap.
7176
- Update pyproject.toml
72-
- Update pyproject.toml.setuppy
7377

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
7595

7696

7797
Generate the changelog
7898
----------------------
7999

80100
The changelog is generated using the changelog tool::
81101

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
83103

84104
where ``GITHUB`` contains your GitHub access token. The text will need to be
85105
checked for non-standard contributor names and dependabot entries removed. It
@@ -95,36 +115,20 @@ Finish the release notes
95115
------------------------
96116

97117
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.
128132

129133

130134
Release walkthrough
@@ -143,8 +147,8 @@ isn't already present.
143147
Checkout the branch for the release, make sure it is up to date, and clean the
144148
repository::
145149

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
148152
$ git submodule update
149153
$ git clean -xdfq
150154

@@ -155,13 +159,13 @@ Sanity check::
155159
Tag the release and push the tag. This requires write permission for the numpy
156160
repository::
157161

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
160164

161165
If you need to delete the tag due to error::
162166

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
165169

166170

167171
2. Build wheels
@@ -187,7 +191,7 @@ If a wheel build fails for unrelated reasons, you can rerun it individually:
187191
the build you want to rerun. On the left there is a list of wheel builds,
188192
select the one you want to rerun and on the resulting page hit the
189193
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.
191195

192196
.. _`staging repository`: https://anaconda.org/multibuild-wheels-staging/numpy/files
193197
.. _`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::
201205

202206
$ cd ../numpy
203207
$ mkdir -p release/installers
204-
$ python3 tools/download-wheels.py 1.21.0
208+
$ python3 tools/download-wheels.py 2.1.0
205209

206210

207211
4. Generate the README files
@@ -221,7 +225,7 @@ after recent PyPI changes, version ``3.4.1`` was used here::
221225

222226
$ cd ../numpy
223227
$ 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.
225229

226230
If one of the commands breaks in the middle, you may need to selectively upload
227231
the remaining files because PyPI does not allow the same file to be uploaded
@@ -235,18 +239,19 @@ chosen the zip archive.
235239
6. Upload files to GitHub
236240
-------------------------
237241

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.
248253
- 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.
250255
- Check the pre-release button if this is a pre-releases.
251256
- Hit the ``{Publish,Update} release`` button at the bottom.
252257

@@ -261,7 +266,7 @@ and most patch releases. ``make merge-doc`` clones the ``numpy/doc`` repo into
261266
``doc/build/merge`` and updates it with the new documentation::
262267

263268
$ git clean -xdfq
264-
$ git co v1.21.0
269+
$ git co v2.1.0
265270
$ rm -rf doc/build # want version to be current
266271
$ python -m spin docs merge-doc --build
267272
$ pushd doc/build/merge
@@ -288,12 +293,12 @@ from ``numpy.org``::
288293

289294
Update the stable link and update::
290295

291-
$ ln -sfn 1.21 stable
296+
$ ln -sfn 2.1 stable
292297
$ ls -l # check the link
293298

294299
Once everything seems satisfactory, update, commit and upload the changes::
295300

296-
$ git commit -a -m"Add documentation for v1.21.0"
301+
$ git commit -a -m"Add documentation for v2.1.0"
297302
$ git push [email protected]:numpy/doc
298303
$ popd
299304

@@ -304,22 +309,22 @@ Once everything seems satisfactory, update, commit and upload the changes::
304309
Create release notes for next release and edit them to set the version. These
305310
notes will be a skeleton and have little content::
306311

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
310315

311316
Add new release notes to the documentation release list and update the
312317
``RELEASE_NOTES`` variable in ``pavement.py``::
313318

314319
$ gvim doc/source/release.rst pavement.py
315320

316-
Update the ``version`` in ``pyproject.toml`` and ``pyproject.toml.setuppy``::
321+
Update the ``version`` in ``pyproject.toml``::
317322

318-
$ gvim pyproject.toml pyproject.toml.setuppy
323+
$ gvim pyproject.toml
319324

320325
Commit the result::
321326

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"
323328
$ git push origin HEAD
324329

325330
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>`_::
333338
$ cd ../numpy.org
334339
$ git checkout main
335340
$ git pull upstream main
336-
$ git checkout -b announce-numpy-1.21.0
341+
$ git checkout -b announce-numpy-2.1.0
337342
$ gvim content/en/news.md
338343

339344
- 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>`_::
343348

344349
commit and push::
345350

346-
$ git commit -a -m"announce the NumPy 1.21.0 release"
351+
$ git commit -a -m"announce the NumPy 2.1.0 release"
347352
$ git push origin HEAD
348353

349354
Go to GitHub and make a PR.
@@ -364,13 +369,13 @@ BCC so that replies will not be sent to that list.
364369

365370
Checkout main and forward port the documentation changes::
366371

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.
371376
$ gvim doc/source/release.rst # Add link to new notes
372377
$ 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."
374379
$ git push origin HEAD
375380

376381
Go to GitHub and make a PR.

0 commit comments

Comments
 (0)