Skip to content

Commit 1de4410

Browse files
dweindldilpath
andauthored
Apply suggestions from code review
Co-authored-by: Dilan Pathirana <[email protected]>
1 parent fa34d69 commit 1de4410

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

petab/v2/converters.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ def _add_presimulation_indicator(
260260
the SBML model."""
261261
par_id = self._presim_indicator
262262
if self._model.getElementBySId(par_id) is not None:
263-
raise AssertionError(f"Entity with ID {par_id} exists already.")
263+
raise ValueError(
264+
f"Entity with ID {par_id} already exists in the SBML model."
265+
)
264266

265267
# add the pre-steady-state indicator parameter
266268
add_sbml_parameter(self._model, id_=par_id, value=0, constant=False)
@@ -273,7 +275,7 @@ def get_experiment_indicator(experiment_id: str) -> str:
273275
experiment in the SBML model. It is a parameter that is set
274276
to 1 for the current experiment and 0 for all other
275277
experiments. The parameter is used in the event trigger
276-
to determine when the event should be triggered.
278+
to determine whether the event should be triggered.
277279
278280
:param experiment_id: The ID of the experiment for which to create
279281
the experiment indicator parameter ID.

0 commit comments

Comments
 (0)