summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-09-13 11:32:33 -0600
committerGitHub <noreply@github.com>2021-09-13 11:32:33 -0600
commitcb4f154f8b8862c65c4a4febaebfd0a9c3d52203 (patch)
treeefe185efe1ac9370a30089eb2072144022a6f6dc
parentb892ed2c7fa27b2e0d73c12d12ace4b4d4e12897 (diff)
parent4486c2d99203e93bc60b75a5e678da2ca8f1bb0a (diff)
downloadnumpy-cb4f154f8b8862c65c4a4febaebfd0a9c3d52203.tar.gz
Merge pull request #19864 from charris/update-release-walkthrough
DOC: Update RELEASE_WALKTHROUGH
-rw-r--r--doc/RELEASE_WALKTHROUGH.rst.txt206
1 files changed, 105 insertions, 101 deletions
diff --git a/doc/RELEASE_WALKTHROUGH.rst.txt b/doc/RELEASE_WALKTHROUGH.rst.txt
index 6febd554f..155f77c25 100644
--- a/doc/RELEASE_WALKTHROUGH.rst.txt
+++ b/doc/RELEASE_WALKTHROUGH.rst.txt
@@ -1,7 +1,7 @@
-This file contains a walkthrough of the NumPy 1.19.0 release on Linux, modified
+This file contains a walkthrough of the NumPy 1.21.0 release on Linux, modified
for building on azure and uploading to anaconda.org
The commands can be copied into the command line, but be sure to
-replace 1.19.0 by the correct version.
+replace 1.21.0 by the correct version.
This should be read together with the general directions in `releasing`.
@@ -13,46 +13,72 @@ Backport Pull Requests
----------------------
Changes that have been marked for this release must be backported to the
-maintenance/1.19.x branch.
+maintenance/1.21.x branch.
Update Release documentation
----------------------------
-The file ``doc/changelog/1.19.0-changelog.rst`` should be updated to reflect
-the final list of changes and contributors. This text can be generated by::
+Four documents usually need to be updated or created before making a release:
- $ python tools/changelog.py $GITHUB v1.18.0..maintenance/1.19.x > doc/changelog/1.19.0-changelog.rst
+- The changelog
+- The release-notes
+- The ``.mailmap`` file
+- The ``doc/source/release.rst`` file
-where ``GITHUB`` contains your github access token. This text may also be
-appended to ``doc/release/1.19.0-notes.rst`` for patch release, though not for
-new releases like ``1.19.0``, as the changelogs for ``*.0`` releases tend to be
-excessively long. The ``doc/source/release.rst`` file should also be updated
-with a link to the new release notes. These changes should be committed to the
-maintenance branch, and later will be forward ported to main. The changelog
-should be reviewed for name duplicates or short names and the ``.mailmap`` file
-updated if needed.
+These changes should be made as an ordinary PR against the maintenance branch.
+After release all files except ``doc/source/release.rst`` will need to be
+forward ported to the main branch.
+Generate the changelog
+~~~~~~~~~~~~~~~~~~~~~~
-Finish the Release Note
------------------------
+The changelog is generated using the changelog tool:
-.. note:
+ $ python tools/changelog.py $GITHUB v1.20.0..maintenance/1.21.x > doc/changelog/1.21.0-changelog.rst
- This has changed now that we use ``towncrier``. See the instructions for
- creating the release note in ``doc/release/upcoming_changes/README.rst``.
+where ``GITHUB`` contains your GitHub access token. The text will need to be
+checked for non-standard contributor names and dependabot entries removed. It
+is also a good idea to remove any links that may be present in the PR titles
+as they don't translate well to *.md, replace them with monospaced text. The
+non-standard contributor names should be fixed by updating the ``.mailmap``
+file, which is a lot of work. It is best to make several trial runs before
+reaching this point and ping the malefactors using a GitHub issue to get the
+needed information.
-Fill out the release note ``doc/release/1.19.0-notes.rst`` calling out
-significant changes.
+Finish the release notes
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+If this is the first release in a series the release note is generated, see
+ the release note in ``doc/release/upcoming_changes/README.rst`` to see how to
+do this. Generating the release notes will also delete all the news
+fragment files in ``doc/release/upcoming_changes/``.
+
+The generated release note will always need some fixups, the introduction will
+need to be written, and significant changes should be called out. For patch
+releases the changelog text may also be appended, but not for the initial
+release as it is too long. Check previous release notes to see how this is
+done. Note that the ``:orphan:`` markup at the top, if present, will need
+changing to ``.. currentmodule:: numpy`` and the ``doc/source/release.rst``
+index file will need updating.
+
+Check the pavement.py file
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Check that the pavement.py file points to the correct release notes. It should
+have been updated after the last release, but if not, fix it now::
+
+ $gvim pavement.py
Release Walkthrough
====================
Note that in the code snippets below, ``upstream`` refers to the root repository on
-github and ``origin`` to a fork in your personal account. You may need to make adjustments
-if you have not forked the repository but simply cloned it locally. You can
-also edit ``.git/config`` and add ``upstream`` if it isn't already present.
+GitHub and ``origin`` to its fork in your personal GitHub repositories. You may
+need to make adjustments if you have not forked the repository but simply
+cloned it locally. You can also edit ``.git/config`` and add ``upstream`` if it
+isn't already present.
Prepare the release commit
--------------------------
@@ -60,24 +86,20 @@ Prepare the release commit
Checkout the branch for the release, make sure it is up to date, and clean the
repository::
- $ git checkout maintenance/1.19.x
- $ git pull upstream maintenance/1.19.x
+ $ git checkout maintenance/1.21.x
+ $ git pull upstream maintenance/1.21.x
$ git submodule update
$ git clean -xdfq
-Edit pavement.py and setup.py as detailed in HOWTO_RELEASE::
-
- $ gvim pavement.py setup.py # Generally only setup.py needs updating
- $ git commit -a -m"REL: NumPy 1.19.0 release."
-
Sanity check::
$ python3 runtests.py -m "full"
-Push this release directly onto the end of the maintenance branch. This
-requires write permission to the numpy repository::
+Tag the release and push the tag. This requires write permission for the numpy
+repository::
- $ git push upstream HEAD
+ $ git tag -a -s v1.21.0 -m"NumPy 1.21.0 release"
+ $ git push upstream v1.21.0
Build source releases
@@ -87,7 +109,6 @@ Paver is used to build the source releases. It will create the ``release`` and
``release/installers`` directories and put the ``*.zip`` and ``*.tar.gz``
source releases in the latter. ::
- $ python3 -m cython --version # check for correct cython version
$ paver sdist # sdist will do a git clean -xdfq, so we omit that
@@ -104,17 +125,18 @@ exists skip this::
$ cd ../numpy-wheels
$ git checkout main
$ git pull upstream main
- $ git branch v1.19.x
+ $ git branch v1.21.x
Checkout the new branch and edit the ``azure-pipelines.yml`` and
``.travis.yml`` files to make sure they have the correct version, and put in
-the commit hash for the ``REL`` commit created above for ``BUILD_COMMIT``. The
-``azure/posix.yml`` and ``.travis.yml`` files may also need the Cython versions
-updated to keep up with Python releases, but generally just do::
-
- $ git checkout v1.19.x
- $ gvim azure-pipelines .travis.yml
- $ git commit -a -m"NumPy 1.19.0 release."
+the commit hash for the ``REL`` commit created above for ``BUILD_COMMIT``
+variable. The ``azure/posix.yml`` and ``.travis.yml`` files may also need the
+Cython versions updated to keep up with Python releases, but generally just
+do::
+
+ $ git checkout v1.21.x
+ $ gvim azure-pipelines.yml .travis.yml
+ $ git commit -a -m"NumPy 1.21.0 release."
$ git push upstream HEAD
Now wait. If you get nervous at the amount of time taken -- the builds can take
@@ -134,7 +156,7 @@ When the wheels have all been successfully built and staged, download them from
Anaconda staging directory using the ``tools/download-wheels.py`` script::
$ cd ../numpy
- $ python3 tools/download-wheels.py 1.19.0
+ $ python3 tools/download-wheels.py 1.21.0
Generate the README files
@@ -146,47 +168,24 @@ file is updated for continued development::
$ paver write_release
-Tag the release
----------------
-
-Once the wheels have been built and downloaded without errors tag the ``REL`` commit, signing
-it with your gpg key::
-
- $ git tag -s -m"NumPy 1.19.0 release" v1.19.0
-
-You should upload your public gpg key to github, so that the tag will appear
-"verified" there.
-
-Check that the files in ``release/installers`` have the correct versions, then
-push the tag upstream::
-
- $ git push upstream v1.19.0
-
-We wait until this point to push the tag because it is public and should not
-be changed after it has been pushed.
-
-
Reset the maintenance branch into a development state
-----------------------------------------------------
-Add another ``REL`` commit to the numpy maintenance branch, which resets the
-``ISREALEASED`` flag to ``False`` and increments the version counter::
-
- $ gvim pavement.py setup.py
-
-Create release notes for next release and edit them to set the version::
+Create release notes for next release and edit them to set the version. These
+notes will be a skeleton and have little content::
- $ cp doc/source/release/template.rst doc/source/release/1.19.1-notes.rst
- $ gvim doc/source/release/1.19.1-notes.rst
- $ git add doc/source/release/1.19.1-notes.rst
+ $ cp doc/source/release/template.rst doc/source/release/1.21.1-notes.rst
+ $ gvim doc/source/release/1.21.1-notes.rst
+ $ git add doc/source/release/1.21.1-notes.rst
-Add new release notes to the documentation release list::
+Add new release notes to the documentation release list and update the
+``RELEASE_NOTES`` variable in ``pavement.py``.
- $ gvim doc/source/release.rst
+ $ gvim doc/source/release.rst pavement.py
Commit the result::
- $ git commit -a -m"REL: prepare 1.19.x for further development"
+ $ git commit -a -m"REL: prepare 1.21.x for further development"
$ git push upstream HEAD
@@ -194,33 +193,37 @@ Upload to PyPI
--------------
Upload to PyPI using ``twine``. A recent version of ``twine`` of is needed
-after recent PyPI changes, version ``3.1.1`` was used here::
+after recent PyPI changes, version ``3.4.1`` was used here::
$ cd ../numpy
$ twine upload release/installers/*.whl
- $ twine upload release/installers/numpy-1.19.0.zip # Upload last.
+ $ twine upload release/installers/numpy-1.21.0.zip # Upload last.
If one of the commands breaks in the middle, you may need to selectively upload
the remaining files because PyPI does not allow the same file to be uploaded
twice. The source file should be uploaded last to avoid synchronization
problems that might occur if pip users access the files while this is in
-process. Note that PyPI only allows a single source distribution, here we have
+process, causing pip to build from source rather than downloading a binary
+wheel. PyPI only allows a single source distribution, here we have
chosen the zip archive.
Upload files to github
----------------------
-Go to `<https://github.com/numpy/numpy/releases>`_, there should be a ``v1.19.0
+Go to `<https://github.com/numpy/numpy/releases>`_, there should be a ``v1.21.0
tag``, click on it and hit the edit button for that tag. There are two ways to
-add files, using an editable text window and as binary uploads. Cut and paste
-the ``release/README.md`` file contents into the text window. You will probably
-need to make some edits to get it to look right. Then
-
-- Upload ``release/installers/numpy-1.19.0.tar.gz`` as a binary file.
-- Upload ``release/installers/numpy-1.19.0.zip`` as a binary file.
+add files, using an editable text window and as binary uploads. Start by
+editing the ``release/README.md`` that is translated from the rst version using
+pandoc. Things that will need fixing: PR lines from the changelog, if included,
+are wrapped and need unwrapping, links should be changed to monospaced text.
+Then copy the contents to the clipboard and paste them into the text window. It
+may take several tries to get it look right. Then
+
+- Upload ``release/installers/numpy-1.21.0.tar.gz`` as a binary file.
+- Upload ``release/installers/numpy-1.21.0.zip`` as a binary file.
- Upload ``release/README.rst`` as a binary file.
-- Upload ``doc/changelog/1.19.0-changelog.rst`` as a binary file.
+- Upload ``doc/changelog/1.21.0-changelog.rst`` as a binary file.
- Check the pre-release button if this is a pre-releases.
- Hit the ``{Publish,Update} release`` button at the bottom.
@@ -228,9 +231,11 @@ need to make some edits to get it to look right. Then
Upload documents to numpy.org
-----------------------------
-This step is only needed for final releases and can be skipped for
-pre-releases. ``make merge-doc`` clones the ``numpy/doc`` repo into
+This step is only needed for final releases and can be skipped for pre-releases
+and most patch releases. ``make merge-doc`` clones the ``numpy/doc`` repo into
``doc/build/merge`` and updates it with the new documentation::
+Note that if you have a `.local` numpy install, you should either remove it or
+install the current version for the docs to pick up the correct NumPy version.
$ pushd doc
$ make dist
@@ -245,7 +250,7 @@ If the release series is a new one, you will need to add a new section to the
Otherwise, only the ``zip`` and ``pdf`` links should be updated with the
new tag name::
- $ gvim doc/build/merge/index.html +/'tag v1.19'
+ $ gvim doc/build/merge/index.html +/'tag v1.21'
You can "test run" the new documentation in a browser to make sure the links
work::
@@ -254,12 +259,12 @@ work::
Update the stable link::
- $ ln -sfn 1.19 stable
+ $ ln -sfn 1.21 stable
Once everything seems satisfactory, commit and upload the changes::
$ pushd doc/build/merge
- $ git commit -am"Add documentation for v1.19.0"
+ $ git commit -a -m"Add documentation for v1.21.0"
$ git push
$ popd
@@ -271,14 +276,13 @@ This assumes that you have forked `<https://github.com/scipy/scipy.org>`_::
$ cd ../scipy.org
$ git checkout master
$ git pull upstream master
- $ git checkout -b numpy-1.19.0
+ $ git checkout -b numpy-1.21.0
$ gvim www/index.rst # edit the News section
$ git commit -a
$ git push origin HEAD
Now go to your fork and make a pull request for the branch.
-
Announce to mailing lists
-------------------------
@@ -294,14 +298,14 @@ Post-Release Tasks
Checkout main and forward port the documentation changes::
- $ git checkout -b post-1.19.0-release-update
- $ git checkout maintenance/1.19.x doc/source/release/1.19.0-notes.rst
- $ git checkout maintenance/1.19.x doc/changelog/1.19.0-changelog.rst
- $ git checkout maintenance/1.19.x .mailmap # only if updated for release.
+ $ git checkout -b post-1.21.0-release-update
+ $ git checkout maintenance/1.21.x doc/source/release/1.21.0-notes.rst
+ $ git checkout maintenance/1.21.x doc/changelog/1.21.0-changelog.rst
+ $ git checkout maintenance/1.21.x .mailmap # only if updated for release.
$ gvim doc/source/release.rst # Add link to new notes
- $ git add doc/changelog/1.19.0-changelog.rst doc/source/release/1.19.0-notes.rst
+ $ git add doc/changelog/1.21.0-changelog.rst doc/source/release/1.21.0-notes.rst
$ git status # check status before commit
- $ git commit -a -m"REL: Update main after 1.19.0 release."
+ $ git commit -a -m"REL: Update main after 1.21.0 release."
$ git push origin HEAD
-Go to github and make a PR.
+Go to GitHub and make a PR.