Create, activate, deactivate a virtual environment:
python -m venv venv
.\venv\Scripts\activate
deactivateInstall dependencies:
pip install -r requirements.txtTo update requirements.txt, use https://azurda.github.io/
python -m unittest -vruff format-
Format the code:
ruff format -
Update the version number in
setup.pyusing semantic versioning. -
Run the unit tests and check whether all tests pass:
python -m unittest -
Commit and push the changes to GitHub.
-
Add a version tag:
git tag v1.2.3 git push --tag -
Clear the
distfolder -
Build the library:
python -m build -
Publish on PyPi:
twine check dist/* twine upload dist/*