Skip to content

feat: add URL IO utility widget - #151

Open
jo-mueller wants to merge 7 commits into
ome:mainfrom
jo-mueller:add-URL-utility-widget
Open

feat: add URL IO utility widget#151
jo-mueller wants to merge 7 commits into
ome:mainfrom
jo-mueller:add-URL-utility-widget

Conversation

@jo-mueller

@jo-mueller jo-mueller commented May 11, 2026

Copy link
Copy Markdown
Contributor

@will-moore just a small feature directly following in the wake of #123: This PR adds a small IO utility to open ome-zarrs from remote URLs directly from the napari UI:

image

Paste the URL, hit Import and the rest is doing the same as the reader code. The widget ids available under File > IO utilities > Import OME-ZARR from URL

@jo-mueller jo-mueller added the enhancement New feature or request label May 11, 2026
@jo-mueller
jo-mueller requested review from Copilot and will-moore and removed request for will-moore May 11, 2026 12:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a napari “IO utility” widget that lets users paste a remote OME-Zarr URL in the UI and import it via the existing reader pipeline, and wires the widget into the napari manifest/plugin entry-point configuration.

Changes:

  • Define a napari.manifest entry point in pyproject.toml and extend the manifest to register a new command/widget + File menu item.
  • Add a new import_from_url magicgui-based widget that calls the existing reader and adds returned layers to the current viewer.
  • Update isort configuration to recognize magicgui as a third-party import.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
pyproject.toml Switches to explicit napari.manifest entry point for plugin discovery.
napari_ome_zarr/napari.yaml Registers the new URL importer command, menu entry, and widget in the napari manifest.
napari_ome_zarr/_widgets.py Implements the URL import widget and layer-adding behavior.
.isort.cfg Adds magicgui to known third-party modules for import sorting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment thread napari_ome_zarr/_widgets.py
Comment thread napari_ome_zarr/_widgets.py
Comment thread napari_ome_zarr/_widgets.py
Comment thread napari_ome_zarr/_widgets.py

@will-moore will-moore left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works fine and is a nice addition to the plugin.
Code looks good.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.80%. Comparing base (40bc4a4) to head (7a27cd9).

Files with missing lines Patch % Lines
napari_ome_zarr/_widgets.py 0.00% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
- Coverage   86.82%   83.80%   -3.02%     
==========================================
  Files           5        5              
  Lines         516      531      +15     
==========================================
- Hits          448      445       -3     
- Misses         68       86      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@psobolewskiPhD

Copy link
Copy Markdown
Contributor

FYI this already should work with just File > New from clipboard if the link is on your clipboard!
We have an issue to add Open URI to the File menu....

@jo-mueller

Copy link
Copy Markdown
Contributor Author

@psobolewskiPhD cool feature! Do you know by any chance since when this is in napari? Currently napari-ome-zarr pins napari>=0.4.0 but that feature is probably a bit younger ^^

@psobolewskiPhD

Copy link
Copy Markdown
Contributor

Looks like 0.5.0 (which also made async work, which is pretty crucial to this plugin IMO):
napari/napari#6532

Anyhow, I don't intend to dissuade this widget, just pointing an existing feature. Ideally we'd have a proper dialog in napari so every plugin could use it instead of rolling their own!

@jo-mueller

Copy link
Copy Markdown
Contributor Author

Yeah...0.5 is probably a reasonable pin by now :) Also now worries about dissuading, I'm always happy to discover new functionality. In that case I'd just replace this PR by a note in the docs on how to open URLs from the UI.

@psobolewskiPhD

psobolewskiPhD commented May 12, 2026

Copy link
Copy Markdown
Contributor

A tip about New Image from Clipboard is on the welcome screen of napari (the canvas when no layers are present), but I guess folks can quickly gloss over that.

In that case I'd just replace this PR by a note in the docs on how to open URLs from the UI.

Or a PR to napari to implement the dialog 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants