Skip to content

Refuse a resampling gdalcubes would read as near (#96) - #98

Merged
NewGraphEnvironment merged 5 commits into
mainfrom
96-resampling-typo-silently-becomes-near-in
Oct 1, 2026
Merged

NewGraphEnvironment merged 5 commits into
mainfrom
96-resampling-typo-silently-becomes-near-in

Conversation

@NewGraphEnvironment

Copy link
Copy Markdown
Owner

Summary

Related Issues

Test plan

  • devtools::test(): FAIL 0 | PASS 1508 | SKIP 16
  • Behaviour pin: every allowed value round-trips through cube_view() unchanged, bilinaer comes back near, and the aliases come back as their canonical names
  • Mutation table, 11 of 11 killed: dropping any one of the five checks, widening or narrowing the set, lower-casing the return, dropping the alias hint, or naming the wrong fallback each turns a test red
  • /code-check: round 1 found one vacuous assertion ("near" also matched the allowed set printed in the headline), now fixed. Rounds 2 and 3 were clean, and a docs fact-check round was clean
  • devtools::document() and lintr clean on the touched files

Notes

  • BULK scale test not run: this is argument validation before any read, so it changes no raster computation and has no memory or runtime surface.
  • Old caches: files cached under a value now refused hold nearest-neighbour data. Nothing reads them again, and only dft_cache_clear() reclaims them. NEWS says so.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN

NewGraphEnvironment and others added 5 commits October 1, 2026 07:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
gdalcubes::cube_view() reads an unknown resampling as "near" with no
error, so a typo returned and cached a nearest-neighbour cube.
resampling_check() admits only the twelve values measured to survive the
cube_view() round trip, refuses the honoured aliases mean/median with the
spelling to use, and runs at the three entry points and both cube_view()
call sites. aggregation_check() and resampling_check() share one helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PRhUJsuKABLfpBGktPoiBN
@NewGraphEnvironment
NewGraphEnvironment merged commit c7476ba into main Oct 1, 2026
1 check passed
@NewGraphEnvironment
NewGraphEnvironment deleted the 96-resampling-typo-silently-becomes-near-in branch October 1, 2026 15:21
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.

resampling typo silently becomes "near" in dft_stac_cube / dft_stac_composite / dft_stac_fetch

1 participant