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

chemical_formula_anonymous validator accepts incorrect proportion order if started with 1 #1002

Closed
ml-evs opened this issue Nov 21, 2021 · 0 comments · Fixed by #1001
Closed
Labels
bug Something isn't working models For issues related to the pydantic models directly 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 Nov 21, 2021

As reported by @JPBergsma in #1001 (comment), the chemical_formula_anonymous validator has an edge case that allows the wrong order of elements for certain compositions (those with only two different proportions, e.g. 1 and 4), if the first element has proportion 1, e.g. "AB4" does not raise an error as it should.

@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 models For issues related to the pydantic models directly labels Nov 21, 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 models For issues related to the pydantic models directly priority/medium Issue or PR with a consensus of medium priority validator Related to the OPTIMADE validator
Projects
None yet
1 participant