Skip to content

fix(dfns): fix multiple issues - #343

Merged
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:migration-fixes
Aug 12, 2026
Merged

fix(dfns): fix multiple issues#343
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:migration-fixes

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Aug 12, 2026

Copy link
Copy Markdown
Member

Fix spec/schema/migration issues surfaced in #339. Regenerate v2.0.0.dev2/dev3 snapshots and schema.json. Update dfnspec.md/dfns.md and add tests.

Block header fields

Introduce a header field corresponding to v1's block_variable, e.g. BEGIN PERIOD <iper>. Previously v2 dropped these. Make Block.repeats a derived property (header is not None) rather than a stored field.

File record fields

Restore composite file record fields. Collapsing these into a single File field unnecessarily complicated things: migration assumed every file record had shape record <keyword> <filein|fileout> <path>, but two other shapes exist in the DFNs:

  • no leading keyword with a trailing flag after the path (e.g. utl-obs's output)
  • multiple leading keywords (e.g. gwf-sfr's cross_sectionrecord).

These are more naturally represented as composites containing zero or more keywords plus a File field. Rename File.mode to direction accepting "in"/"out""filein"/"fileout" are MF6 format (i.e. rendering) details.

Rendering

  • Fix tagged handling when creating Array fields during migration, and when rendering string/integer/double/array subfields of a record (previously only File respected tagged on render).
  • Render header on the block's BEGIN <NAME> line.

@wpbonelli wpbonelli added this to the 1.10.0 milestone Aug 12, 2026
@wpbonelli wpbonelli added the bug Something isn't working label Aug 12, 2026
@wpbonelli
wpbonelli marked this pull request as ready for review August 12, 2026 19:46
@wpbonelli
wpbonelli merged commit 56b3980 into MODFLOW-ORG:develop Aug 12, 2026
26 of 30 checks passed
@wpbonelli
wpbonelli deleted the migration-fixes branch August 12, 2026 19:48
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