Skip to content

Conversation

@TimMonko
Copy link
Member

@TimMonko TimMonko commented Dec 11, 2025

References and relevant issues

Depends on bioio-devs/bioio#162 / bioio v3.2.0

Description

  1. Remove bespoke prioritization system
  2. Just detect installed plugins and offer suggestions to install known bioio plugins if the file can't be read by the currently installed
  3. Depends on bioio's new deterministic orderering (fewest suffixes are prioritized as more specific)
  4. Changes default "preferred_reader" setting to None, and passes this now as reader=[Reader] to allow fallback to bioio's ordering (though this fallback is in nImage now)
  5. updates extensions used by directly copying from bioio libraries
  6. simplifies napari reader check to just pass forward with less checks, expecting that our extensions check by napari will cover it

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies the codebase by delegating reader selection and fallback to bioio's internal priority system (bioio#162) rather than maintaining custom logic. The changes streamline the API by removing the determine_reader_plugin function and having nImage pass preferred readers as priority lists to bioio for automatic fallback handling.

Key Changes

  • Removed determine_reader_plugin function in favor of bioio's native priority system
  • Modified nImage to accept reader priority lists and handle fallback via bioio
  • Changed preferred_reader default from bioio-ome-tiff to null to enable automatic selection
  • Added get_installed_plugins() utility for fast plugin detection via entry_points

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/ndevio/_plugin_manager.py Simplified to focus only on installation suggestions, removed reader selection logic
src/ndevio/nimage.py Removed determine_reader_plugin, added _get_preferred_reader_list to pass priority to bioio
src/ndevio/_napari_reader.py Simplified reader function to use nImage's automatic reader selection
src/ndevio/_bioio_plugin_utils.py Added get_installed_plugins() function for fast plugin detection
src/ndevio/widgets/_plugin_install_widget.py Updated to use BIOIO_PLUGINS directly instead of manager.known_plugins
src/ndevio/ndev_settings.yaml Changed preferred_reader default to null for automatic selection
.pre-commit-config.yaml Excluded ndev_settings.yaml from check-yaml hook
tests/test_plugin_manager.py Updated tests to reflect simplified API
tests/test_plugin_installer_widget.py Updated tests to work with new plugin detection
tests/test_napari_reader.py Simplified tests to reflect new error handling flow
tests/test_nimage.py Updated comment referencing renamed function

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

@TimMonko TimMonko marked this pull request as draft December 12, 2025 17:44
@TimMonko TimMonko changed the title Use plugin priority from bioio to simplify code path Use new plugin priority from bioio to simplify code path Dec 23, 2025
@TimMonko TimMonko marked this pull request as ready for review December 23, 2025 23:40
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

❌ Patch coverage is 97.10145% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ndevio/_napari_reader.py 95.45% 1 Missing ⚠️
src/ndevio/nimage.py 97.14% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


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

@TimMonko TimMonko merged commit 74ca8b3 into ndev-kit:main Dec 24, 2025
12 checks passed
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.

1 participant