This procedure covers both final releases and prereleases of BEE. Complete the release from a system that can run the required LANL tests and reach PyPI. Some steps may require access to the LANL network.
- Confirm that the nightly tests for the current
developbranch pass. - Confirm that the version has not already been published on PyPI. PyPI does not allow a version number to be reused, even if that release is deleted.
- Verify that the version, tag names, and documentation URLs in
README.rstare correct. - Keep the branch-protection rules for
mainanddevelopenabled. Use pull requests for the release merges.
The examples below use 0.x.x as the release version.
Update your local
developbranch and create a release branch:git switch develop git pull --ff-only origin develop git switch -c release/0.x.x
Prepare the release branch:
Set the release version in
pyproject.toml.Update the version, tag names, and documentation URLs in
README.rstReview the changes since the previous release tag before updating
HISTORY.md. First, list the tags to identify the previous final release:git fetch origin --tags git tag --sort=-version:refname
Then review the commits in chronological order, including their full messages and changed-file summaries:
git log <previous-release-tag>..origin/develop --first-parent --reverse --format=fuller --stat
--first-parentfollows the maindevelophistory and avoids expanding every merged branch into its individual commits. Use the output to summarize the user-visible changes inHISTORY.md; do not copy the commit messages without reviewing and organizing them.Add the release notes to
HISTORY.md.Check and commit changes to pyproject.toml, README.rst History.md
Build the documentation and review the generated output.
Run the applicable tests.
Push the branch and create a pull request into
develop:git push -u origin release/0.x.x
Create PR. Merge the pull request only after its required checks and review are complete.
Create a pull request from
developintomain. Confirm that the pull request contains only the changes intended for this release, then merge it after all required checks and review are complete.Verify the release commit on
main:The version in
pyproject.tomlmatches the planned release version.The documentation workflow in
.github/workflows/docs.ymlcompleted successfully.- The current coverage badge is available at:
On GitHub, create a release from the release commit on
main. Create a tag whose version matchespyproject.tomlexactly, and publish the GitHub release.- After github actions have run, verify the documentation:
Check out the tagged release and build the distributions:
git fetch --tags origin git switch --detach <release-tag> poetry build
Inspect the files in
dist/before publishing. If the version or package contents are wrong, fix them before continuing.- Create a project-scoped API token for
hpc-beeflowon PyPI: Your projects > hpc-beeflow > Manage Projects > Settings > Create a token.
poetry publish -u __token__ -p <pypi-long token>
- Create a project-scoped API token for
Verify the published package in a clean virtual environment (ensure python3 is a good version for beeflow):
python3 -m venv /tmp/beeflow-release-check . /tmp/beeflow-release-check/bin/activate python -m pip install --upgrade pip python -m pip install hpc-beeflow==0.x.x python -m pip show hpc-beeflow
Prepare a branch for
developfor the next development cycle in a new pull request:- Change the version in
pyproject.tomlto the next development version, for example0.1.12dev1after releasing0.1.11. - Update the prerelease version, tag names, and documentation URLs in
README.rst. - Verify the documentation build, then merge the pull request into
developafter its checks and review are complete. - Get the branch merged to develop through the normal procedure.
- Create a tag matching
pyproject.toml(it isn't necessary to publish)
- Change the version in
If
mainreceived any changes that are not already indevelop, merge them back through a pull request frommainintodevelop.
Publish a prerelease from develop; do not merge develop into main.
Confirm that
developis current and that its nightly tests pass:git switch develop git pull --ff-only origin develop
Verify that
pyproject.tomlcontains the intended prerelease version and thatREADME.rstcontains the matching tag names and documentation URLs. Make any required changes through a pull request intodevelopbefore continuing.Create a GitHub prerelease whose tag points to the verified commit on
developand matches the version inpyproject.toml.Check out that tag, then follow final-release steps 7 through 9 to build, publish, and verify the package. Mark the GitHub release as a prerelease.
Do not delete an older PyPI release in an attempt to reuse its version number;
PyPI will not permit that version to be uploaded again. Remove obsolete
prerelease documentation from gh-pages only when it is no longer linked or
needed.
Publishing to PyPI is permanent for versioning purposes. A published release can be removed from the project page, but its version number cannot be reused.