-
Notifications
You must be signed in to change notification settings - Fork 51
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
DependencyFix/Upgrade ome-types to 0.3.4 #522
Conversation
In version 0.3.4, ome-types restricts pydantic to < 2.0. This upgrade prevents aicsimageio from importing ome-types 0.3.3, which will crash if pydantic 2.0 is installed, making aicsimageio unusable.
0432879
to
453cee6
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #522 +/- ##
==========================================
- Coverage 94.03% 93.98% -0.05%
==========================================
Files 53 53
Lines 4659 4658 -1
==========================================
- Hits 4381 4378 -3
- Misses 278 280 +2
☔ View full report in Codecov by Sentry. |
fwiw, ome-types v0.4.0 will also be compatible with pydantic2. (not that this shouldn't still be merged) |
Great! Then I let you decide what makes more sense, considering |
merge? |
The last commit caused build breakage. It changes dependency versions. |
I may have got the merge wrong. The only change we want here is ome types >= 0.3.4 correct? |
yeah, that should work |
Will make sure tests pass and then merge asap |
I'm wondering if 0.3.4 raises a different exception than 0.4.0+ for trying to parse "bad ome string".
|
ah, yes that's possible. do you need to be asserting the specific exception type of an external library? (if it changed the behavior of your usage, it would make sense, but here it kinda just seems like you're testing an external library) |
Cleaning this up revealed one more test that has different results in ome-types 0.3.4 vs 0.4.1. This now has to do with our ome-tiff metadata parsing and where we detect whether or not we need to do our own auto-cleanup. I'm tempted to just remove the test cases for this since they fail (expectedly) for 0.3.4 and pass (unexpectedly) for 0.4.1. |
Yeah I also noticed that in my tests... that aicsimagio was essentially asserting that something would be an error forever 😀 Lots of things were improved that will probably ultimately remove your need for the special cleanup. I agree just remove the cases. |
Gonna do it. 😀 |
Fully supportive of removing the tests! I think I remember when those tests were added and they were around the same time as our work on fixing some bad metadata cases and such iirc. Thanks for all the work and thoughts on this everyone! |
Description
In version 0.3.4,
ome-types
restrictspydantic
to < 2.0.This upgrade prevents
aicsimageio
from importingome-types
0.3.3, which will crash withpydantic
2.0 (released yesterday), makingaicsimageio
unusable.Pull request recommendations:
Thanks for contributing!