Skip to content

Commit 69f6e09

Browse files
authored
refactor(codegen): move dfn utils from devtools (#2508)
To avoid the dependency on a development branch of modflow-devtools, copy over the DFN parser, TOML conversion script, etc for now. Also include the necessary transitive dependencies. Workaround for 3.9.3's failure to launch.
1 parent 351c5b7 commit 69f6e09

File tree

7 files changed

+682
-6
lines changed

7 files changed

+682
-6
lines changed

flopy/mf6/utils/codegen/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def make_all(dfndir: Path, outdir: PathLike, verbose: bool = False, version: int
103103

104104
# import here instead of module so we don't
105105
# expect optional deps at module init time
106-
from modflow_devtools.dfn import Dfn
106+
from flopy.mf6.utils.dfn import Dfn
107107

108108
dfns = Dfn.load_all(dfndir, version=version)
109109
make_init(dfns, outdir, verbose)

flopy/mf6/utils/codegen/component.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
TypedDict,
44
)
55

6-
from modflow_devtools.dfn import Dfn
6+
from flopy.mf6.utils.dfn import Dfn
77

88

99
def get_component_names(dfn: dict) -> list[tuple[str, str]]:

flopy/mf6/utils/codegen/filters.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def attrs(dfn: dict, component_name: tuple[str, str]) -> List[str]:
233233
where applicable. TODO: this should get much simpler if we can drop
234234
all the `ListTemplateGenerator`/`ArrayTemplateGenerator` attributes.
235235
"""
236-
from modflow_devtools.dfn import _MF6_SCALARS, Dfn
236+
from flopy.mf6.utils.dfn import _MF6_SCALARS, Dfn
237237

238238
component_base = Filters.base(component_name)
239239
component_vars = _get_vars(dfn)

0 commit comments

Comments
 (0)