-
Notifications
You must be signed in to change notification settings - Fork 11
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
enh: allow checking to see data are matched but allow for missing fields #48
Conversation
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
==========================================
+ Coverage 95.79% 95.87% +0.07%
==========================================
Files 11 11
Lines 1023 1042 +19
==========================================
+ Hits 980 999 +19
Misses 43 43
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@satra I think it would be more useful to give |
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.
If decided to proceed this way (I think @jwodder 's comment on a dedicated base class might be a more "kosher"), left a comment/suggestiong on needed adjustment to docstring
what this checks is that fields are valid when provided, not if they are required. in fact this explicitly does not care about required. for dandiset this is important at the API level so that metadata can be updated through the UI, and that a user could POST dandiset meta through the API. i don't think a base class buys us anything in this use case. further fields required can change across schema versions, and hence any base class will also have to support this. a validation function can take that into account a lot more easily than attributes in a class. |
Co-authored-by: Yaroslav Halchenko <[email protected]>
oh, so it sounds like would need some rudimentary test. longer term: adding such a flag we are getting into the territory of flags/settings on what to ignore, and might end up breeding other boolean flags later on such as |
adding a mechanism to allow checking that a metadata blob for dandiset or asset has proper values given the schema, but may have missing fields. these metadata objects should be ok for posting but not for publishing.
@dchiquito and @jwodder - would this be useful?