1- How to issue an xarray release in 15 easy steps
1+ How to issue an xarray release in 14 easy steps
22
33Time required: about an hour.
44
55 1 . Ensure your master branch is synced to upstream:
6- git pull upstream master
6+ ```
7+ git pull upstream master
8+ ```
79 2. Look over whats-new.rst and the docs. Make sure "What's New" is complete
810 (check the date!) and consider adding a brief summary note describing the
911 release at the top.
@@ -12,37 +14,53 @@ Time required: about an hour.
1214 - Function/method references should include links to the API docs.
1315 - Sometimes notes get added in the wrong section of whats-new, typically
1416 due to a bad merge. Check for these before a release by using git diff,
15- e.g., `` git diff v0.X.Y whats-new.rst` ` where 0.X.Y is the previous
17+ e.g., `git diff v0.X.Y whats-new.rst` where 0.X.Y is the previous
1618 release.
1719 3. If you have any doubts, run the full test suite one final time!
18- py.test
20+ ```
21+ pytest
22+ ```
1923 4. On the master branch, commit the release in git:
24+ ```
2025 git commit -a -m 'Release v0.X.Y'
26+ ```
2127 5. Tag the release:
28+ ```
2229 git tag -a v0.X.Y -m 'v0.X.Y'
30+ ```
2331 6. Build source and binary wheels for pypi:
32+ ```
2433 git clean -xdf # this deletes all uncommited changes!
2534 python setup.py bdist_wheel sdist
35+ ```
2636 7. Use twine to register and upload the release on pypi. Be careful, you can't
2737 take this back!
38+ ```
2839 twine upload dist/xarray-0.X.Y*
40+ ```
2941 You will need to be listed as a package owner at
3042 https://pypi.python.org/pypi/xarray for this to work.
3143 8. Push your changes to master:
44+ ```
3245 git push upstream master
3346 git push upstream --tags
47+ ```
3448 9. Update the stable branch (used by ReadTheDocs) and switch back to master:
49+ ```
3550 git checkout stable
3651 git rebase master
3752 git push upstream stable
3853 git checkout master
39- It's OK to force push to 'stable' if necessary.
40- We also update the stable branch with `git cherrypick` for documentation
41- only fixes that apply the current released version.
54+ ```
55+ It's OK to force push to 'stable' if necessary. (We also update the stable
56+ branch with `git cherrypick` for documentation only fixes that apply the
57+ current released version.)
425810. Add a section for the next release (v.X.(Y+1)) to doc/whats-new.rst.
435911. Commit your changes and push to master again:
44- git commit -a -m 'Revert to dev version'
60+ ```
61+ git commit -a -m 'New whatsnew section'
4562 git push upstream master
63+ ```
4664 You're done pushing to master!
476512. Issue the release on GitHub. Click on "Draft a new release" at
4866 https://github.com/pydata/xarray/releases. Type in the version number, but
@@ -53,11 +71,22 @@ Time required: about an hour.
537114. Issue the release announcement! For bug fix releases, I usually only email
5472 xarray@googlegroups.com. For major/feature releases, I will email a broader
5573 list (no more than once every 3-6 months):
56- pydata@googlegroups.com, xarray@googlegroups.com,
57- numpy-discussion@scipy.org, scipy-user@scipy.org,
58- pyaos@lists.johnny-lin.com
74+ - pydata@googlegroups.com
75+ - xarray@googlegroups.com
76+ - numpy-discussion@scipy.org
77+ - scipy-user@scipy.org
78+ - pyaos@lists.johnny-lin.com
79+
5980 Google search will turn up examples of prior release announcements (look for
6081 "ANN xarray").
82+ You can get a list of contributors with:
83+ ```
84+ git log "$(git tag --sort="v:refname" | sed -n 'x;$p').." --format="%aN" | sort -u
85+ ```
86+ or by replacing `v0.X.Y` with the _previous_ release in:
87+ ```
88+ git log v0.X.Y.. --format="%aN" | sort -u
89+ ```
6190
6291Note on version numbering:
6392
0 commit comments