Use this repo as a template for starting multi-package Python projects.
The project is published to https://pypi.org/project/template-python-package-2024/. Install it via:
pip install template-python-package-2024
# or alternatively, directly from git
pip install "git+https://github.com/MihaiBojin/template-python-package-2024@main"
The simplest way to publish a new version (if you have committer rights) is to tag a commit and push it to the repo:
# At a certain commit, ideally after merging a PR to main
git tag v0.1.x
git push origin v0.1.x
A GitHub Action will run, build the library and publish it to PyPI.
These steps can also be performed locally. For these commands to work, you will need to export two environment variables:
export TESTPYPI_PASSWORD=... # token for https://test.pypi.org/legacy/
export PYPI_PASSWORD=... # token for https://upload.pypi.org/legacy/
First, publish to the test repo and inspect the package:
make publish-test
If correct, distribute the wheel to the PyPI index:
make publish
Verify the distributed code
make publish-verify
Build an image with:
make docker
and run it with
make docker-run
# or
make docker-run ARGS="--arg1 --arg2 --etc"