From 344643c400e43e64babba4c775f6db4809a43aeb Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Thu, 3 Oct 2024 16:39:04 +0200 Subject: [PATCH] Don't write `use_validation` to TOML Fixes #1862. This adds the default to a test model to ensure it doesn't end up that and hence make the model not runnable in CI. --- python/ribasim/ribasim/model.py | 2 +- python/ribasim_testmodels/ribasim_testmodels/trivial.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ribasim/ribasim/model.py b/python/ribasim/ribasim/model.py index 1f2d1ceab..d204e7cbc 100644 --- a/python/ribasim/ribasim/model.py +++ b/python/ribasim/ribasim/model.py @@ -104,7 +104,7 @@ class Model(FileModel): user_demand: UserDemand = Field(default_factory=UserDemand) edge: EdgeTable = Field(default_factory=EdgeTable) - use_validation: bool = Field(default=True) + use_validation: bool = Field(default=True, exclude=True) _used_node_ids: UsedIDs = PrivateAttr(default_factory=UsedIDs) diff --git a/python/ribasim_testmodels/ribasim_testmodels/trivial.py b/python/ribasim_testmodels/ribasim_testmodels/trivial.py index 6e01911f1..42ef8650f 100644 --- a/python/ribasim_testmodels/ribasim_testmodels/trivial.py +++ b/python/ribasim_testmodels/ribasim_testmodels/trivial.py @@ -12,6 +12,7 @@ def trivial_model() -> Model: endtime="2021-01-01", crs="EPSG:28992", results=Results(subgrid=True, compression=False), + use_validation=True, ) # Convert steady forcing to m/s