This template will get you ready to deploy a library to PyPI.
- Rename the
src/poetry_library_template
package. - Globally replace instances of
poetry-library-template
andpoetry_library_template
with your project and package name. - Set your repo up on CodeCov and add a codecov token to your repo under the
CODECOV_TOKEN
action secret. - Create a new repo-scoped personal access token and add it as the
RELEASE_TOKEN
action secret. This is so we can trigger further workflows on release. - Create a PyPI token with write access for this package, and add it as the
PYPI_PASSWORD
action secret. - Create and test your library.
- Update the distribution information such as classifiers and repo location in
pyproject.toml
. - Write docs in
docs/
, including updating the project information indocs/conf.py
- When you're ready to release the first version, run the release GitHub action with the "major", "minor", or "patch" option.
- Remove this section from
README.md
. - Happy hacking!
Install Poetry and poetry install
the project
Note: if Poetry is managing a virtual environment for you, you may need to use poetry run poe
instead of poe
poe autoformat
- Autoformat codepoe lint
- Lintingpoe test
- Run Testspoe docs
- Build docs
Release a new version by manually running the release action on GitHub with a 'major', 'minor', or 'patch' version bump selected.
This will create an push a new semver tag of the format v1.2.3
.
Pushing this tag will trigger an action to release a new version of your library to PyPI.
Optionally create a release from this new tag to let users know what changed.