test(fire): cover dask+cupy dispatch and metadata preservation#3444
Merged
Conversation
Every fire function registers a dask+cupy backend, but only dnbr had a test that actually ran it. The other six (rdnbr, burn_severity_class, fireline_intensity, flame_length, rate_of_spread, kbdi) exercised that dispatch path with zero coverage. Only dnbr also checked that input attrs, coords, and dims survive the call. Adds a test_numpy_equals_dask_cupy and a test_output_preserves_metadata for each of the six. All 66 fire tests pass on a CUDA host. Tests only, no source change.
…age-fire-2026-06-19 # Conflicts: # .claude/sweep-test-coverage-state.csv
Contributor
Author
|
Sweep audit summary (test-coverage, module
All 73 |
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.
What
Every function in the
firemodule registers adask+cupybackend in itsArrayTypeFunctionMapping, but onlydnbrhad a test that actually ran that path. The other six (rdnbr,burn_severity_class,fireline_intensity,flame_length,rate_of_spread,kbdi) exercised their dask+cupy dispatch with zero coverage. Onlydnbralso asserted that inputattrs,coords, anddimssurvive the call.This adds, for each of the six:
test_numpy_equals_dask_cupy: numpy/dask+cupy parity, matching the existingdnbrpatterntest_output_preserves_metadata: viageneral_output_checksVerification
All 73
test_fire.pytests pass on a CUDA host (cupy 13.6, numba CUDA available), including the 35 backend/metadata/dtype tests, none skipped. The branch is merged up to currentmain, so this composes with the recently merged #3396 (dask+numpy dtype fix) and #3397 (fire.py style cleanup).Tests only, no source change. Found by the test-coverage sweep.
Gap found, not fixed (out of scope)
Inf-input coverage is still missing across the module. Low severity: these are pure per-cell math ops, so an Inf flows through the arithmetic rather than hitting a kernel-boundary path. Left for a follow-up rather than bundled here.