Skip to content

round-trip model IO test - #369

Merged
wpbonelli merged 1 commit into
modflowpy:developfrom
wpbonelli:roundtrip-test
Sep 24, 2026
Merged

wpbonelli merged 1 commit into
modflowpy:developfrom
wpbonelli:roundtrip-test

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

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

@wpbonelli wpbonelli added this to the MVP milestone Sep 24, 2026
@wpbonelli wpbonelli added bug Something isn't working IO Related to loading/writing input/output files labels Sep 24, 2026
@wpbonelli
wpbonelli marked this pull request as ready for review September 24, 2026 20:47
@wpbonelli
wpbonelli merged commit 625d52c into modflowpy:develop Sep 24, 2026
16 checks passed
@wpbonelli
wpbonelli deleted the roundtrip-test branch September 24, 2026 21:01
@wpbonelli wpbonelli mentioned this pull request Sep 25, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working IO Related to loading/writing input/output files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant