@@ -28,73 +28,96 @@ pushed to this repo.
28
28
To release a new version:
29
29
30
30
1 . Test asv benchmarking with the ` -q ` flag to ensure it is working (multiple
31
- platformas a bonus).
31
+ platformas a bonus). You can merge the ref you are testing, but you cant
32
+ test the release ref on main until after the release is made, so that step
33
+ will come below and those details will merge to develop and not the
34
+ release.
35
+
36
+ 1 . If there are extended release notes to put in the gh-pages branch, once
37
+ you have approval, change the dates of the appropriate pages to the
38
+ desired release date. Change any links to the extended documentation in
39
+ develop branch to match. Push gh-pages branch to confirm in develop before
40
+ releasing.
32
41
33
42
1 . On your local machine, create a release branch from ` develop ` or a patch
34
43
branch from ` main ` . The branch's name must follow format
35
44
` v{major}.{minor}.{patch} ` ([ semantic version] ( https://semver.org/ ) number
36
45
with a leading 'v'). For instance, for a minor release, if this repo is an
37
46
` upstream ` remote and one's local ` develop ` is up to date with upstream
38
- ` develop ` , then from ` develop ` run ` git switch -c vx.y.z ` .
47
+ ` develop ` , then from ` develop ` run ` git switch -c vx.y.z ` .
39
48
40
49
1 . If this is a patch release, make changes/fixes locally. If this is a major or
41
- minor release, no changes are needed.
42
-
43
- In either case, add the release version and date to the top of
44
- `doc/whats-new.rst`. If a patch, put it below the pending minor release.
50
+ minor release, no changes may be needed. In either case, add the release version
51
+ and date to the top of ` doc/whats-new.rst ` . If a patch, put it below the
52
+ pending minor release. Also update the version in ` doc/index.rst ` . Update the
53
+ CITATION.cff file. If a major release, get the provisional new DOI from USGS
54
+ and add it to CITATION.cff and the main README.md.
45
55
46
56
1 . Push the branch to this repo. For instance, if this repo is an ` upstream `
47
57
remote: ` git push -u upstream vx.y.z ` . This starts a job to:
48
-
49
58
- Check out the release branch and update version number in ` version.txt ` and
50
59
` pywatershed/version.py ` to match the version in the branch name.
51
60
- Build and check the Python package.
52
61
- Upload the package as an artifact.
53
62
- Draft a PR against ` main ` with the updated version files.
54
63
55
64
1 . On all platforms, pull the release from upstream and perform ASV performance
56
- benchmarks against previous release , e.g., ```asv run --verbose
57
- - -show-stderr HASHFILE:pws_refs_for_asv.txt``` after editing the file to
58
- contain the previous and current release. Collect performance results from
59
- various machines into a single report and use `asv publish` to generate
60
- the static webpages to be included with the release as artifacts in that
61
- step below.
65
+ benchmarks against previous release , e.g., ```asv run --verbose
66
+ -show-stderr HASHFILE: pws_refs_for_asv .txt``` after editing the file to
67
+ contain the previous and current release. Collect performance results from
68
+ various machines into a single report and use ` asv publish ` to generate
69
+ the static webpages to be included with the release as artifacts in that
70
+ step below.
62
71
63
72
1 . Inspect the package. If it looks good, merge the PR to ` main ` .
64
73
65
- ** Note** : it is critical to * merge* the PR to ` main ` , not squash as is
66
- conventional for development PRs. Squashing causes ` develop ` and ` main ` to
67
- diverge. Merging to ` main ` preserves commit history and ensures ` develop `
68
- and ` main ` don't diverge.
74
+ ** Note** : it is critical to * merge* the PR to ` main ` , not squash as is
75
+ conventional for development PRs. Squashing causes ` develop ` and ` main ` to
76
+ diverge. Merging to ` main ` preserves commit history and ensures ` develop `
77
+ and ` main ` don't diverge.
69
78
70
- Merging the PR to ` main ` will trigger another job to draft a [ GitHub
71
- release] ( https://github.com/EC-USGS/pywatershed/releases ) . The release is
72
- not yet publicly visible at this point.
79
+ Merging the PR to ` main ` will trigger another job to draft a [ GitHub
80
+ release] ( https://github.com/EC-USGS/pywatershed/releases ) . The release is
81
+ not yet publicly visible at this point.
73
82
74
83
1 . Inspect the GitHub release. If needed, make any manual edits to the release
75
84
notes. If the release looks good, publish it via GitHub UI or CLI. Manually
76
85
add the asv static web pages and frozen conda dependencies for each platform.
77
86
78
87
Publishing the release on GitHub automatically tags the head of ` main ` with
79
88
the release version number (** Note** : release tags, unlike branches, don't
80
- include an initial ` v ` , as is common in some projects) and triggers jobs to:
89
+ include an initial ` v ` , as is common in some projects) and triggers jobs to
90
+ publish the package to PyPI.
81
91
82
- - Publish the package to PyPI
83
- - Check out ` main `
84
- - Run ` .github/scripts/update_version.py -v x.y+1.0.dev0 ` to update
85
- ` version.txt ` and ` pywatershed/version.py ` with the minor version number
86
- incremented. The ` .dev0 ` suffix indicates preliminary development status.
87
- - Draft a PR against ` develop ` with the updated version files and the
88
- updates previously merged to ` main ` .
92
+ 1 . Delete the release branch on upstream.
89
93
90
- 1 . In the case of a minor or major release, a couple of manual steps:
91
- - Update the PR against ` develop ` to add a new minor or major release to
92
- the top of ` doc/whats-new.rst `
93
- - Update ` main ` image on WholeTale to have the current release.
94
+ 1 . On all platforms, pull the release from upstream and perform ASV performance
95
+ benchmarks against previous release. First delete ` .asv/ ` entirely (unless
96
+ there's some good reason to keep ` .asv/envs ` ), then update
97
+ ` pws_refs_for_asv.txt ` to have the previous release and the above release,
98
+ next ` asv run --verbose --show-stderr HASHFILE:pws_refs_for_asv.txt ` . Collect
99
+ performance results from various machines into a single ` .asv/results/ ` , then
100
+ use ` asv publish ` to generate the static webpages in ` .asv/html ` . When these
101
+ are to your liking, add them to the gh-pages branch in the ` asv/vM-m-p `
102
+ directory.
103
+
104
+ 1 . In the case of a minor or major release, (a patch would be applied to both
105
+ main and develop?) a couple of manual steps:
106
+ - Check out ` main ` as a new branch to get it back into develop,
107
+ eg feat_main_to_dev.
108
+ - Run ` .github/scripts/update_version.py -v x.y+1.0.dev0 ` to update
109
+ ` version.txt ` and ` pywatershed/version.py ` with the minor version number
110
+ incremented. The ` .dev0 ` suffix indicates preliminary development status.
111
+ - Add a new minor release to the top of ` doc/whats-new.rst `
112
+ - Incorporate the ASV details from the previous section above.
113
+ - Open a PR against ` develop ` with the updated version files and the
114
+ updates previously merged to ` main ` .
94
115
95
116
1 . Merge the PR to ` develop ` . As above, it is important to * merge* the PR, not
96
117
squash, to preserve history and keep ` develop ` and ` main ` from diverging.
97
118
119
+ 1 . Update ` main ` image on WholeTale to have the current release.
120
+
98
121
99
122
## Utility scripts
100
123
0 commit comments