Skip to content

Test vegetation_roughness ndvi on dask+cupy backend#3497

Merged
brendancol merged 1 commit into
mainfrom
deep-sweep-test-coverage-flood-2026-06-25
Jun 25, 2026
Merged

Test vegetation_roughness ndvi on dask+cupy backend#3497
brendancol merged 1 commit into
mainfrom
deep-sweep-test-coverage-flood-2026-06-25

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

What

Adds a missing backend-coverage test for xrspatial.flood.vegetation_roughness.

The mode='ndvi' path on the dask+cupy backend
(_veg_roughness_ndvi_dask_cupy) was dispatched but never invoked by any
test. The mode='nlcd' path ran on all four backends, and ndvi ran on
numpy, cupy, and dask, leaving ndvi+dask+cupy as the one untested cell in
the matrix.

TestVegRoughnessDaskCuPy::test_ndvi_numpy_equals_dask_cupy mirrors the
existing nlcd dask+cupy test and asserts numpy-vs-dask+cupy equivalence
(including NaN propagation).

Verification

GPU-validated locally (CUDA available). New test passes; full
test_flood.py is 89 passed.

This is test-only; no source changes. No bug was surfaced.

Found by the test-coverage deep-sweep.

The ndvi dask+cupy dispatch path (_veg_roughness_ndvi_dask_cupy) was
registered but never exercised by a test: nlcd ran on all four backends,
but ndvi only ran on numpy, cupy, and dask. Add a numpy-vs-dask+cupy
equivalence test so the path is covered.

GPU-validated locally; full test_flood.py is 89 passed.
@brendancol brendancol merged commit e57bdd7 into main Jun 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant