Skip to content
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 should not rely on SHOULD "meta" field "data_returned" #675

Closed
ml-evs opened this issue Jan 16, 2021 · 1 comment · Fixed by #676
Closed

Validator should not rely on SHOULD "meta" field "data_returned" #675

ml-evs opened this issue Jan 16, 2021 · 1 comment · Fixed by #676
Labels
bug Something isn't working priority/high Issue or PR with a consensus of high priority validator Related to the OPTIMADE validator

Comments

@ml-evs
Copy link
Member

ml-evs commented Jan 16, 2021

Unfortunately, in many places, the validator relies on meta->data_returned when checking the consistency of filters. We can get around this by just disabling these checks when data_returned is not provided by the implementation.

Reported by @rartino:

Isn't the data_returned optional on SHOULD level? It isn't super easy to produce it in my implementation at the moment. I will probably get it implemented rather soon, but databases working with huge datasets can have a very difficult time producing an exact count of the number of hits of a query. See, e.g., google's hit count.

Originally posted by @rartino in Materials-Consortia/providers#53 (comment)

@ml-evs ml-evs added bug Something isn't working priority/high Issue or PR with a consensus of high priority validator Related to the OPTIMADE validator labels Jan 16, 2021
@rartino
Copy link
Contributor

rartino commented Jan 18, 2021

A closely related issue is that even if the implementation returns meta->data_returned, one of the tests checks if an empty filter returns the same number for meta->data_returned and meta->data_available. This test appears to fail with a red checkmark if meta->data_available is not present. That field is on MAY level, so it is a quite major bug to fail implementations on missing that field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/high Issue or PR with a consensus of high priority validator Related to the OPTIMADE validator
Projects
None yet
2 participants