-
Notifications
You must be signed in to change notification settings - Fork 46
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OPTIMADE API] Several validation issues reported by the OPTIMADE provider dashboard #128
Comments
Hi @ml-evs , Thanks for reporting the issues. I will work on them this week and they all should be fixed by this weekend - unless I ran into any totally unexpected issues with the Django REST API framework that we use in OQMD. (and I will be there at the October OPTIMADE meeting) I'd be happy to look into adding the optimade-python-tools to qmpy once the current errors are fixed, and will let you know if I come across any significant hurdles. Abhi |
I've fixed every issue except for the "CONSTANTFIRST" queries since they're optional in OPTIMADE v1.0.0 and v1.1.0 I will close this issue in a few days unless @ml-evs has any comments/suggestions. |
Thanks @tachyontraveler, this looks great! The dashboard confirms that the only issue is now the constant first comparison. One issue is that I don't think constant first queries are optional... the spec says:
so while I think |
Thanks for clarifying that, @ml-evs . I have patched all the issues and now the local optimade validator installed my machine finds no test failures. Also passes 2/4 optional tests as well. I can work on the remaining optional fixes sometime later - probably after this quarter. |
Closing this issue since the OQMD implementation now passes all the validation tests, as indicated on the dashboard. |
Awesome, nice one! |
Hey @tachyontraveler, @JPBergsma spotted one final issue with the OQMD OPTIMADE (that also revealed a bug in the validator). The anonymous chemical formulae are ordered incorrectly, e.g., you serve I will quickly throw together a PR for this now. |
I will close this issue after the |
I tested a few ways to solve this problem and hit a wall at a consistency issue in the filtering of There's an issue with implementing support for For example, The OPTIMADE query But internally, I have to convert the query to look for Writing a script to parse the OPTIMADE query and finding relevant matches before the Django SQL query is impractical when Now, I can just change the format of retrieved data and disable the support for the There's a very low chance that I will change the OQMD's generic formula convention anytime soon as it'll break many of the internal users' data generation and retrieval scripts. I will keep this issue open until it's fully resolved. |
Tricky, and completely understand that you don't want to change the qmpy representation! It actually looks like supporting substring comparisons for |
I see that the dashboard was having a go at you for this (which I guess prompted your comment) - I can't check right now, but if it still moans when you return a 501, we can fix that in the validator itself. |
Yes, I can easily implement the equality comparison after conversion to OQMD format. I will proceed in this way in that case. |
Now the query with START operation results in a 501 error while a query with equality operation returns a successful response. The anonymous formulae are returned in OPTIMADE's preferred format |
Looks good to me! I notice that the validator does incorrectly flag this, so I raised an issue to track this in the Python tools. |
Sounds good. I will close this issue in that case. |
Hi qmpy devs (I guess mostly @tachyontraveler 馃槈), as I don't think any of you were in the last OPTIMADE meeting, I just thought I would give you a heads-up that the OPTIMADE provider dashboard now lists the errors associated with your implementation. OQMD has quite a few validation errors that you may want to sort out (that others have also raised at recent OPTIMADE tutorials, that make it impossible to use OQMD with the new pymatgen OPTIMADE client). Here is the dashboard link: https://www.optimade.org/providers-dashboard/providers/oqmd.html
The main errors reported by that dashboard can be clustered vaguely into:
OptimadeStructureSerializer
, e.g. missing values (that should benull
or present), incorrect chemical formula formats (additional redundant "1"s, wrong element orderings etc) and some fields having the wrong type, e.g.elements
should be a list and not a string.?filter=id < 12345
should return a proper status code and error format that indicates to automated clients that this filter is not available.structure_features
) is not supported - in this case it, I don't think OQMD hosts any "weird" structures that would have values forstructure_features
, so it should probably just return all-or-nothing./info/structures
endpoint, you need to report that your prefix is_oqmd
(even if it is obvious) so that clients know to look for your prefixed properties (which are perhaps the most useful ones I've seen - would love it if all "stability" dbs could agree on a format of hull distance for filtering).Most of the reported errors should only require minor changes, I'm happy to help out and make some of the tweaks if that would help! If you could handle adding optimade-python-tools as a dependency (only a minimal install would be needed), you could also validate the models produced by your serializer with Python code before it gets deployed.
Let me know what you think!
The text was updated successfully, but these errors were encountered: