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

Add ECMA definition of symmetry operation regexp and associated tests #488

Merged
merged 11 commits into from
Mar 22, 2024

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Dec 23, 2023

Closes #487.

This PR adds an explicit and simplified symmetry operation regexp that can be used with JSON Schema.
It is validated against the same test cases as the PCRE version with an exact match in the results.

@ml-evs
Copy link
Member Author

ml-evs commented Dec 23, 2023

Have tagged reviewers but no pressure to look at this before 2024!

Copy link
Contributor

@sauliusg sauliusg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me in principle. As details go, I suggest adding a test that compares the original PCRE REs and the ECMA REs, by generating automatically the ECMA RE from the PCRE by interpolating variables (should be easy to do in Perl) and comparing them with the ECMA RE provided in the specification. In this way we would know that if tests pass, both sets of REs define the same thing.

optimade.rst Outdated Show resolved Hide resolved
optimade.rst Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
@rartino
Copy link
Contributor

rartino commented Jan 10, 2024

I've added the 'requires-discussion' label in preparation of the web meet, as it seems we may want to generally find a consensus around the 'pattern' field. (I suppose I could have added the label on #490 instead, but technically it is the possible reference to that appendix from here that is the topic to discuss).

tests/cases/ecma_symops_001.sh Outdated Show resolved Hide resolved
optimade.rst Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
@ml-evs ml-evs added the blocking-release This is a PR or issue that presently blocks the release of next version of the spec. label Jan 17, 2024
@ml-evs ml-evs added this to the v1.2 milestone Jan 17, 2024
@ml-evs ml-evs added the status/blocked Blocked by other PRs that must be handled first label Jan 18, 2024
sauliusg
sauliusg previously approved these changes Mar 22, 2024
Copy link
Contributor

@sauliusg sauliusg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool test 'symops_pcre_to_ecma_001.sh', I think it is sufficient to safeguard that ECMA and PCER symop definitions do not diverge. Well done!

optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
optimade.rst Outdated Show resolved Hide resolved
@sauliusg sauliusg self-requested a review March 22, 2024 09:50
@rartino rartino merged commit 588f001 into Materials-Consortia:develop Mar 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking-release This is a PR or issue that presently blocks the release of next version of the spec. status/blocked Blocked by other PRs that must be handled first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempts to simplify and make explicit the symmetry operation regexp
5 participants