Making freud Releases¶
Documented below are the steps needed to make a new release of freud.
Starting the Release¶
Review open pull requests, issues, and milestones. Before making a release, every issue or pull request assigned to that release version should be completed or moved to a later milestone. Additionally, all resolved issues and merged pull requests since the last release should be assigned to the current milestone. Some exceptions can be made for simplicity, e.g. automated updates from Dependabot don’t need to be assigned to the milestone.
Create a release branch, numbered according to Semantic Versioning:
git checkout -b release/vX.Y.Z
Review headings (Added, Changed, Fixed, Deprecated, Removed) and ensure consistent formatting.
Update the release version and release date from
vX.Y.Z - YYYY-MM-DD.
Make sure that package requirements are consistent in
Review Python version support (e.g. adding tests for new versions, dropping old versions no sooner than allowed by NEP 29).
Update git submodules. Example for the
# Update freud-examples submodule: cd doc/source/gettingstarted/examples git pull git checkout master # Then go to the repository root and commit the changes.
Update pre-commit hooks:
If necessary, pre-commit hooks can be run manually to apply code formatting. This is typically handled by CI (which requires pre-commit hooks to succeed), but updated hooks may require a re-run.
# Apply default pre-commit hooks (Python and generic formatters) pre-commit run --all-files # Apply C++ pre-commit hooks (requires clang-format and other tools) pre-commit run --all-files -c .pre-commit-config-cpp.yaml
Update the contributor list:
git shortlog -sne > contributors.txt
git difffor that file. If any contributors are listed twice, update the
.mailmapfile so that all contributors are recognized under a canonical name and email. Then re-run the previous command.
Commit previous changes before running
Use the bumpversion package to increase the version number:
bumpversion patch # for X.Y.Z bumpversion minor # for X.Y bumpversion major # for X
Push the release branch to the remote:
git push -u origin release/vX.Y.Z
Create a pull request for that branch.
Ensure that ReadTheDocs and continuous integration pass on the release branch’s pull request. Pushing the release branch will cause CircleCI to create a release for TestPyPI automatically (see automation in
.circleci/config.yml). Make sure this succeeds – it takes a while to run. Review the TestPyPI builds to ensure the README looks correct.
Create and push a tag for the release.
git tag -a vX.Y.Z git push --tags
Pushing the tag will cause CircleCI to create a release for PyPI automatically (see automation in
.circleci/config.yml). Make sure this succeeds – it takes a while to run.
Merge the release branch pull request into the
The conda-forge autotick bot should discover that the PyPI source distribution has changed, and will create a pull request to the conda-forge feedstock. This pull request may take a few hours to appear. If other changes are needed in the conda-forge recipe (e.g. new dependencies), follow the conda-forge documentation to create a pull request from your own fork of the feedstock. Merge the pull request after all continuous integration passes to trigger release builds for conda-forge.
Verify that ReadTheDocs, PyPI, and conda-forge have been updated to the newest version.
Make a GitHub release from the tag on GitHub and clicking “Create release.” Follow the template from previous release notifications.
Send a release notification via the freud-users group. Follow the template from previous release notifications.