Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.75 KB

README_dev.md

File metadata and controls

64 lines (46 loc) · 1.75 KB

Build and test

Notes:

  • Numpy build version is in pyproject.toml while the runtime version is in requirements.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:

  1. Build and test locally:

To build Cython extensions in source:

make compile

To test:

pytest
  1. Push changes to GitHub to build it for all platforms (if you get errors check notes above)

  2. Add changes to change log and bump version (major, minor or patch). Push changes (so dist have new version):

bump2version patch
  1. Download distributions (artifacts)
make download-dists ID=$BUILD_ID
  1. Upload to test PyPi (you can get PyPI API token in password manager)
make check-dist
make test-pypi
  1. Activate virtual env (might need to make venv-create)
source k-means-env/bin/activate
  1. 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
  1. Then push to real PyPI:
make pypi-upload