You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of providing a machine-readable definition for the new symmetry operations field (#445 (comment) and #435 (comment), cc @rartino), I've been trying to come up with an explicit regexp that can be used directly inside JSON Schema (which uses ECMA syntax for regular expressions, and recommends only a subset).
I have an expression defined from @sauliusg's PCRE (simply expanding variables and adjusting the syntax) that matches a majority of the test cases from tests/inputs/symops.lst (PR forthcoming) but thought I should raise an issue about the match failures, which I'm not sure should be supported? The full diff of successes/failures can be expanded below, but just to pick out some exemplar failures:
It was my impression that we don't support floating point translations like this? I don't see how this matches the current expression (which might indicate an issue with the testing of the current PCRE expression, assuming I am running it correctly).
EDIT: indeed these are the expected failures, and now this regexp matches the behavior of the PCRE version. I'll also add here the Python snippet I use to generate this regexp directly from the PCRE:
Ahhh, I think I see the issue, the tests inputs are not all meant to be "positive"... I just need to use the same "success" file as the other test.
That's correct, not all symops form the input list are „correct“ symops according to this OPTIMADE definition.
As I see (had to look up again ;), in the tests, the 'pcre_symops_001.sh' test case outputs all symops that match the PCRE definition in the OPTIMADE spec, and the 'pcre_symops_002.sh' test case outputs those symops that do not match the OPTIMADE spec. The input list is taken from the COD CIF collection, so lists those symop strings that are out there "in the wild"; but of course the non-matching lines can be reduced and expressed using the OPTIMADE-permitted strings.
Numbers with decimal point are not permitted in the OPTIMADE spec as it currently stands.
As part of providing a machine-readable definition for the new symmetry operations field (#445 (comment) and #435 (comment), cc @rartino), I've been trying to come up with an explicit regexp that can be used directly inside JSON Schema (which uses ECMA syntax for regular expressions, and recommends only a subset).
The full regexp I am using right now is:
I have an expression defined from @sauliusg's PCRE (simply expanding variables and adjusting the syntax) that matches a majority of the test cases from
tests/inputs/symops.lst
(PR forthcoming)but thought I should raise an issue about the match failures, which I'm not sure should be supported? The full diff of successes/failures can be expanded below, but just to pick out some exemplar failures:It was my impression that we don't support floating point translations like this? I don't see how this matches the current expression (which might indicate an issue with the testing of the current PCRE expression, assuming I am running it correctly).EDIT: indeed these are the expected failures, and now this regexp matches the behavior of the PCRE version. I'll also add here the Python snippet I use to generate this regexp directly from the PCRE:
Full diff log (addition = success, subtraction = failure), truncated for GitHub max issue length
The text was updated successfully, but these errors were encountered: