reproject test-coverage: close bounds_policy + Inf backend gaps#2517
Merged
brendancol merged 2 commits intoMay 28, 2026
Merged
Conversation
Pass 2 of the test-coverage sweep on xrspatial.reproject (after the 2026-05-10 first pass). Adds 10 tests, all passing on a CUDA host. Closes two Cat 1 MEDIUM backend-coverage gaps: 1. bounds_policy (added in xarray-contrib#2187) was covered on numpy and dask+numpy but not on cupy or dask+cupy. TestBoundsPolicyCupy and TestBoundsPolicyDaskCupy pin raw, clamp, and bogus rejection on both GPU backends, plus a clamp-grid parity check against numpy. 2. test_reproject_handles_inf_input only covered eager numpy. The dask, cupy, and dask+cupy chunk workers each ship their own bilinear/cubic resampler so a regression raising on +/-Inf in any one backend would not surface from the existing test. Four new tests close the matrix: dask+numpy, cupy, dask+cupy with scattered +/-Inf cells, and cupy with an all-Inf raster pinning that no spurious finite cells appear in the output. Source unchanged. State CSV row updated to last_inspected=2026-05-27.
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.
Summary
Pass 2 of the test-coverage sweep on
xrspatial.reproject(the 2026-05-10first pass closed the bulk of the gaps; this catches the two backend-coverage
holes the new bounds_policy parameter and the existing Inf test left open).
10 new tests in
xrspatial/tests/test_reproject_coverage_2026_05_27.py,all passing on a CUDA host. Source untouched.
Closes two Cat 1 MEDIUM backend-coverage gaps:
bounds_policy(added in reproject: output-grid bounds use silent heuristics that can crop real data near singularities #2187) had numpy + dask+numpy coverage but nocupy / dask+cupy tests. A regression that dropped the kwarg from either
GPU dispatcher would ship undetected.
TestBoundsPolicyCupyandTestBoundsPolicyDaskCupypinraw,clamp, and the bogus-tokenrejection on both GPU backends, plus a clamp-grid parity check against
the numpy path.
test_reproject_handles_inf_inputonly covered eager numpy. The dask,cupy, and dask+cupy chunk workers each ship their own bilinear / cubic
resampler so a regression raising on +/-Inf in any one backend would
not surface from the existing test. Four new tests close the matrix:
dask+numpy,cupy, anddask+cupywith scattered +/-Inf cells,plus
cupywith an all-Inf raster pinning that no spurious finitecells appear in the output.
State CSV row updated to
last_inspected=2026-05-27.Test plan
pytest xrspatial/tests/test_reproject_coverage_2026_05_27.py -v)_validate_bounds_policyinreproject()flips the twobogus-token rejection tests red