Simplify Pyramidal5DImageData open API#76
Draft
stefanhahmann wants to merge 6 commits into
Draft
Conversation
7382e60 to
37bb698
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, ZarrOpeningSettings]) Adds BackendMismatchException for calls where settings specify a conflicting backend. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Data.open() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…backend validation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37bb698 to
b47ba14
Compare
|
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.



Summary
(Context, URI, Integer preferredWidth)factory-method signatures onPyramidal5DImageDatawith(Context, URI)(no-settings) and(Context, URI, ZarrOpeningSettings)overloads, removing the rawInteger preferredWidthparameter from the public APIZarrOpeningSettings.defaultSettings()factory method andeffectivePreferredWidth()helper, which encapsulate the "null width for highest resolution" logic that was previously scattered across callersBackendMismatchException(unchecked) thrown whenopenWithN5/openWithZarrJavareceive settings that specify the wrong backend, making misuse of the specific-backend methods fail fast with a clear messageZarrOpenActions.openMultiScaleImage()to delegate entirely toPyramidal5DImageData.open(), removing the inline switch on backendPrefServicelook-up fromPyramidal5DImageData.open(); settings are now passed in by the caller rather than read from persisted preferences inside the factory methodZarrOpenActionsconstructors package-private (they were only ever called from within the package)Test plan
mvn testpasses (all existing tests updated to new API, newBackendMismatchExceptiontests added)testOpenWithN5ThrowsOnZarrJavaBackendSettings–openWithN5rejects ZARR_JAVA settingstestOpenWithZarrJavaThrowsOnN5BackendSettings–openWithZarrJavarejects N5 settingstestOpenWithDefaultSettingsUsesN5Backend– no-argopen()uses N5 as defaulttestOpenWithPreferredWidthN5/testOpenWithPreferredWidthZarrJava– resolution selection still works via settings