Skip to content

Commit 0d983be

Browse files
committed
Check measurements after observables
1 parent 5c4f01e commit 0d983be

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

petab/v1/lint.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -903,21 +903,6 @@ def lint_problem(problem: "petab.Problem") -> bool:
903903
else:
904904
logger.warning("Model not available. Skipping.")
905905

906-
if problem.measurement_df is not None:
907-
logger.info("Checking measurement table...")
908-
try:
909-
check_measurement_df(problem.measurement_df, problem.observable_df)
910-
911-
if problem.condition_df is not None:
912-
assert_measurement_conditions_present_in_condition_table(
913-
problem.measurement_df, problem.condition_df
914-
)
915-
except AssertionError as e:
916-
logger.error(e)
917-
errors_occurred = True
918-
else:
919-
logger.warning("Measurement table not available. Skipping.")
920-
921906
if problem.condition_df is not None:
922907
logger.info("Checking condition table...")
923908
try:
@@ -950,6 +935,21 @@ def lint_problem(problem: "petab.Problem") -> bool:
950935
else:
951936
logger.warning("Observable table not available. Skipping.")
952937

938+
if problem.measurement_df is not None:
939+
logger.info("Checking measurement table...")
940+
try:
941+
check_measurement_df(problem.measurement_df, problem.observable_df)
942+
943+
if problem.condition_df is not None:
944+
assert_measurement_conditions_present_in_condition_table(
945+
problem.measurement_df, problem.condition_df
946+
)
947+
except AssertionError as e:
948+
logger.error(e)
949+
errors_occurred = True
950+
else:
951+
logger.warning("Measurement table not available. Skipping.")
952+
953953
if problem.parameter_df is not None:
954954
logger.info("Checking parameter table...")
955955
try:

0 commit comments

Comments
 (0)