-
Notifications
You must be signed in to change notification settings - Fork 44
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
Validator: remove reliance on meta fields and check mandatory queries #676
Conversation
Codecov Report
@@ Coverage Diff @@
## master #676 +/- ##
==========================================
- Coverage 93.58% 93.27% -0.32%
==========================================
Files 61 61
Lines 3306 3344 +38
==========================================
+ Hits 3094 3119 +25
- Misses 212 225 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
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.
I have some suggested changes. It's a bit difficult for me to discern the functional changes and their consequence from the diff, but I'll give it another try once you've had a chance to respond to my suggested changes and comments.
283a1e4
to
4388e53
Compare
Just fixed a couple more issues arising after testing this on some other implementations; we no longer have any internal failures on the current state of OMDB, OQMD or COD. Happy to split this PR up if that helps, but the commit history should be sensible. |
4388e53
to
86a6066
Compare
I would argue they all should still fail due to them not supporting the mandatory query on
Edit: But of course, there shouldn't be internal errors in the validator. So your statement still stands (read it a bit too quickly). |
By internal failures I meant that they still fail validation but don't crash the validator! Though you raise a good point; we have no concept of required queries yet. This may be where we draw the line at the validator being "necessary not not sufficient" for OPTIMADE compliance. Perhaps you could raise an issue for this? I have another issue to raise at some point too, about default response fields... |
Yeah, sorry. Saw that. Also edited my post.
Done, see #678. |
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.
The None
additions are not part of the "requested changes".
I think there's a discrepancy for the providers
submodule here? Did you update that in this PR? I'll run the dependabot instead.
Just merged this in, updating the |
ec9051b
to
0740530
Compare
Happy to split this into multiple PRs if this is getting unwieldy... |
0740530
to
cbd2556
Compare
With the creeping additions it quickly gets difficult to discern what is connected to what, for sure. But at the same time, I'd like to get this done. |
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.
A final comment for me, in this iteration of the PR 😅
cbd2556
to
3cf145b
Compare
- Ensure return from _get_endpoint is always properly sanitized - Improve displayed request by adapting to multistage parameter - Improve some error message detail and fixed a docstring
3cf145b
to
4fe41d6
Compare
Co-authored-by: Casper Welzel Andersen <[email protected]>
4fe41d6
to
cae2035
Compare
meta->data_returned
when it is not provided.meta->data_available
#677 by ignoring checks that requiremeta->data_available
when not provided.structure_features
#678 by providing fallback query values for enum fields that are normally empty.