Skip to content

Commit f01dfb0

Browse files
committed
rename
1 parent 839aaff commit f01dfb0

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

petab/v2/converters.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
from .models._sbml_utils import add_sbml_parameter, check
2121
from .models.sbml_model import SbmlModel
2222

23-
__all__ = ["ExperimentsToEventsConverter"]
23+
__all__ = ["ExperimentsToSbmlConverter"]
2424

2525

26-
class ExperimentsToEventsConverter:
27-
"""Convert PEtab experiments to SBML events.
26+
class ExperimentsToSbmlConverter:
27+
"""Convert PEtab experiments to SBML.
2828
2929
For an SBML-model-based PEtab problem, this class converts the PEtab
30-
experiments to events as far as possible.
30+
experiments to initial assignments and events as far as possible.
3131
3232
If the model already contains events, PEtab events are added with a higher
3333
priority than the existing events to guarantee that PEtab condition changes
@@ -38,8 +38,8 @@ class ExperimentsToEventsConverter:
3838
The PEtab problem must not contain any identifiers starting with
3939
``_petab``.
4040
41-
All periods and condition changes that are represented by events
42-
will be removed from the condition table.
41+
All periods and condition changes that are represented by initial
42+
assignments or events will be removed from the condition table.
4343
Each experiment will have at most one period with a start time of ``-inf``
4444
and one period with a finite start time. The associated changes with
4545
these periods are only the pre-equilibration indicator
@@ -454,7 +454,7 @@ def _create_event_assignments_for_period(
454454
:param changes: The PEtab condition changes that are to be applied
455455
at the start of the period.
456456
"""
457-
_add_assignment = ExperimentsToEventsConverter._add_assignment
457+
_add_assignment = ExperimentsToSbmlConverter._add_assignment
458458
sbml_model = event.getModel()
459459
# collect IDs of compartments that are changed in this period
460460
changed_compartments = {

tests/v2/test_converters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import pandas as pd
44

55
from petab.v2 import Change, Condition, Experiment, ExperimentPeriod, Problem
6-
from petab.v2.converters import ExperimentsToEventsConverter
6+
from petab.v2.converters import ExperimentsToSbmlConverter
77
from petab.v2.models.sbml_model import SbmlModel
88

99

1010
def test_experiments_to_events_converter():
11-
"""Test the ExperimentsToEventsConverter."""
11+
"""Test the ExperimentsToSbmlConverter."""
1212
ant_model = """
1313
species X = 0
1414
X' = 1
@@ -19,7 +19,7 @@ def test_experiments_to_events_converter():
1919
problem.add_condition("c2", X=2)
2020
problem.add_experiment("e1", -inf, "c1", 10, "c2")
2121

22-
converter = ExperimentsToEventsConverter(problem)
22+
converter = ExperimentsToSbmlConverter(problem)
2323
converted = converter.convert()
2424
assert converted.validate().has_errors() is False
2525

@@ -204,7 +204,7 @@ def test_simulate_experiment_to_events():
204204
problem.assert_valid()
205205

206206
# convert PEtab experiments to SBML events and simulate in BasiCO
207-
converter = ExperimentsToEventsConverter(problem)
207+
converter = ExperimentsToSbmlConverter(problem)
208208
converted = converter.convert()
209209
# set experiment indicator to simulate experiment "e1"
210210
converted.model.sbml_model.getParameter(

0 commit comments

Comments
 (0)