Skip to content

Commit

Permalink
Update release guide (#5274)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas authored May 13, 2021
1 parent 751f76a commit 1305d9b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 42 deletions.
60 changes: 19 additions & 41 deletions HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to issue an xarray release in 20 easy steps
# How to issue an xarray release in 16 easy steps

Time required: about an hour.

Expand Down Expand Up @@ -57,51 +57,30 @@ upstream https://github.com/pydata/xarray (push)
pytest
```
9. Check that the ReadTheDocs build is passing.
10. Tag the release:
```sh
git tag -a v{0.X.Y} -m 'v{0.X.Y}'
```
11. Ensure the dependencies for building are installed:
```sh
pip install setuptools-scm twine wheel
```
12. Build source and binary wheels for PyPI:
```sh
git clean -xdf # This removes any untracked files!
git restore -SW . # This removes any tracked changes!
python setup.py bdist_wheel sdist
```
13. Use twine to check the package build:
```sh
twine check dist/xarray-{0.X.Y}*
```
14. Use twine to register and upload the release on PyPI. Be careful, you can't
take this back!
```sh
twine upload dist/xarray-{0.X.Y}*
```
You will need to be listed as a package owner at
<https://pypi.python.org/pypi/xarray> for this to work.
15. Push your changes to master:
```sh
git push upstream master
git push upstream --tags
```
16. Update the stable branch (used by ReadTheDocs) and switch back to master:
10. Issue the release on GitHub. Click on "Draft a new release" at
<https://github.com/pydata/xarray/releases>. Type in the version number (with a "v")
and paste the release summary in the notes.
11. This should automatically trigger an upload of the new build to PyPI via GitHub Actions.
Check this has run [here](https://github.com/pydata/xarray/actions/workflows/pypi-release.yaml),
and that the version number you expect is displayed [on PyPI](https://pypi.org/project/xarray/)
12. Update the stable branch (used by ReadTheDocs) and switch back to master:
```sh
git switch stable
git rebase master
git push --force upstream stable
git switch master
```
You may need to first fetch it with `git fetch upstream`,
and check out a local version with `git checkout -b stable upstream/stable`.
It's OK to force push to `stable` if necessary. (We also update the stable
branch with `git cherry-pick` for documentation only fixes that apply the
current released version.)
17. Add a section for the next release {0.X.Y+1} to doc/whats-new.rst:
13. Add a section for the next release {0.X.Y+1} to doc/whats-new.rst:
```rst
.. _whats-new.{0.X.Y+1}:
.. _whats-new.0.X.Y+1:
v{0.X.Y+1} (unreleased)
v0.X.Y+1 (unreleased)
---------------------
New Features
Expand All @@ -128,19 +107,17 @@ upstream https://github.com/pydata/xarray (push)
~~~~~~~~~~~~~~~~
```
18. Commit your changes and push to master again:
14. Commit your changes and push to master again:
```sh
git commit -am 'New whatsnew section'
git push upstream master
```
You're done pushing to master!
19. Issue the release on GitHub. Click on "Draft a new release" at
<https://github.com/pydata/xarray/releases>. Type in the version number
and paste the release summary in the notes.
20. Update the docs. Login to <https://readthedocs.org/projects/xray/versions/>
15. Update the docs. Login to <https://readthedocs.org/projects/xray/versions/>
and switch your new release tag (at the bottom) from "Inactive" to "Active".
It should now build automatically.
21. Issue the release announcement to mailing lists & Twitter. For bug fix releases, I
16. Issue the release announcement to mailing lists & Twitter. For bug fix releases, I
usually only email xarray@googlegroups.com. For major/feature releases, I will email a broader
list (no more than once every 3-6 months):
- pydata@googlegroups.com
Expand All @@ -151,6 +128,7 @@ upstream https://github.com/pydata/xarray (push)
Google search will turn up examples of prior release announcements (look for
"ANN xarray").
Some of these groups require you to be subscribed in order to email them.
<!-- markdownlint-enable MD013 -->
Expand Down
6 changes: 5 additions & 1 deletion doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ Internal Changes
- Explicit indexes refactor: add an ``xarray.Index`` base class and
``Dataset.xindexes`` / ``DataArray.xindexes`` properties. Also rename
``PandasIndexAdapter`` to ``PandasIndex``, which now inherits from
``xarray.Index`` (:pull:`5102`). By `Benoit Bovy <https://github.com/benbovy>`_.
``xarray.Index`` (:pull:`5102`).
By `Benoit Bovy <https://github.com/benbovy>`_.
- Updated the release guide for developers. Now accounts for actions that are automated via github
actions. (:pull:`5274`).
By `Tom Nicholas <https://github.com/TomNicholas>`_.

.. _whats-new.0.18.0:

Expand Down

0 comments on commit 1305d9b

Please sign in to comment.