resample: close test-coverage gaps surfaced by deep-sweep audit#2548
Merged
Conversation
Adds xrspatial/tests/test_resample_coverage_2026_05_27.py with 70 tests (68 passing, 2 skipped on documented dask cubic Nx1 limitation): - Cat 3 HIGH: Nx1 single-column input across all four backends and all eight methods. Existing tests covered 1x1 and 1xN strips but never width=1 with multi-row input. - Cat 2 MEDIUM: NaN parity for cupy and dask+cupy. Existing TestCuPyParity / TestDaskCuPyParity used random data without NaNs, so the weight-mask gate and spline-prepad GPU paths had no NaN coverage. - Cat 3 MEDIUM: all-equal-value input across methods (zero-variance / zero-gradient input that could expose divide-by-zero in weight-aware kernels). - Cat 5 MEDIUM: non-default dim names (lat/lon, latitude/longitude, channel for 3D) propagate without being renamed to y/x; per-dim units attrs round-trip. - Cat 3 MEDIUM: empty-raster (0 rows / 0 cols) behaviour pin. Filed issue #2547 for the cubic-on-dask Nx1 source bug surfaced by the audit; the two skipped tests gate on that fix landing. Source untouched -- coverage closure only.
…age-resample-2026-05-27
Contributor
Author
PR Review: resample test-coverage closuresTest-only PR, 70 tests across six classes targeting the gaps the deep-sweep audit named. Read the full file in worktree; no source touched. BlockersNone. Suggestions
Nits
What looks good
Checklist
|
- skip message for dask cubic Nx1 now references tracking issue #2547 for grep-ability when the source bug is fixed. - clarify the NaN-aware-average comment by pointing at _agg_mean / _nan_aware_* in resample.py rather than implying the behavior. - test_nx1_parity_numpy_vs_backends: use _to_numpy() for the numpy reference too, removing the .values vs _to_numpy() inconsistency. No test-count or behavior changes (68 passed, 2 skipped).
4 tasks
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
Test-only PR closing test-coverage gaps in
xrspatial.resamplesurfaced by
/deep-sweep test-coverageon 2026-05-27. Addstest_resample_coverage_2026_05_27.pywith 70 tests (68 passing,2 skipped on the documented dask cubic Nx1 limitation tracked in
#2547).
Gaps closed:
and all eight methods. Existing tests covered 1x1 and 1xN strips
but never width=1 with multiple rows.
cupyanddask+cupy. Existingparity tests used random data without NaNs, so the weight-mask
gate and spline-prepad GPU paths had no NaN coverage.
variance / zero gradient).
lat/lon,latitude/longitude,channel/lat/lon3D) propagatewithout being renamed to
y/x; per-dimunitsattrsround-trip.
Source untouched. Filed #2547 for the cubic-on-dask Nx1 source bug
the audit surfaced; the two skipped tests gate on that fix.
Test plan
pytest xrspatial/tests/test_resample_coverage_2026_05_27.py-> 68 passed, 2 skipped
pytest xrspatial/tests/test_resample.py xrspatial/tests/test_resample_coverage_2026_05_27.py-> 237passed, 2 skipped (no regressions in existing suite)