Open duncanmmacleod opened 1 month ago
Thanks for finding this and helping to improve the package, @duncanmmacleod! I have been meaning to update the package for a long time now but didn't get a chance... One of the big changes I want to make is doing away with using pickling to store data, since it makes the code more brittle (a user might end up trying to load a pickle from a different version of the code, which would lead to bugs that can't be explained by looking at just one version of the code). I meant to make that change at the same time as updating to more modern python and numpy, but maybe I shouldn't let perfect be the enemy of the good...
Background out of the way — do you recommend some automatic way to test the full python/numpy/scipy/etc. matrix of versions? Or is this overkill, and I should just pick minimum versions of each one to try to support?
Background out of the way — do you recommend some automatic way to test the full python/numpy/scipy/etc. matrix of versions? Or is this overkill, and I should just pick minimum versions of each one to try to support?
Github actions has good support for job matrices, but I would recommend only using that to test the various Python versions. It looks like you have that configured already, but the 'matrix' only includes a single chosen version to test:
As for numpy/scipy what I would recommend is updating the package metadata (setup.py
, but you could migrate to pyproject.toml
) to include a minimum specification for each of those packages, and then configuring a github actions workflow to install those minimum versions and test those (this example from the GWpy project (before it was migrated to gitlab.com) does that, but it's a bit brute force). That way you test the oldest supported version, and the newest version (which will be the default in the 'normal' test job) - testing everything in between is indeed overkill.
I might also recommend that the 'normal' test job matrix (probably the 'not slow' pytest workflow) be configured to run nightly, so you can catch incompatibilities as soon as they are released upstream. That may any up being annoying for your developer workflow, but it's one way to discover things automatically (the relevant cron
syntax is included in the GWpy workflow for testing minimal dependencies, if you're interested).
This project is incompatible with numpy 2, meaning new deployments fail pretty quickly:
Consider this snippet:
which installs this set of packages:
which results in this error:
It looks like a fairly trivial change for this error, but this might be the tip of the proverbial iceberg.