39
39
"CheckUnusedExperiments" ,
40
40
"CheckObservablesDoNotShadowModelEntities" ,
41
41
"CheckUnusedConditions" ,
42
- "CheckAllObservablesDefined" ,
43
42
"CheckPriorDistribution" ,
44
43
"lint_problem" ,
45
44
"default_validation_tasks" ,
@@ -261,8 +260,9 @@ def run(self, problem: Problem) -> ValidationIssue | None:
261
260
}
262
261
if undefined_observables := (used_observables - defined_observables ):
263
262
return ValidationError (
264
- f"Observables { undefined_observables } used in "
265
- "measurement table but not defined in observable table."
263
+ f"Observable(s) { undefined_observables } are used in the "
264
+ "measurement table but are not defined in the observable "
265
+ "table."
266
266
)
267
267
268
268
return None
@@ -289,8 +289,8 @@ def run(self, problem: Problem) -> ValidationIssue | None:
289
289
expected = observable_parameters_count [m .observable_id ]
290
290
except KeyError :
291
291
messages .append (
292
- f"Observable { m .observable_id } used in measurement "
293
- f"table is not defined."
292
+ f"Observable { m .observable_id } is used in the measurement "
293
+ f"table but is not defined in the observable table ."
294
294
)
295
295
continue
296
296
@@ -443,31 +443,6 @@ def run(self, problem: Problem) -> ValidationIssue | None:
443
443
return None
444
444
445
445
446
- class CheckAllObservablesDefined (ValidationTask ):
447
- """A task to validate that all observables in the measurement table are
448
- defined in the observable table."""
449
-
450
- def run (self , problem : Problem ) -> ValidationIssue | None :
451
- if problem .measurement_df is None :
452
- return None
453
-
454
- measurement_df = problem .measurement_df
455
- observable_df = problem .observable_df
456
- used_observables = set (measurement_df [OBSERVABLE_ID ].values )
457
- defined_observables = (
458
- set (observable_df .index .values )
459
- if observable_df is not None
460
- else set ()
461
- )
462
- if undefined_observables := (used_observables - defined_observables ):
463
- return ValidationError (
464
- f"Observables { undefined_observables } are used in the"
465
- "measurements table but are not defined in observables table."
466
- )
467
-
468
- return None
469
-
470
-
471
446
class CheckUniquePrimaryKeys (ValidationTask ):
472
447
"""Check that all primary keys are unique."""
473
448
@@ -1092,7 +1067,6 @@ def get_placeholders(
1092
1067
# CheckVisualizationTable(),
1093
1068
# TODO validate mapping table
1094
1069
CheckValidParameterInConditionOrParameterTable (),
1095
- CheckAllObservablesDefined (),
1096
1070
CheckAllParametersPresentInParameterTable (),
1097
1071
CheckValidConditionTargets (),
1098
1072
CheckPriorDistribution (),
0 commit comments