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

chore: restore files that generated the type-parser #2926

Merged
merged 8 commits into from
Jan 12, 2024

Conversation

jpivarski
Copy link
Member

This is how src/awkward/types/_awkward_datashape_parser.py was made.

These files were taken from 4ba1dbb (#1514), the last commit before they disappeared in the v1 → v2 transition. I think this was their final state—I think they weren't developed any further. (Am I missing anything, @reikdas?)

These should remain in the dev directory in case we ever need to make changes to the grammar or update the generated file to a new Lark version or a new Python version.

For reference, the auto-generated file was made according to the procedure documented in

Since this PR only touches files in the dev directory, I'm going to merge it without review.

jpivarski and others added 3 commits January 9, 2024 09:36
pre-commit should not be allowed to modify auto-generated code. Or any of these files; they're for historical reference.

This reverts commit fd96676.
@jpivarski jpivarski enabled auto-merge (squash) January 9, 2024 15:43
@agoose77
Copy link
Collaborator

agoose77 commented Jan 9, 2024

Huh, this was around at some point. Didn't realise we lost them! Good catch.

@jpivarski
Copy link
Member Author

@ianna was right (in a now-deleted comment). These were saved, but they were in the studies/ directory, rather than dev/. The files I included here are from an intermediate state between studies/type-parser and studies/type-parser-2, so I put these files into studies/type-parser-1.5.

These diffs are not too big:

diff dev/typeparser/parser.py studies/type-parser/parser.py
diff dev/typeparser/type-grammar.lark studies/type-parser/grammar.lark

I can confirm that studies/type-parser-2 (added in #1514) is the most recent; it added our current src/awkward/types/_awkward_datashape_parser.py and there have been no substantial changes to it since then.

@jpivarski
Copy link
Member Author

One test is failing because of #2920. I'll get to that later.

@jpivarski jpivarski enabled auto-merge (squash) January 12, 2024 16:26
@jpivarski
Copy link
Member Author

The other tests aren't running because this PR only puts data into the studies/ directory, so it's sufficiently tested to merge.

@jpivarski jpivarski merged commit 4f9e993 into main Jan 12, 2024
15 checks passed
@jpivarski jpivarski deleted the jpivarski/restore-type-parser-dev-files branch January 12, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants