Skip to content

fix(dfn): fix schema version migrations#327

Merged
wpbonelli merged 7 commits into
MODFLOW-ORG:developfrom
wpbonelli:dfn
May 30, 2026
Merged

fix(dfn): fix schema version migrations#327
wpbonelli merged 7 commits into
MODFLOW-ORG:developfrom
wpbonelli:dfn

Conversation

@wpbonelli
Copy link
Copy Markdown
Member

@wpbonelli wpbonelli commented May 30, 2026

Backwards-compatibility fixes, schema version naming/differentiation, and usability improvements.

  • Add new migrate subcommand to DFNs CLI
  • Disentangle migration logic from object model
  • As we have prototyped the new schema, the code to generate/represent intermediate versions has grown messy. We need to clearly distinguish schema versions, especially since flopy3 codegen consumes one of them. Identify the following versions
    • 1: original DFNs, flat set of components, each a flat list of fields plus comment lines
    • 2.0.0.dev0: flat set of components, some structuring of fields, consumed by flopy3
    • 2.0.0.dev1: tree of components, more extensive field structuring, consumed by flopy4
    • 2.0.0.dev2: pydantic redesign, flat set of components, structured blocks/fields

Closes #259. The modflow_devtools.dfn module stays stable and supports only the 2.0.0.dev0 schema version expected by flopy3. The new dfns module gets some improvements and supports all three prototype schema versions. This versioning schema can continue until we release version 2.

@wpbonelli wpbonelli added this to the 1.10.0 milestone May 30, 2026
@wpbonelli wpbonelli marked this pull request as ready for review May 30, 2026 21:17
@wpbonelli wpbonelli merged commit 160ded4 into MODFLOW-ORG:develop May 30, 2026
15 checks passed
@wpbonelli wpbonelli deleted the dfn branch May 30, 2026 21:18
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.

Consider intermediate DFN schema v1.1 not v2

1 participant