Is your feature request related to a problem? Please describe.
The documentation for the "type recarray" entries in the dfn specifications is sometimes hard to understand. These parameters might be a little easier to understand if there were type annotations in the __init__ definitions. This is sort of already done in the package docstring, but the docstring is written in MODFLOW descriptive types.
Describe the solution you'd like
Add an annotation line to the dfn specification to store Python type information, and modify the createpackages.py utility to add Python type annotations to the package __init__ definition.
Example dfn change (sim-tdis.dfn):
block perioddata
name perioddata
type recarray perlen nstp tsmult
+ annotation = tuple[tuple[float, int, float], ...]
reader urword
optional false
longname stress period time information
description
default_value ((1.0, 1, 1.0),)
Example __init__ change after updating packages: (mftdis.py):
def __init__(
self,
simulation,
...,
- perioddata=((1.0, 1, 1.0),),
+ perioddata: tuple[tuple[float, int, float], ...] = ((1.0, 1, 1.0),),
...,
):
...
Additional context
Some examples:
Is your feature request related to a problem? Please describe.
The documentation for the "type recarray" entries in the dfn specifications is sometimes hard to understand. These parameters might be a little easier to understand if there were type annotations in the
__init__definitions. This is sort of already done in the package docstring, but the docstring is written in MODFLOW descriptive types.Describe the solution you'd like
Add an
annotationline to the dfn specification to store Python type information, and modify the createpackages.py utility to add Python type annotations to the package__init__definition.Example dfn change (sim-tdis.dfn):
block perioddata name perioddata type recarray perlen nstp tsmult + annotation = tuple[tuple[float, int, float], ...] reader urword optional false longname stress period time information description default_value ((1.0, 1, 1.0),)Example
__init__change after updating packages: (mftdis.py):def __init__( self, simulation, ..., - perioddata=((1.0, 1, 1.0),), + perioddata: tuple[tuple[float, int, float], ...] = ((1.0, 1, 1.0),), ..., ): ...Additional context
Some examples: