-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE1Adapter Part 2 - adding the NPE1Adapter object. #125
Conversation
Codecov Report
@@ Coverage Diff @@
## main #125 +/- ##
===========================================
+ Coverage 98.10% 100.00% +1.89%
===========================================
Files 24 25 +1
Lines 1581 1650 +69
===========================================
+ Hits 1551 1650 +99
+ Misses 30 0 -30
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. The docs in _from_npe1 are good. I thought a comment giving a bit of a high level introduction to what the shim was could go in _npe1_shim.py.
renamed to NPE1Adapter and added a longer docstring to NPE1Adapter explaining a bit more how it works. |
Breaking up #86 into three steps. This is part 2 (but it contains #124 which can be reviewed first)
This adds the
NPE1Adapter
itself, and makes the plugin manager aware of it._from_dist
function now creates either aPluginManifest
or anNPE1Shim
based on the entry points offered by the pluginNPE1Adapter
is a subclass ofPluginManifest
that can lazily load contributions (whenmanifest.contributions
is accessed), by callingmanifest_from_npe1
which was updated in NPE1Adapter Part 1 - updated _from_npe1 conversion logic to prepare for locally defined objects #124_npe1_adapters
during plugin discovery and gains a new methodindex_npe1_adapters
that napari can use to force importing (or loading from cache) of all npe1 plugins.Caching behavior comes in the next PR