- Create local Python environment
python -m venv venv- Activate environment
# For Linux / MacOS
source venv/bin/activate# For Windows Powershell
. ./venv/Scripts/Activate.ps1- Install dependencies
pip install -r requirements.txt- Activate pre-commit hooks
pre-commit installMake sure to reactivate Pythons venv:
# For Linux / MacOS
source venv/bin/activate# For Windows Powershell
. ./venv/Scripts/Activate.ps1Increase version number using bump-my-version (commit all changes beforehand).
# Bump version
# bump-my-version bump <patch|minor|major> <config-files>
bump-my-version bump patch pyproject.tomlPush to main branch and see new version on PyPI
The action executes the following commands (can also be executed locally):
pip install -r requirements.txt
python -m build
FILE_NAME=`ls ./dist/ | grep .whl`
curl -F package=@dist/$FILE_NAME https://'${{ secrets.PACKAGE_INDEX_TOKEN }}'@push.fury.io/datenstreambedag/The uploaded package can be installed with the following command:
pip install --index-url https://pypi.fury.io/datenstreambedag/ hellodata_be_airflow_pod_operator_paramsTo get the push / deploy tokens, navigate to the according page on Gemfury and create the token you need.
Push tokens are used to push new packages to the registry.