Repository navigation
Give every dependency a minimum version and test them in CI - #271
Merged
Merged
Conversation
Contributor
Author
|
This paragraph was very confusingly worded, making it sound like this arrangement was purely internally incompatible:
I rewrote that paragraph to explain the logic there a bit better. |
matth-love
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Gives every dependency in
pyproject.tomla minimum version and adds CI runs that test the suite with each dependency at that minimum and on Python 3.14. No existing issue covers this.The conda-forge recipe will also need these new minimums when the next release goes out.
Minimum versions
scipy>=1.11.2,pyyaml>=6.0.1,matplotlib>=3.8.0. matplotlib has 3.12 wheels from 3.7.3, but 3.8.0 matches IVERT's minimum.laspy[lazrs,laszip]>=2.5.1,pyshp>=2.3.1,click>=8.1.7,requests>=2.31.0.numpy>1.24becomesnumpy>=1.26.0. No numpy release before 1.26.0 has Python 3.12 wheels, and 1.24/1.25 don't build on it.shapely>=2.0.0becomesshapely>=2.0.3, andpyogrio>=0.7.0becomespyogrio>=0.8.0; pandas and h5py get minimums ofpandas>=2.1.2andh5py>=3.11.0for the same reason. Earlier releases were built against numpy 1 but don't cap it, so a resolver can install them alongside numpy 2, where they fail to import. Each new floor avoids that one of two ways: shapely 2.0.3 and pandas 2.1.2 declarenumpy<2, so in a numpy-2 environment the resolver skips them for a later release of each package; h5py 3.11.0 and pyogrio 0.8.0 run on numpy 2 directly, but are backward-compatible with a numpy 1.x environnment.fetchez,transformez,rasterio,geopandasandpyprojalready had minimums and are unchanged.The optional extras and dependency groups are unchanged.
numpy 2.0.0 workaround
numpy 2.0.0, and only that release, returns the inverse from
np.unique(..., axis=0, return_inverse=True)with an extra dimension,(n, 1)instead of(n,). 2.0.1 reverted the change.ClaimGridFilterandWaterSurfaceFilterboth use that call, so under numpy 2.0.0 they fail ("non-broadcastable output operand" and "object too deep for desired array"). Each now flattens the inverse with.ravel(). That returns the same array on every other numpy version and gives the 1-D result on 2.0.0. With a synthetic water mask,WaterSurfaceFilter's output is byte-for-byte the same on numpy 1.26.0, 2.0.0 and 2.5.3, and the full suite passes under 2.0.0.CI
The
test.ymljob becomes a matrix of three runs:highestdependencies (the newest versions, as the old single run used)highestdependencieslowest-directdependencies: each direct dependency at its minimum, transitive ones at their newest compatible versions. This run fails when globato starts using something newer than a stated minimum, which means that minimum needs raising.uv synccan't resolve to the lowest versions for the package alone, so the runs install withuv pip install --resolution ...into the environment thatsetup-uvactivates. Thetestgroup is then installed under a constraint of what's already there, so it can't lift a dependency off its minimum. Tests run withpytestdirectly rather thanuv run, which would re-sync the environment. Check names becomepytest (Python <version>, <resolution> dependencies).Testing
Replaying each matrix run's install steps in a fresh environment, 294 tests pass (1 skipped) on Python 3.12 and 3.14 with
highestand on 3.12 withlowest-direct. zizmor reports the same findings ontest.ymlas onmain, and none new.Checklist
closes #1)CHANGELOG.mdupdatedREADME.mdupdated