Skip to content

Refuse malformed channels and mixed settings in range_check_issues - #79

Merged
guijacquemet merged 2 commits into
mainfrom
claude/ranges-summaries-59-58
Nov 7, 2026
Merged

guijacquemet merged 2 commits into
mainfrom
claude/ranges-summaries-59-58

Conversation

@guijacquemet

@guijacquemet guijacquemet commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #59

#58 is not included: bounding memory needs a new API with a contiguity precondition (or external sort), which the issue leaves to the owner.

Regression tests (tests/test_range_check_settings.py) run against main's source and fail there for behavioural reasons (10 failed, 1 passed; the pass is the NumPy-integer-accepted test):

  • mixed settings, all four variants (range, robust quantiles, central percentiles, min_central_bins), both input orders: Failed: DID NOT RAISE ValueError (main silently takes the first plane's settings)
  • channel True, 1.0, 1.5, "1", -1: Failed: DID NOT RAISE ValueError (main coerces with int())
  • channel None: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

On the branch: python tools/check.py gives 713 passed, 2 skipped (csbdeep missing). Outputs for valid inputs are bitwise identical (tools/dump_outputs.py SHA-256 dfd5e740...537e on main and branch).

🤖 Generated with Claude Code

https://claude.ai/code/session_01VbytvF3Gsa85ix8Ne2yMDW

Channels go through channel_indices (no int() coercion of True, 0.9 or
'1'); narrow checks of one channel made with different settings raise
IncompatibleRangeChecksError naming the planes instead of reporting the
first plane's settings for all. Fixes #59.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VbytvF3Gsa85ix8Ne2yMDW
The tests no longer import the new error class: they expect a generic
ValueError, so on main they run and fail because the channel is coerced
by int() and the first setting is silently taken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VbytvF3Gsa85ix8Ne2yMDW
@guijacquemet
guijacquemet marked this pull request as ready for review November 7, 2026 03:55
@guijacquemet
guijacquemet merged commit 2302444 into main Nov 7, 2026
8 checks passed
@guijacquemet
guijacquemet deleted the claude/ranges-summaries-59-58 branch November 7, 2026 03:55
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.

[Sad Catapella N8][Scientific reporting] range_check_issues silently combines incompatible range settings and coerces channel identifiers

2 participants