ably-python uses uv for packaging and dependency management. Please refer to the uv documentation for up to date instructions on how to install uv.
Perform the following operations after cloning the repository contents:
git submodule init
git submodule update
# Install the crypto extra if you wish to be able to run all of the tests
uv sync --extra cryptouv run pytestReleases should always be made through a release pull request (PR), which needs to bump the version number and add to the change log.
The release process must include the following steps:
- Ensure that all work intended for this release has landed to
main - Create a release branch named like
release/2.0.1 - Add a commit to bump the version number, updating
pyproject.tomlandably/__init__.py - Run
github_changelog_generatorto automate the update of the CHANGELOG. This may require some manual intervention, both in terms of how the command is run and how the change log file is modified. Your mileage may vary:- The command you will need to run will look something like this:
github_changelog_generator -u ably -p ably-python --since-tag v2.0.0 --output delta.md --token $GITHUB_TOKEN_WITH_REPO_ACCESS. Generate token here. - Using the command above,
--output delta.mdwrites changes made after--since-tagto a new file - The contents of that new file (
delta.md) then need to be manually inserted at the top of theCHANGELOG.md, changing the "Unreleased" heading and linking with the current version numbers - Also ensure that the "Full Changelog" link points to the new version tag instead of the
HEAD
- The command you will need to run will look something like this:
- Commit this change:
git add CHANGELOG.md && git commit -m "Update change log." - Push the release branch to GitHub
- Create a release PR (ensure you include an SDK Team Engineering Lead and the SDK Team Product Manager as reviewers) and gain approvals for it, then merge that to
main - Create a tag named like
v2.0.1and push it to GitHub - e.g.git tag v2.0.1 && git push origin v2.0.1 - Create the release on GitHub including populating the release notes
- Go to the Release Workflow and ask ably/team-sdk member to approve publishing to the PyPI registry
- Update the Ably Changelog (via headwayapp) with these changes
We tend to use github_changelog_generator to collate the information required for a change log update.
Your mileage may vary, but it seems the most reliable method to invoke the generator is something like:
github_changelog_generator -u ably -p ably-python --since-tag v1.0.0 --output delta.md
and then manually merge the delta contents in to the main change log (where v1.0.0 in this case is the tag for the previous release).