Skip to content

reproject test-coverage: close bounds_policy + Inf backend gaps#2517

Merged
brendancol merged 2 commits into
xarray-contrib:mainfrom
brendancol:deep-sweep-test-coverage-reproject-2026-05-27
May 28, 2026
Merged

reproject test-coverage: close bounds_policy + Inf backend gaps#2517
brendancol merged 2 commits into
xarray-contrib:mainfrom
brendancol:deep-sweep-test-coverage-reproject-2026-05-27

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

Pass 2 of the test-coverage sweep on xrspatial.reproject (the 2026-05-10
first 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:

  1. 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 no
    cupy / dask+cupy tests. A regression that dropped the kwarg from either
    GPU dispatcher would ship undetected. TestBoundsPolicyCupy and
    TestBoundsPolicyDaskCupy pin raw, clamp, and the bogus-token
    rejection on both GPU backends, plus a clamp-grid parity check against
    the numpy path.

  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, and dask+cupy with scattered +/-Inf cells,
    plus cupy with an all-Inf raster pinning that no spurious finite
    cells appear in the output.

State CSV row updated to last_inspected=2026-05-27.

Test plan

  • All 10 new tests pass locally on a CUDA host (pytest xrspatial/tests/test_reproject_coverage_2026_05_27.py -v)
  • Mutation check: bypassing _validate_bounds_policy in reproject() flips the two bogus-token rejection tests red
  • Full reproject test suite still passes
  • CI green on the project's GPU runner

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.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 27, 2026
@brendancol brendancol merged commit b23d411 into xarray-contrib:main May 28, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant