This project uses pre-commit hooks. You should install these hooks by running the following commands from the project directory:
pip install pre-commit
pre-commit install
Installing IDE plugins supporting Mypy and Ruff is recommend but not required. These will be verified by GitHub Actions during a pull request if you are unable to check them locally.
Documentation follows the Numpydoc Style Guide. All public functions must have full documentation. All private functions must have at least a brief description.
The wheel_makers
directory holds scripts used to make test data. GitHub Actions will generate this data and upload it as an artifact named delocate-tests-data
. This can be used to create and commit new test wheels for MacOS even if you don't have access to your own system.
Use pathlib for any new code using paths.
Refactor any touched functions to use pathlib when it does not break backwards compatibility.
Prefer using str
to handle paths returned from MacOS tools such as otool
.
All new functions must have type hints. All touched functions must be refactored to use type hints, including test functions.
This codebase includes legacy code from the Python 2 era. Old code should be refactored to use modern standards when touched.
This section is only relevant for maintainers with repo access.
Ensure pre-commit hooks are up-to-date by running pre-commit autoupdate
.
A guide for maintainers who are doing a Delocate release.
-
Review the open list of issues. Check whether there are outstanding issues that can be closed, and whether there are any issues that should delay the release. Label them!
-
Review and update the
Changelog.md
file. Add the new version/date while preserving the[Unreleased]
header.Get a partial list of contributors with something like::
git shortlog -ns 0.6.0..
where
0.6.0
was the last release tag name.Then manually go over
git shortlog 0.6.0..
to make sure the release notes are as complete as possible and that every contributor was recognized. -
Use the opportunity to update the
.mailmap
file if there are any duplicate authors listed fromgit shortlog -ns
. -
Add any new authors to the
AUTHORS
file. Add any new entries to theTHANKS
file. -
Check the copyright years in
LICENSE
-
Make sure all tests are passing for the latest commit intended to be released. The recommended way to do this is to make a PR for the release. Once the PR is merged then the release is now ready.
Once the above is done the commit can be tagged and uploaded.
-
Make an annotated tag for the release with tag of form
0.6.0
::git tag -a 0.6.0
-
Push the tag to
matthew-brett/delocate
to automatically deploy to PyPI. If the remote name for thematthew-brett/delocate
repo isorigin
then the command would begit push origin 0.6.0
. -
Check how everything looks on PyPI - the description, the packages. If anything doesn't look right then yank the release and upload with the patch version incremented.
-
Announce to the mailing lists. With fear and trembling.