-
Notifications
You must be signed in to change notification settings - Fork 55
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
Relax version detection #189
Conversation
Some writers (like for the DANDI project) have stored the versions as floating point values (e.g. `0.2`). Though this won't be long-term sustainable, relaxing the version identification at this point seems unproblematic.
I've updated those files to "0.4" as a string. My bad. Hopefully I am the only one. |
Codecov Report
@@ Coverage Diff @@
## master #189 +/- ##
==========================================
+ Coverage 83.99% 84.00% +0.01%
==========================================
Files 12 12
Lines 1362 1388 +26
==========================================
+ Hits 1144 1166 +22
- Misses 218 222 +4
Continue to review full report at Codecov.
|
|
||
# Support floating-point versions like `0.2` | ||
if isinstance(version, float): | ||
version = str(version) |
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.
While this is primarily consumed at the reader level currently and hence quite downstream of the generation process, this raises the question of whether this library should also raise a WARN
level logging statement indicating the mismatch.
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.
Possibly, though I'm already annoyed by the format mismatch warnings. Perhaps we could differentiate between a more purely user (view()
) and developer (validate()
) context.
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.
I am quite annoyed by the format mismatch warning as well - happy to create an issue or even look into it 😄
In this scenario, the the warning is about a core issue with the data validation rather than exposing the internal guessing logic of the library so assuming I had to pick between the two, I would personally only keep the former. The idea of differentiating the usage contexts is interesting and possibly brings us back to the validation flag that @will-moore introduced while working on #189.
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.
I've found why it's duplicated and will open a PR (#190). We'll still need to decide on the first mismatch.
LGTM 👍 |
Thanks, @will-moore. Anyone have an opinion on the warning? Or shall I just record the fact (in code or an issue) that we may want to warn here in the future when there's a clear "dev" situation? |
As per the JSON schema, my assumption is that these datasets should throw a warning with the If so, no objection to getting this in its current form and the warning should naturally be appear as part of the validation framework. |
Some writers (like for the DANDI project) have stored
the versions as floating point values (e.g.
0.2
).Though this won't be long-term sustainable, relaxing
the version identification at this point seems
unproblematic.
cc: @LeeKamentsky