Poetry
is used as a build system, dependency manager and publisher for this project.
See poetry installation instructions here.
(in the root project directory) Run:
poetry install
After that poetry will create a separate virtual environment and install all required packages plus the package itself into this virtual env. This virtual env can be used to setup your IDE - both VSCode and PyCharm can discover poetry virtual environments.
Provide access token for publishing destination (PyPI) - in unlikely event if you have to publish there manually:
poetry config pypi-token.pypi "<YOUR_TOKEN_FROM_PYPI_ACCOUNT>"
You can generate this token in your PyPI account settings.
Run:
make test
If tests are successfull you can update package version (to be later published) by running:
poetry version patch
Once you bumped the version you are expected to publish this version, but this part is automated in CI. The next section below explains how to do it manually.
To build wheel (and sdist) run:
poetry build
And then to publish it into PyPi:
poetry publish
Congrats!
See path
dependency specification described here.
Github Actions runs unit testing and lint testing
Select Publish workflow -> Run workflow -> select version format for auto versioning (major, minor, patch) :
This workflow:
- runs units testing
- invokes poetry to increase version
- invokes poetry to build package
- creates tag and releases with a new version
- invokes poetry to publish package
- commits these changes
- and pushes all of these to the git repo.