Installing Development Dependencies
Poetry installs dev dependencies by default from the
pyproject.toml files. Just run
Testing is run with
pytest and the order is randomized by
To run all tests, run
To run all tests in docker containers (tests against many versions of python), run
docker-compose up --build && docker-compose down
Create a release candidate branch named according to the version to be released. This branch is used to polish the release while work continues on dev (towards the next release). The naming convention is
Bump the version of the package to the version you are about to release, either manually by editing
pyproject.tomlor by running
poetry version X.Y.Zor bumping according to a valid bump rule like
poetry version minor(see poetry docs: https://python-poetry.org/docs/cli/#version).
Update the version identifier in
changelog.mdto reflect that the version is now “released” and revisit
README.mdto keep it up to date.
Open a PR to merge the release branch into master. This informs the rest of the team how the release process is progressing as you polish the release branch.
When you are satisfied that the release branch is ready, merge the PR into
Check out the
masterbranch, pull the merged changes, and tag the newly created merge commit with the desired version
X.Y.Zand push the tag upstream.
git tag -a X.Y.Z -m "version release X.Y.Z" git push origin X.Y.Z
Ensure that you have
masterchecked out and build the package (see below). Check that the version of the built artifacts is as you expect (should match the version git tag and the output from
poetry version --short).
Optionally distribute the artifacts to PyPI/Nexus if desired (see below).
Open a PR to merge
devso that any changes made during the release process are also captured in
Building and Distribution
poetryis installed by running
To build the distribution archives, run
To upload the wheel to Nexus, run
poetry publish. You will need credentials to sign into PyPI.