Steps
Checks
(Non-empty) Pyproject.toml
Poetry uses a pyproject.toml
, which was introduced in PEP-518 to specify build dependencies.
Deploy while on main
Recite assumes you want to deploy from your local machine and while on the main/master branch of your project.
Clean git
You should not have modified files, and your local branch should be in sync with the remote.
Your tests should run without errors
Recite uses nox as test-suite by default. For inspiration on what your tests should entail check out the recommendations.
Changelog
You should keep a changelog and recite checks if such a file exists and there is a diff between the current version and the last version tag. Since changelogs are made for human eyes, no fancy checks regarding the contents of the changes are made.
Publishing
Bump version
Uses poetry's version command to bump the version in the pyproject.toml
.
Commit bump
Add the modified pyproject.toml
and commit the change.
Create tag
Create a new tag with the new version.
Push tag
Push the newly created tag to the remote.
Build and publish
Uses poetry's publish command to build your project and upload it to PyPI.
If you have PYPI_TOKEN
as environment variable it will use token-based authentication. Do NOT store this variable in any file that you version control (publicly). If this variable is not set you will be prompted for the required values.
Remind you to create a github release
Following the philosophy of a do-nothing-script this step reminds you to create a github release with the build .whl
and the changes you documented in your changelog.