Skip to content

Commit a563977

Browse files
authored
feat(dfn): mark models, exgs, slns multi-components in tomls (#235)
multi attribute generalizes concept of multi-package to any component whose parent can have not just one but multiple
1 parent 016c43e commit a563977

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

modflow_devtools/dfn.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,19 @@ def _rest():
648648
return Ref(parent=parent, **rest)
649649
return None
650650

651+
sln = _sln()
652+
multi = (
653+
_multi()
654+
or sln is not None
655+
or ("nam" in name and "sim" not in name)
656+
or name.startswith("exg-")
657+
)
658+
651659
return cls(
652660
name=name,
653661
advanced=_advanced(),
654-
multi=_multi(),
655-
sln=_sln(),
662+
multi=multi,
663+
sln=sln,
656664
ref=_sub(),
657665
**blocks,
658666
)

0 commit comments

Comments
 (0)