Skip to content

Commit 96ebee5

Browse files
committed
Merge branch 'lint_mapping_table' into sciml_lint
2 parents 5fc6a31 + 8e9d0e3 commit 96ebee5

1 file changed

Lines changed: 0 additions & 43 deletions

File tree

petab/v2/lint.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -932,16 +932,6 @@ def run(self, problem: Problem) -> ValidationIssue | None:
932932
"defined in the mapping table but also defined through "
933933
"other PEtab tables."
934934
)
935-
# Grab all symbols from condition table for later
936-
condition_target_ids_values = {
937-
sym
938-
for cond in problem.conditions
939-
for change in cond.changes
940-
for sym in (
941-
change.target_value.free_symbols
942-
| change.target_id.free_symbols
943-
)
944-
}
945935

946936
for mapping in problem.mappings:
947937
# petabEntityId is not referenced in any model
@@ -953,39 +943,6 @@ def run(self, problem: Problem) -> ValidationIssue | None:
953943
f"`{model.model_id}`."
954944
)
955945

956-
# modelEntityId can be empty
957-
if mapping.model_id:
958-
# model_id is not in petab problem
959-
if mapping.model_id in defined_petab_ids:
960-
messages.append(
961-
f"PEtab ID `{mapping.model_id}` mirrors the "
962-
"model entity ID referenced in the mapping table."
963-
)
964-
if mapping.model_id in condition_target_ids_values:
965-
messages.append(
966-
f"Identifier `{mapping.model_id}` is mapped to a "
967-
"PEtab ID in the mapping table, but also directly "
968-
"used in the conditions table."
969-
)
970-
for observable_formula in [
971-
o.formula for o in problem.observables
972-
]:
973-
if mapping.model_id in observable_formula.free_symbols:
974-
messages.append(
975-
f"Identifier `{mapping.model_id}` is mapped "
976-
"to a PEtab ID in the mapping table, but also "
977-
"directly used in an observable formula."
978-
)
979-
for obs_noise_formula in [
980-
o.noise_formula for o in problem.observables
981-
]:
982-
if mapping.model_id in obs_noise_formula.free_symbols:
983-
messages.append(
984-
f"Identifier `{mapping.model_id}` is mapped "
985-
"to a PEtab ID in the mapping table, but also "
986-
"directly used in a noise formula."
987-
)
988-
989946
if messages:
990947
return ValidationError("\n".join(messages))
991948

0 commit comments

Comments
 (0)