-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add check for passed reader contribution #301
Conversation
Codecov Report
@@ Coverage Diff @@
## main #301 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 37 37
Lines 2790 2811 +21
=========================================
+ Hits 2790 2811 +21
|
Will update this with an additional test and fix pre-commit checks if people are happy with this direction |
Ok I was a little hasty with my approval, mostly to indicate that I am happy with the direction, but in a longer review with @Czaki during community meeting we discussed the following issues:
Just had a chat with @DragaDoncila who says fixes are incoming though! 😊 |
mypy was complaining and I made it stop but idk if it was the right way to do it |
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 to me, but I humbly submit some unsolicited nitpicky readability suggestions.
Co-authored-by: Ashley Anderson <aganders3@gmail.com>
Co-authored-by: Ashley Anderson <aganders3@gmail.com>
Thank you @aganders3 those were great! So much neater now 😊 I've added more tests and I think the only remaining failure is |
Idk what this coverage failure is all of a sudden 🥲 |
Coverage is just failing to upload. I was hoping it was a transient error but maybe a token expired? |
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.
LGTM! Left a couple suggestions that you can take or leave.
Co-authored-by: Nathan Clack <nclack@gmail.com>
Co-authored-by: Nathan Clack <nclack@gmail.com>
@nclack I've updated with your suggestions and I think this can go in. Note that #6016 will contain the fix for the currently failing |
Following the report here , this PR updates the
_read
function to check if a specific reader contribution of the formplugin_name.reader_contribution
was passed asplugin_name
. This worked before #297 (though it was not part of the intended public API), but will not work withnpe2>0.7.0
without this change.Note that this PR does not throw a specific error if the given plugin doesn't exist - we can add a check for that but it's actually non-trivial since the only public reader method atm is
iter_compatible_readers
. We arguably should never be passing a non-existent plugin this level deep so maybe that's ok.No doubt
napari
tests will now fail, but I will go and make those updates separately...cc @Czaki @psobolewskiPhD