@@ -846,7 +846,7 @@ def validate(
846
846
847
847
validation_results = ValidationResultList ()
848
848
if self .config .extensions :
849
- extensions = "," .join (e . name for e in self .config .extensions )
849
+ extensions = "," .join (self .config .extensions . keys () )
850
850
validation_results .append (
851
851
ValidationIssue (
852
852
ValidationIssueSeverity .WARNING ,
@@ -1116,7 +1116,7 @@ def model_dump(self, **kwargs) -> dict[str, Any]:
1116
1116
>>> p += core.Parameter(id="par", lb=0, ub=1)
1117
1117
>>> pprint(p.model_dump())
1118
1118
{'conditions': [],
1119
- 'config': {'extensions': [] ,
1119
+ 'config': {'extensions': {} ,
1120
1120
'format_version': '2.0.0',
1121
1121
'parameter_file': None,
1122
1122
'problems': []},
@@ -1168,7 +1168,6 @@ class SubProblem(BaseModel):
1168
1168
class ExtensionConfig (BaseModel ):
1169
1169
"""The configuration of a PEtab extension."""
1170
1170
1171
- name : str
1172
1171
version : str
1173
1172
config : dict
1174
1173
@@ -1194,8 +1193,8 @@ class ProblemConfig(BaseModel):
1194
1193
parameter_file : str | AnyUrl | None = None
1195
1194
#: The list of problems in the configuration.
1196
1195
problems : list [SubProblem ] = []
1197
- #: Extensiions used by the problem.
1198
- extensions : list [ ExtensionConfig ] = []
1196
+ #: Extensions used by the problem.
1197
+ extensions : dict [ str , ExtensionConfig ] = {}
1199
1198
1200
1199
def to_yaml (self , filename : str | Path ):
1201
1200
"""Write the configuration to a YAML file.
0 commit comments