Skip to content

generate reference fields from the DFNs - #501

Merged
wpbonelli merged 3 commits into
modflowpy:developfrom
wpbonelli:dfn-references
Oct 21, 2026
Merged

wpbonelli merged 3 commits into
modflowpy:developfrom
wpbonelli:dfn-references

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Followup to #499, instead of declaring component references by hand, derive them from the DFNs. Uses MODFLOW-ORG/modflow-devtools#396. Some stuff here will be cleaned up soon

wpbonelli and others added 2 commits October 21, 2026 03:34
A component's columns in its row in the simulation's name file keyed
(fk) to the simulation's models become its reference fields, in row
order: an exchange's exgmnamea/exgmnameb, a solution's slnmnames (kept
as `models`). The Exchange and Solution bases keep the semantics, via
a _reference_problem hook replacing reference()'s check. Binding and
ingress read and set reference fields in order instead of per type.

The generated modules were produced with sim-nam annotated as devtools'
sim-nam-model-keys branch will annotate it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin modflow-devtools to b7c43566, which marks sim-nam's model-name
columns pk/fk, and test reference field generation on the real DFNs
instead of patching the keys in. Synced at the contract commit, the
generated modules are unchanged.

The mixin gap check now looks for an attribute a base class lacks on
its leaf subclasses, since Solution.models is now generated on IMS/EMS
rather than declared on Solution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wpbonelli wpbonelli added this to the MVP milestone Oct 21, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wpbonelli
wpbonelli merged commit 4bb8d8f into modflowpy:develop Oct 21, 2026
17 checks passed
@wpbonelli
wpbonelli deleted the dfn-references branch October 21, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant