-
Notifications
You must be signed in to change notification settings - Fork 3
Package release
On a local branch, do the following:
- Update the CHANGELOG file, reflecting the changes done between the current and new versions.
- increment the version of the package in anonipy/__init__.py. Make sure the increment is the same as the new release version.
- Push the changes on GitHub's main branch:
git add CHANGELOG.md anonipy/__init__.py git commit -m "Increment version" git push
On GitHub, make a new release by:
- Go to Releases, found in the right metadata section
- Click Draft a new release
- Input a new tag in Choose a tag reflecting the changes:
- Patch: if it contains bug fixes (ex: 1.2.3 → 1.2.4)
- Minor: if it contains new non-breaking features (ex: 1.2.3 → 1.3.0)
- Major: if it contains new breaking features (ex: 1.2.3 → 2.0.0)
- Click Generate release notes
- Check the release note
- Select Publish release
This will trigger GitHub Actions to create a new binary and publish the latest version to PyPI.
Do this only if something goes wrong with the automatic pipeline.
Make sure you have configured PyPI correctly (use of tokens, etc.).
To build the package, run:
# upgrade the build package
python -m pip install --upgrade build
# build the package
python -m build
To deploy the package, run:
# upgrade the twine package
python -m pip install --upgrade twine
# deploy the package to testpypi
python -m twine upload --repository testpypi dist/*
Next, to test the package published on testpypi, run:
# install a virtual environment
python -m venv venv
# activate the environment
. ./venv/bin/activate
# install the package
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
anonipy
This way, you can test the package without publishing it.
Once the testing is done successfully, run the following commands:
# upgrade the twine package
python -m pip install --upgrade twine
# deploy the package to pypi
python -m twine upload dist/*
Anonipy is developed by the Department for Artificial Intelligence at the Jozef Stefan Institute, and other contributors.
The project has received funding from the European Union's Horizon Europe research and innovation programme under Grant Agreement No 101080288 (PREPARE).