Notes:
- Numpy build version is in
pyproject.toml
while the runtime version is inrequirements.txt
- Check which Python versions a new version of Numpy is compatible with. Also check ortools as this is slower to update.
- Change the Python versions in the GitHub action. Also change the badge in the README and the comment in the installation section.
- You might need to increase the ciwheelbuild version in the GitHub action to be able to use new Python versions
- Check ciwheelbuild example if you need to change runner image versions (e.g. MacOS, Windows or Ubuntu). Change as little as possible so not to run into other errors: https://github.com/pypa/cibuildwheel/blob/main/examples/github-with-qemu.yml
- Add changes to the change log
Steps:
- Build and test locally:
To build Cython extensions in source:
make compile
To test:
pytest
-
Push changes to GitHub to build it for all platforms (if you get errors check notes above)
-
Add changes to change log and bump version (major, minor or patch). Push changes (so dist have new version):
bump2version patch
- Download distributions (artifacts)
make download-dists ID=$BUILD_ID
- Upload to test PyPi (you can get PyPI API token in password manager)
make check-dist
make test-pypi
- Activate virtual env (might need to
make venv-create
)
source k-means-env/bin/activate
- Test install (in virtual env. Remember to cd out of k-means-constrained folder):
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple k-means-constrained
- Then push to real PyPI:
make pypi-upload