Skip to content

Commit 0303d1e

Browse files
committed
DOC add release procedure section
Also re-organize relevant pages in "For Contributors" main section.
1 parent 6474a82 commit 0303d1e

File tree

2 files changed

+89
-4
lines changed

2 files changed

+89
-4
lines changed

doc/index.rst

+15-4
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,34 @@ Documentation index
4646
inspect_model
4747
run_model
4848

49-
**Help & reference**
49+
**Help & Reference**
5050

5151
* :doc:`api`
52-
* :doc:`develop`
5352
* :doc:`whats_new`
5453
* :doc:`citation`
5554

5655
.. toctree::
5756
:maxdepth: 1
5857
:hidden:
59-
:caption: Help & reference
58+
:caption: Help & Reference
6059

6160
api
62-
develop
6361
whats_new
6462
citation
6563

64+
**For Contributors**
65+
66+
* :doc:`develop`
67+
* :doc:`release_procedure`
68+
69+
.. toctree::
70+
:maxdepth: 1
71+
:hidden:
72+
:caption: For Contributors
73+
74+
develop
75+
release_procedure
76+
6677
Get in touch
6778
------------
6879

doc/release_procedure.rst

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.. _release_procedure:
2+
3+
Release Procedure
4+
=================
5+
6+
How to issue a xarray-simlab release in a few steps:
7+
8+
1. Ensure local master branch is synced to upstream::
9+
10+
$ git pull upstream master
11+
12+
2. Check ``whats_new.rst`` and the docs. Make sure "Release Notes" is
13+
complete (check the date!) and if needed add a brief summary note
14+
describing the release at the top.
15+
16+
3. If you have any doubts, run the full test suite one final time!::
17+
18+
$ pytest xsimlab -vv
19+
20+
5. On the master branch, commit the release in git::
21+
22+
$ git commit -a -m 'release v0.X.Y'
23+
24+
6. Tag the release::
25+
26+
$ git tag -a v0.X.Y -m '0.X.Y'
27+
28+
7. Push to GitHub::
29+
30+
$ git push upstream master --tags
31+
32+
8. Publish the release on GitHub: go to the repository's URL, follow
33+
the ``releases`` link, click on the ``Draft a new release`` button,
34+
select the tag of this release, add a title (e.g., the tag name)
35+
and a description (e.g., the summary added in ``whats_new.rst``).
36+
37+
8. Before build the package and upload to PyPI, make sure that you
38+
didn't make a local install using pip (maybe due to .egg-info
39+
conflict, this make cause issue with the packaged version on PyPI,
40+
which may be unusable and this is irreversible!). For steps 8 and 9
41+
below, either you can switch to another local clone of the
42+
repository (clean and up-to-date!! repeat step 1 if needed), or
43+
first clean the repository from build/dist files and/or all git
44+
untracked and ignored files (if you don't mind losing them)::
45+
46+
$ rm -rf dist build */*.egg-info *.egg-info
47+
$ git clean -xfd
48+
49+
9. Build source and binary wheels for PyPI::
50+
51+
$ python setup.py bdist_wheel sdist
52+
53+
10. Use twine to register and upload the release on pypi. You will
54+
need to be listed as a package owner at
55+
https://pypi.python.org/pypi/xarray-simlab for this to work. Be
56+
careful, this is irreversible!!::
57+
58+
$ twine upload dist/xarray-simlab-0.X.Y*
59+
60+
11. Update conda-forge. Clone
61+
https://github.com/conda-forge/xarray-simlab-feedstock and update
62+
the version number and sha256 in ``recipe/meta.yaml`` (check also
63+
dependencies). Submit a pull request (and merge it, once CI
64+
passes). Note: on macOS, you can calculate sha256 with::
65+
66+
$ shasum -a 256 xarray-simlab-0.X.Y.tar.gz
67+
68+
12. Add a section for the next release (v.X.(Y+1)) to
69+
``doc/whats-new.rst``.
70+
71+
13. Commit your changes and push to master again::
72+
73+
$ git commit -a -m 'Revert to dev version'
74+
$ git push upstream master

0 commit comments

Comments
 (0)