Skip to content

Commit f153916

Browse files
committed
aliased model logic
1 parent e1c3d3d commit f153916

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

petab/v2/lint.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,15 +1010,16 @@ def get_valid_parameters_for_parameter_table(
10101010
)
10111011

10121012
# Add petab ids from mapping table if they are used for aliasing
1013-
# FIXME only add mapping.petab_id to allowed parameter IDs list if it
1014-
# aliases an invalid PEtab ID? See
1015-
# https://github.com/PEtab-dev/libpetab-python/pull/482#discussion_r3420762034
10161013
for mapping in problem.mappings:
1017-
if mapping.model_id and mapping.model_id in parameter_ids.keys():
1014+
if mapping.petab_id not in invalid:
10181015
parameter_ids[mapping.petab_id] = None
1019-
# An aliased model id is not a valid parameter id
1020-
if mapping.model_id in parameter_ids:
1021-
del parameter_ids[mapping.model_id]
1016+
# An aliased model id is not a valid parameter id
1017+
if (
1018+
mapping.model_id
1019+
and mapping.model_id != mapping.petab_id
1020+
and mapping.model_id in parameter_ids
1021+
):
1022+
del parameter_ids[mapping.model_id]
10221023

10231024
# add output parameters from observable table
10241025
output_parameters = problem.get_output_parameters()

0 commit comments

Comments
 (0)