|
| 1 | +# Releasing Qualtran |
| 2 | + |
| 3 | +The steps are |
| 4 | + |
| 5 | + 1. Bump the version number to the desired release version |
| 6 | + 2. Tag the release |
| 7 | + 3. Follow the Python packaging guide to generate a distribution and upload it |
| 8 | + 4. Bump the version number to the next "dev" version |
| 9 | + |
| 10 | +The packaging guide instructions can be found at: |
| 11 | +https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives |
| 12 | + |
| 13 | +## Set the version number |
| 14 | + |
| 15 | +Open a PR to edit `qualtran/_version.py` to change the version string to "x.y.z" (without any dev specifier), which |
| 16 | +is the desired version number. |
| 17 | +It should have previously been set to "x.y.z.dev0". |
| 18 | +The PR should be merged to the `main` branch and care should be taken not to merge any other PRs until |
| 19 | +the entire process is completed. |
| 20 | +Draft the release notes and circulate them for review. |
| 21 | + |
| 22 | +## Tag the repository |
| 23 | + |
| 24 | +Use GitHub "Releases" to tag the release with release notes. Tags for "x.y.0" minor releases should go on `main`. |
| 25 | +Patch releases (z > 0) should be tagged against a `vx.y` branch unless the patch immediately follows a minor release. |
| 26 | + |
| 27 | +Follow the convention for tag names. Include the "v" in the tag name. |
| 28 | + |
| 29 | +## Package the release |
| 30 | + |
| 31 | +Make sure you're on `main` and have pulled the version-bump commit. |
| 32 | +It's recommended to carefully run `git clean -ndx` (change n to f to actually do it) to prepare |
| 33 | +a pristine repository state. |
| 34 | +Then, follow the guidance at |
| 35 | +https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives. |
| 36 | + |
| 37 | +Modify the command to upload to the main pypi repository (rather than the test repository used for the tutorial). |
| 38 | + |
| 39 | +## Bump the version number to dev |
| 40 | + |
| 41 | +Edit `_version.py` again, and change the version number from "x.y.z" to "x.(y+1).0.dev0". |
| 42 | + |
| 43 | +## Communicate |
| 44 | + |
| 45 | +Send an email to [qualtran-announce@googlegroups.com](https://groups.google.com/g/qualtran-announce) announcing |
| 46 | +the release. Congrats! |
0 commit comments