Repository navigation
feat(dfns): scoped keys and bound keys for advanced packages - #406
Merged
Merged
Conversation
* LAK `connectiondata.iconn`, MAW `connectiondata.icon` and SFR
`diversions.idv` are unique within their feature: `pk = {scope = "ifno"}`
* SFR's period diversion `idv`, MAW's `angledata.icon` (newer than 6.7) and
the LAK/MAW observations' connection numbers reference them, scoped by
`ifno`
* a key's scope may name a column of an enclosing record in the same list
item, so SFR's union arm `idv` can be scoped by the item's `ifno`
* SFR and UZF declare `bound = "packagedata.ifno"`, LAK `<=nlakeconn`, MAW
`<=ngwfnodes`, so SPC's `bndno` resolves against them
* MAW's `connectiondata` gets `shape = ["ngwfnodes"]`, derived as
`sum(packagedata.ngwfnodes)`, as LAK's is
* dfnspec.md: a "Consumer checks" table for constraints with no spec form
(MOVER on; an SSM package named across `sources` and `fileinput`)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o rules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the "Consumer checks" section; each constraint now has a spec form: - An fk may give a rule with a scope: the scope picks the instance and the rule narrows its values. New rule mover_enabled on MVR's packages.pname, for MF6's check_packages (gwf-mvr.f90:942-971). - A key set may list several block.field paths of one type. As a supertype table, its key spans them. SSM declares source = ["sources.pname", "fileinput.pname"], for MF6's shared isrctype (tsp-ssm.f90:814-821, 912-919). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wpbonelli
added a commit
that referenced
this pull request
Nov 2, 2026
Follow-up to #406, #395. Allow a key set to specify when a component may assume a role. # gwf-wel [keys] mover_provider = { path = "<=maxbound", when = "mover" } bound = "<=maxbound" * mover roles (mover_provider, mover_receiver) get when = "mover" * validator checks that when names a keyword option, as it does for fields Also, the spec previously gave rules two jobs: without a scope a rule picked the instance, with a scope it narrowed the target's values. Consolidate these into one meaning: a subset of the fk's target that the value must fall in (a view, in relational terms). A rule may stand in for a scope or may narrow a scoped target.
wpbonelli
added a commit
to modflowpy/pyphoenix-project
that referenced
this pull request
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
connectiondata.iconn, MAWconnectiondata.iconand SFRdiversions.idvare unique per feature:pk = {scope = "ifno"}idv, MAW'sangledata.iconand LAK/MAW obs connection numbers reference themidvcan be scoped byifnobound = "packagedata.ifno", LAK<=nlakeconn, MAW<=ngwfnodesconnectiondatagetsshape = ["ngwfnodes"],sum(packagedata.ngwfnodes)ruleand ascope; new rulemover_enabledon MVR'spackages.pnamesource = ["sources.pname", "fileinput.pname"]ssm_packageskips flow packages with a paired advanced transport package