We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Model.petab_yaml
1 parent e95c2f6 commit 1ce7b22Copy full SHA for 1ce7b22
petab_select/model.py
@@ -410,6 +410,19 @@ class Model(ModelBase):
410
:attr:`model_subspace_petab_yaml`.
411
"""
412
413
+ @model_validator(mode="before")
414
+ @classmethod
415
+ def _deprecated_petab_yaml(cls, data: Any) -> Any:
416
+ if isinstance(data, dict) and "petab_yaml" in data:
417
+ data[MODEL_SUBSPACE_PETAB_YAML] = data.pop("petab_yaml")
418
+ warnings.warn(
419
+ "Change the `petab_yaml` field of your model data "
420
+ "to `model_subspace_petab_yaml.",
421
+ DeprecationWarning,
422
+ stacklevel=2,
423
+ )
424
+ return data
425
+
426
@model_validator(mode="after")
427
def _fix_petab_problem(self: Model) -> Model:
428
"""Fix a missing PEtab problem by loading it from disk."""
0 commit comments