Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Enables nImage/napari reader support for remote image URIs (e.g. HTTP/S3 Zarr) by detecting remote filesystems and avoiding local-only in-memory heuristics, plus adds tests to exercise remote reads.
Changes:
- Add
nImage.is_remoteand use it to select dask-backed reading for remote sources. - Add
nImage.path_stemto derive layer-name stems from both local paths and URIs. - Add tests that open a remote OME-Zarr via
nImageand viaviewer.open(..., plugin="ndevio").
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/ndevio/nimage.py |
Introduces remote detection (is_remote), URI-aware naming (path_stem), and updates layer_data loading strategy. |
src/ndevio/utils/_layer_utils.py |
Broadens determine_in_memory typing/docs to accept str paths/URIs. |
tests/test_nimage.py |
Adds a remote Zarr read test for nImage. |
tests/test_napari_reader.py |
Adds a napari viewer test that opens a remote Zarr through the plugin. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Description
While investigating #50 and napari/docs#907, I realized that remote image reading is not possible with
nImageproperly.BioImageaccepts uri's, and reader plugins can implement remote file reading, such asbioio-ome-zarr. However, my memory check innImage.layer_datadoes not work for remote file systems, so instead this adds a property for knowing if the file is remote. It also interprets the filepath/uri stem for local and remote systems now.you can try out a really small remote with
viewer.open('https://uk1s3.embassy.ebi.ac.uk/ebi-ngff-challenge-2024/4ffaeed2-fa70-4907-820f-8a96ef683095.zarr', plugin='ndevio')