Skip to content

Commit 0429b0e

Browse files
dweindldilpath
andauthored
Apply suggestions from code review
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
1 parent 3cd3654 commit 0429b0e

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

‎petab/v2/core.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2549,7 +2549,7 @@ def _parse_extensions(cls, v):
25492549
"""Parse extensions dict and convert known extensions to their specific
25502550
config classes."""
25512551
if not isinstance(v, dict):
2552-
raise ValueError(
2552+
raise TypeError(
25532553
"extensions must be a dict of extension ID to extension "
25542554
f"config, got {type(v)}."
25552555
)

‎petab/v2/extensions/sciml.py‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,8 @@ class NeuralNetConfig(BaseModel):
140140
class SciMLConfig(ExtensionConfig):
141141
"""The extended configuration of a PEtab SciML problem."""
142142

143-
#: The PEtab SciML format version.
144-
version: str = "0.1.0"
145-
#: Whether the extension is required for the mathematical
146-
#: interpretation of the problem. Defaults to ``True`` since a SciML
147-
#: problem's hybrid ODE/ML model is virtually always load-bearing.
148-
required: bool = True
143+
version = "0.1.0"
144+
required = True
149145
#: The paths to the array data files.
150146
array_files: list[AnyUrl | Path] = []
151147
#: The paths to the hybridization tables.

0 commit comments

Comments
 (0)