1- How to issue an xarray release in 16 easy steps
1+ # How to issue an xarray release in 17 easy steps
22
33Time required: about an hour.
44
55 1 . Ensure your master branch is synced to upstream:
66 ```
77 git pull upstream master
88 ```
9- 2. Look over whats-new.rst and the docs. Make sure "What's New" is complete
9+ 2. Get a list of contributors with:
10+ ```
11+ git log "$(git tag --sort="v:refname" | sed -n 'x;$p').." --format=%aN | sort -u | perl -pe 's/\n/$1, /'
12+ ```
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, /'
16+ ```
17+ Add these into `whats-new.rst` somewhere :)
18+ 3. Look over whats-new.rst and the docs. Make sure "What's New" is complete
1019 (check the date!) and consider adding a brief summary note describing the
1120 release at the top.
1221 Things to watch out for:
@@ -16,41 +25,41 @@ Time required: about an hour.
1625 due to a bad merge. Check for these before a release by using git diff,
1726 e.g., `git diff v0.X.Y whats-new.rst` where 0.X.Y is the previous
1827 release.
19- 3 . If you have any doubts, run the full test suite one final time!
28+ 4 . If you have any doubts, run the full test suite one final time!
2029 ```
2130 pytest
2231 ```
23- 4 . Check that the ReadTheDocs build is passing.
24- 5 . On the master branch, commit the release in git:
32+ 5 . Check that the ReadTheDocs build is passing.
33+ 6 . On the master branch, commit the release in git:
2534 ```
2635 git commit -am 'Release v0.X.Y'
2736 ```
28- 6 . Tag the release:
37+ 7 . Tag the release:
2938 ```
3039 git tag -a v0.X.Y -m 'v0.X.Y'
3140 ```
32- 7 . Build source and binary wheels for pypi:
41+ 8 . Build source and binary wheels for pypi:
3342 ```
3443 git clean -xdf # this deletes all uncommited changes!
3544 python setup.py bdist_wheel sdist
3645 ```
37- 8 . Use twine to check the package build:
46+ 9 . Use twine to check the package build:
3847 ```
3948 twine check dist/xarray-0.X.Y*
4049 ```
41- 9 . Use twine to register and upload the release on pypi. Be careful, you can't
50+ 10 . Use twine to register and upload the release on pypi. Be careful, you can't
4251 take this back!
4352 ```
4453 twine upload dist/xarray-0.X.Y*
4554 ```
4655 You will need to be listed as a package owner at
4756 https://pypi.python.org/pypi/xarray for this to work.
48- 10 . Push your changes to master:
57+ 11 . Push your changes to master:
4958 ```
5059 git push upstream master
5160 git push upstream --tags
5261 ```
53- 11 . Update the stable branch (used by ReadTheDocs) and switch back to master:
62+ 12 . Update the stable branch (used by ReadTheDocs) and switch back to master:
5463 ```
5564 git checkout stable
5665 git rebase master
@@ -60,7 +69,7 @@ Time required: about an hour.
6069 It's OK to force push to 'stable' if necessary. (We also update the stable
6170 branch with `git cherrypick` for documentation only fixes that apply the
6271 current released version.)
63- 12 . Add a section for the next release (v.X.Y+1) to doc/whats-new.rst:
72+ 13 . Add a section for the next release (v.X.Y+1) to doc/whats-new.rst:
6473 ```
6574 .. _whats-new.0.X.Y+1:
6675
@@ -86,19 +95,19 @@ Time required: about an hour.
8695 Internal Changes
8796 ~~~~~~~~~~~~~~~~
8897 ```
89- 13 . Commit your changes and push to master again:
98+ 14 . Commit your changes and push to master again:
9099 ```
91100 git commit -am 'New whatsnew section'
92101 git push upstream master
93102 ```
94103 You're done pushing to master!
95- 14 . Issue the release on GitHub. Click on "Draft a new release" at
104+ 15 . Issue the release on GitHub. Click on "Draft a new release" at
96105 https://github.com/pydata/xarray/releases. Type in the version number, but
97106 don't bother to describe it -- we maintain that on the docs instead.
98- 15 . Update the docs. Login to https://readthedocs.org/projects/xray/versions/
107+ 16 . Update the docs. Login to https://readthedocs.org/projects/xray/versions/
99108 and switch your new release tag (at the bottom) from "Inactive" to "Active".
100109 It should now build automatically.
101- 16 . Issue the release announcement! For bug fix releases, I usually only email
110+ 17 . Issue the release announcement! For bug fix releases, I usually only email
102111 xarray@googlegroups.com. For major/feature releases, I will email a broader
103112 list (no more than once every 3-6 months):
104113 - pydata@googlegroups.com
@@ -109,18 +118,8 @@ Time required: about an hour.
109118
110119 Google search will turn up examples of prior release announcements (look for
111120 "ANN xarray").
112- You can get a list of contributors with:
113- ```
114- git log "$(git tag --sort="v:refname" | sed -n 'x;$p').." --format="%aN" | sort -u
115- ```
116- or by substituting the _previous_ release in:
117- ```
118- git log v0.X.Y-1.. --format="%aN" | sort -u
119- ```
120- NB: copying this output into a Google Groups form can cause
121- [issues](https://groups.google.com/forum/#!topic/xarray/hK158wAviPs) with line breaks, so take care
122121
123- Note on version numbering:
122+ ## Note on version numbering
124123
125124We follow a rough approximation of semantic version. Only major releases (0.X.0)
126125should include breaking changes. Minor releases (0.X.Y) are for bug fixes and
0 commit comments