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

Overzealous validation of substring comparisons for chemical formula fields #1024

Closed
ml-evs opened this issue Dec 17, 2021 · 1 comment · Fixed by #1025
Closed

Overzealous validation of substring comparisons for chemical formula fields #1024

ml-evs opened this issue Dec 17, 2021 · 1 comment · Fixed by #1025
Assignees
Labels
bug Something isn't working priority/medium Issue or PR with a consensus of medium priority validator Related to the OPTIMADE validator

Comments

@ml-evs
Copy link
Member

ml-evs commented Dec 17, 2021

Performing substring comparisons on chemical_formula_anonymous is optional, and is tricky for databases that do not directly store the same format of the formula.

From 7.2.7 chemical_formula_anonymous in the spec:

Query: MUST be a queryable property. However, support for filters using partial string matching with this property is OPTIONAL (i.e., BEGINS WITH, ENDS WITH, and CONTAINS).

The validator currently fails if a database returns 501 Not Implemented for a STARTS, ENDS or CONTAINS query, when it should just let this slide. Related to and uncovered in wolverton-research-group/qmpy#128.

@ml-evs ml-evs added bug Something isn't working priority/medium Issue or PR with a consensus of medium priority validator Related to the OPTIMADE validator labels Dec 17, 2021
@ml-evs
Copy link
Member Author

ml-evs commented Dec 17, 2021

(same applies to chemical_formula_reduced)

@ml-evs ml-evs self-assigned this Dec 17, 2021
@ml-evs ml-evs changed the title Overzealous validation of substring comparisons for chemical_formula_anonymous Overzealous validation of substring comparisons for chemical formula fields Dec 17, 2021
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/medium Issue or PR with a consensus of medium priority validator Related to the OPTIMADE validator
Projects
None yet
1 participant