coralnet / pyspacer

Python based tools for spatial image analysis
MIT License
7 stars 3 forks source link

Supported Pythons: 3.8 to 3.10 -> 3.10 to 3.11 #96

Closed StephenChan closed 6 months ago

StephenChan commented 7 months ago

Doing this because I keep accidentally relying on Python 3.10 stuff (mainly related to type annotations), and there currently doesn't seem to be a need for 3.8/3.9 support (CoralNet and MERMAID use 3.10). And 3.11 support didn't seem like that much of a stretch.

torch and torchvision accepted versions have been relaxed to accommodate Python 3.11 (torch==1.13.1 to torch>=1.13.1,<2.3; torchvision==0.14.1 to torchvision>=0.14.1,<0.18). Hopefully that works out in GitHub's CI.

If CI passes, I'll just merge this whenever my next PR is ready to go; but in the meantime, reviews are welcome.

StephenChan commented 7 months ago

I did end up making some changes to the CI structure. Instead of using a single requirements.txt which is tested on each supported Python version, now there are 3 requirements files:

And now CI runs those on Python 3.10, 3.10, and 3.11 respectively. The advantage over the old way is that now the pyproject.toml version-ranges are CI-tested. I'm not sure if this way of doing it reflects a common practice in Python package development, but it makes sense to me at the moment, at least.

StephenChan commented 6 months ago

As stated previously:

If CI passes, I'll just merge this whenever my next PR is ready to go