Skip to content

Commit 4e89331

Browse files
authored
Add release summary, some touch-ups (#4217)
* Add release summary, some touch-ups * Add Twitter * Touch up whatsnew entry * @keewis suggestions
1 parent 0b706a4 commit 4e89331

File tree

2 files changed

+52
-38
lines changed

2 files changed

+52
-38
lines changed

HOW_TO_RELEASE.md

+49-35
Original file line numberDiff line numberDiff line change
@@ -2,78 +2,92 @@
22

33
Time required: about an hour.
44

5+
These instructions assume that `upstream` refers to the main repository:
6+
```
7+
$ git remote -v
8+
{...}
9+
upstream https://github.com/pydata/xarray (fetch)
10+
upstream https://github.com/pydata/xarray (push)
11+
```
12+
513
1. Ensure your master branch is synced to upstream:
6-
```
7-
git pull upstream master
8-
```
14+
```sh
15+
git pull upstream master
16+
```
917
2. Get a list of contributors with:
10-
```
18+
```sh
1119
git log "$(git tag --sort="v:refname" | sed -n 'x;$p').." --format=%aN | sort -u | perl -pe 's/\n/$1, /'
1220
```
13-
or by substituting the _previous_ release in:
14-
```
15-
git log v0.X.Y-1.. --format=%aN | sort -u | perl -pe 's/\n/$1, /'
21+
or by substituting the _previous_ release in {0.X.Y-1}:
22+
```sh
23+
git log v{0.X.Y-1}.. --format=%aN | sort -u | perl -pe 's/\n/$1, /'
1624
```
1725
Add these into `whats-new.rst` somewhere :)
26+
2. Write a release summary: ~50 words describing the high level features. This
27+
will be used in the release emails, tweets, GitHub release notes, etc.
1828
3. Look over whats-new.rst and the docs. Make sure "What's New" is complete
19-
(check the date!) and consider adding a brief summary note describing the
20-
release at the top.
29+
(check the date!) and add the release summary at the top.
2130
Things to watch out for:
2231
- Important new features should be highlighted towards the top.
2332
- Function/method references should include links to the API docs.
2433
- Sometimes notes get added in the wrong section of whats-new, typically
2534
due to a bad merge. Check for these before a release by using git diff,
26-
e.g., `git diff v0.X.Y whats-new.rst` where 0.X.Y is the previous
35+
e.g., `git diff v{0.X.Y-1} whats-new.rst` where {0.X.Y-1} is the previous
2736
release.
37+
4. If possible, open a PR with the release summary and whatsnew changes.
38+
4. After merging, again ensure your master branch is synced to upstream:
39+
```sh
40+
git pull upstream master
41+
```
2842
4. If you have any doubts, run the full test suite one final time!
29-
```
43+
```sh
3044
pytest
3145
```
3246
5. Check that the ReadTheDocs build is passing.
3347
6. On the master branch, commit the release in git:
34-
```
35-
git commit -am 'Release v0.X.Y'
48+
```s
49+
git commit -am 'Release v{0.X.Y}'
3650
```
3751
7. Tag the release:
52+
```sh
53+
git tag -a v{0.X.Y} -m 'v{0.X.Y}'
3854
```
39-
git tag -a v0.X.Y -m 'v0.X.Y'
40-
```
41-
8. Build source and binary wheels for pypi:
42-
```
43-
git clean -xdf # this deletes all uncommited changes!
55+
8. Build source and binary wheels for PyPI:
56+
```sh
57+
git clean -xdf # this deletes all uncommitted changes!
4458
python setup.py bdist_wheel sdist
4559
```
4660
9. Use twine to check the package build:
61+
```sh
62+
twine check dist/xarray-{0.X.Y}*
4763
```
48-
twine check dist/xarray-0.X.Y*
49-
```
50-
10. Use twine to register and upload the release on pypi. Be careful, you can't
64+
10. Use twine to register and upload the release on PyPI. Be careful, you can't
5165
take this back!
52-
```
53-
twine upload dist/xarray-0.X.Y*
66+
```sh
67+
twine upload dist/xarray-{0.X.Y}*
5468
```
5569
You will need to be listed as a package owner at
5670
https://pypi.python.org/pypi/xarray for this to work.
5771
11. Push your changes to master:
58-
```
72+
```sh
5973
git push upstream master
6074
git push upstream --tags
6175
```
6276
12. Update the stable branch (used by ReadTheDocs) and switch back to master:
63-
```
77+
```sh
6478
git checkout stable
6579
git rebase master
66-
git push upstream stable
80+
git push --force upstream stable
6781
git checkout master
6882
```
6983
It's OK to force push to 'stable' if necessary. (We also update the stable
70-
branch with `git cherrypick` for documentation only fixes that apply the
84+
branch with `git cherry-pick` for documentation only fixes that apply the
7185
current released version.)
72-
13. Add a section for the next release (v.X.Y+1) to doc/whats-new.rst:
86+
13. Add a section for the next release {0.X.Y+1} to doc/whats-new.rst:
7387
```
74-
.. _whats-new.0.X.Y+1:
88+
.. _whats-new.{0.X.Y+1}:
7589
76-
v0.X.Y+1 (unreleased)
90+
v{0.X.Y+1} (unreleased)
7791
---------------------
7892
7993
Breaking changes
@@ -96,19 +110,19 @@ Time required: about an hour.
96110
~~~~~~~~~~~~~~~~
97111
```
98112
14. Commit your changes and push to master again:
99-
```
113+
```sh
100114
git commit -am 'New whatsnew section'
101115
git push upstream master
102116
```
103117
You're done pushing to master!
104118
15. Issue the release on GitHub. Click on "Draft a new release" at
105-
https://github.com/pydata/xarray/releases. Type in the version number, but
106-
don't bother to describe it -- we maintain that on the docs instead.
119+
https://github.com/pydata/xarray/releases. Type in the version number
120+
and paste the release summary in the notes.
107121
16. Update the docs. Login to https://readthedocs.org/projects/xray/versions/
108122
and switch your new release tag (at the bottom) from "Inactive" to "Active".
109123
It should now build automatically.
110-
17. Issue the release announcement! For bug fix releases, I usually only email
111-
[email protected]. For major/feature releases, I will email a broader
124+
17. Issue the release announcement to mailing lists & Twitter. For bug fix releases, I
125+
usually only email [email protected]. For major/feature releases, I will email a broader
112126
list (no more than once every 3-6 months):
113127
114128

doc/whats-new.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ New Features
117117
:py:func:`combine_by_coords` and :py:func:`combine_nested` using
118118
combine_attrs keyword argument. (:issue:`3865`, :pull:`3877`)
119119
By `John Omotani <https://github.com/johnomotani>`_
120-
- 'missing_dims' argument to :py:meth:`Dataset.isel`,
121-
`:py:meth:`DataArray.isel` and :py:meth:`Variable.isel` to allow replacing
120+
- `missing_dims` argument to :py:meth:`Dataset.isel`,
121+
:py:meth:`DataArray.isel` and :py:meth:`Variable.isel` to allow replacing
122122
the exception when a dimension passed to ``isel`` is not present with a
123123
warning, or just ignore the dimension. (:issue:`3866`, :pull:`3923`)
124124
By `John Omotani <https://github.com/johnomotani>`_
@@ -132,7 +132,7 @@ New Features
132132
By `Stephan Hoyer <https://github.com/shoyer>`_.
133133
- Allow plotting of boolean arrays. (:pull:`3766`)
134134
By `Marek Jacob <https://github.com/MeraX>`_
135-
- Enable using MultiIndex levels as cordinates in 1D and 2D plots (:issue:`3927`).
135+
- Enable using MultiIndex levels as coordinates in 1D and 2D plots (:issue:`3927`).
136136
By `Mathias Hauser <https://github.com/mathause>`_.
137137
- A ``days_in_month`` accessor for :py:class:`xarray.CFTimeIndex`, analogous to
138138
the ``days_in_month`` accessor for a :py:class:`pandas.DatetimeIndex`, which

0 commit comments

Comments
 (0)