round-trip model IO test - #369
Merged
Merged
Conversation
wpbonelli
marked this pull request as ready for review
September 24, 2026 20:47
Merged
wpbonelli
added a commit
that referenced
this pull request
Sep 25, 2026
The basic parser lexed a not-solely-numeric token starting with numeric characters as a number followed by a word, e.g. 1997-07-16T19:20:30 gave [1997, '-07-16T19:20:30']. Lex each whitespace-separated token as a single terminal, and have the transformer decide if it's a number. This also fixes signed numbers, which used to lex as strings, and Fortran D exponents, which used to incorrectly split the token. The typed grammar had a similar problem, but the fix is different: define number terminals as followed by whitespace, a comma, a comment or the end of input. This fixes 21 models currently xfailed in the roundtrip tests from #369
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Load, write and reload every non-large example/test model, and compare the reloaded components against the originals. Quite a few are still expected to fail. We can work through them and un-xfail them as they're fixed.
Comparing a loaded model with the reloaded one can't catch a value the first load drops. There are a few known issues like this, add targeted tests for them too.
The diffing in this PR could be simplified by https://github.com/qlustered/deepdiff but probably overkill for now