Skip to content

fix(dfns): fix io roundtrip info loss - #386

Merged
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:toml-roundtrip
Oct 8, 2026
Merged

wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:toml-roundtrip

Conversation

@wpbonelli

Copy link
Copy Markdown
Member

Writing the current schema and loading it back lost two things:

  • list item names
  • tuple defaults

Fix it

Writing the current schema and loading it back lost two things:

* a list item's name: names are stripped since the dict key supplies
  them, but an item is keyed by `item`, not its name, so it loaded with
  the list's name (e.g. gwf-oc output_record -> output). Always keep it.
* tuple defaults: TOML/JSON/YAML have no tuples, so sim-tdis perioddata's
  default came back as a list. Freeze list defaults to tuples on load.

Add a test that the migrated corpus loads back identical, in each format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wpbonelli wpbonelli added this to the 1.10.0 milestone Oct 8, 2026
@wpbonelli wpbonelli added the bug Something isn't working label Oct 8, 2026
@wpbonelli wpbonelli changed the title fix(dfns): fix migration info loss fix(dfns): fix io roundtrip info loss Oct 8, 2026
@wpbonelli
wpbonelli marked this pull request as ready for review October 8, 2026 17:00
@wpbonelli
wpbonelli merged commit fbec2ab into MODFLOW-ORG:develop Oct 8, 2026
16 checks passed
@wpbonelli
wpbonelli deleted the toml-roundtrip branch October 8, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant