You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
model_type parameters are serialized but can be important defaults #41
class Cf(BedFriction):
"""Dimensionless friction coefficient formulation.
Uses a constant dimensionless friction coefficient (c_f) to calculate
bed shear stress. XBeach default bedfriccoef: 0.003 (range: 0.001-0.1).
"""
model_type: Literal["cf"] = Field(
default="cf",
description="Model type discriminator",
)
define a model_type that should be serialized as bedfriction = cf
I think this might be because exclude_unset is True in model_dump which causes this information to be dropped prior to it being available for flatten_nested_dict to dump correctly. AI suggested a number of fixes including patching flatten_nested_dict to reconstruct the model_type field or to turn off exclude_unset and use exclude_node in model_dump. I'm not confident enough with the implementation to put a pull request in at the moment. Seeking advice @rafa-guedes
Activity