Repository navigation
Refuse malformed channels and mixed settings in range_check_issues - #79
Merged
Merged
Conversation
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
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.
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):Failed: DID NOT RAISE ValueError(main silently takes the first plane's settings)True,1.0,1.5,"1",-1:Failed: DID NOT RAISE ValueError(main coerces withint())None:TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'On the branch:
python tools/check.pygives 713 passed, 2 skipped (csbdeep missing). Outputs for valid inputs are bitwise identical (tools/dump_outputs.pySHA-256 dfd5e740...537e on main and branch).🤖 Generated with Claude Code
https://claude.ai/code/session_01VbytvF3Gsa85ix8Ne2yMDW