Skip to content

Commit

Permalink
starting simulator update
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskoenig committed Apr 2, 2024
1 parent 2880e9e commit 42e6a7e
Show file tree
Hide file tree
Showing 20 changed files with 222 additions and 838 deletions.
44 changes: 19 additions & 25 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ keywords =

[options]
zip_safe = True
python_requires = >=3.9
python_requires = >=3.11
install_requires =
sbmlutils>=0.8.7
numpy==1.21.3 # see https://github.com/sys-bio/roadrunner/issues/963
libroadrunner==2.1.3 # see https://github.com/sys-bio/roadrunner/issues/963
scipy==1.10.1
pint==0.19.2
numpy>=1.26.4
libroadrunner>=2.6.0
scipy>=1.12.0
pint>=0.23

# -> sbmlutils (no version pin)
# from sbmlutils (no version pin)
python-libsbml
rich
depinfo
Expand All @@ -66,28 +66,22 @@ install_requires =
matplotlib

# dependencies
petab>=0.1.25
# fix for windows access violations
ray[default]>=2.9.3
grpcio==1.49.1
pydantic>=2.6.3
tables>=3.8.0
xarray>=2023.6.0
bottleneck>=1.3.4
petab>=0.2.9
pydantic>=2.6.4
tables>=3.9.2
xarray>=2024.3.0
bottleneck>=1.3.8
psutil>=5.9.8
setproctitle>=1.3.3

plotly>=5.20.0
altair>=5.3.0
seaborn>=0.13.2
xmltodict>=0.13.0
pyDOE>=0.3.8

python-libsedml>=2.0.32
python-libnuml>=1.1.6
# biosimulators-utils>=0.1.171

psutil>=5.9.0
setproctitle>=1.2.2

plotly>=5.6.0
altair>=4.2.0
seaborn>=0.11.2

xmltodict>=0.12.0
pyDOE>=0.3.8
tests_require =
tox>=3.24.3
pytest>=7.0.1
Expand Down
1 change: 0 additions & 1 deletion src/sbmlsim/combine/sedml/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from sbmlsim.combine.sedml.parser import SEDMLParser
from sbmlsim.experiment import ExperimentRunner, SimulationExperiment
from sbmlsim.simulator import SimulatorSerial
from sbmlsim.simulator.simulation_ray import SimulatorParallel


def sedmltojson(sedml_path: Path) -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/sbmlsim/examples/datagenerator_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
from sbmlsim.result import XResult
from sbmlsim.result.datagenerator import DataGeneratorIndexingFunction
from sbmlsim.simulation import Dimension, ScanSim, Timecourse, TimecourseSim
from sbmlsim.simulator.simulation_ray import SimulatorParallel
from sbmlsim.simulator.simulation_serial import SimulatorSerial
from sbmlsim.test import MODEL_MIDAZOLAM


def example_scan() -> XResult:
"""Run scan and return results."""
simulator = SimulatorParallel(model=MODEL_MIDAZOLAM)
simulator = SimulatorSerial(model=MODEL_MIDAZOLAM)
Q_ = simulator.Q_

scan = ScanSim(
Expand Down
190 changes: 0 additions & 190 deletions src/sbmlsim/examples/example_parallel.py

This file was deleted.

1 change: 0 additions & 1 deletion src/sbmlsim/examples/experiments/covid/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def run_covid_examples(output_path: Path) -> None:
output_path=output_path / "sbmlsim",
data_path=output_path,
base_path=output_path,
parallel=True,
)

for experiment in experiments:
Expand Down
4 changes: 2 additions & 2 deletions src/sbmlsim/examples/experiments/curve_types/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from sbmlsim.plot import Axis, Figure, Plot
from sbmlsim.result.report import Report
from sbmlsim.simulation import AbstractSim, Timecourse, TimecourseSim
from sbmlsim.simulator.simulation_ray import SimulatorParallel, SimulatorSerial
from sbmlsim.simulator.simulation_serial import SimulatorSerial
from sbmlsim.task import Task
from sbmlsim.test import MODEL_REPRESSILATOR

Expand Down Expand Up @@ -95,7 +95,7 @@ def run_curve_types_experiments(output_path: Path) -> Path:

runner = ExperimentRunner(
CurveTypesExperiment,
simulator=SimulatorParallel(),
simulator=SimulatorSerial(),
data_path=data_path,
base_path=base_path,
)
Expand Down
4 changes: 2 additions & 2 deletions src/sbmlsim/examples/experiments/demo/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
TimecourseSim,
)
from sbmlsim.simulation.sensitivity import ModelSensitivity, SensitivityType
from sbmlsim.simulator.simulation_ray import SimulatorParallel, SimulatorSerial
from sbmlsim.simulator.simulation_serial import SimulatorSerial
from sbmlsim.task import Task
from sbmlsim.test import MODEL_DEMO

Expand Down Expand Up @@ -106,7 +106,7 @@ def run_demo_experiments(output_path: Path) -> None:

runner = ExperimentRunner(
DemoExperiment,
simulator=SimulatorParallel(),
simulator=SimulatorSerial(),
data_path=data_path,
base_path=base_path,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from sbmlsim.model import AbstractModel, RoadrunnerSBMLModel
from sbmlsim.plot import Axis, Figure
from sbmlsim.simulation import AbstractSim, Timecourse, TimecourseSim
from sbmlsim.simulator.simulation_ray import SimulatorParallel
from sbmlsim.simulator.simulation_serial import SimulatorSerial
from sbmlsim.task import Task


Expand Down Expand Up @@ -119,7 +119,7 @@ def run(output_path):

runner = ExperimentRunner(
AssignmentExperiment,
simulator=SimulatorParallel(),
simulator=SimulatorSerial(),
base_path=base_path,
data_path=base_path,
)
Expand Down
4 changes: 2 additions & 2 deletions src/sbmlsim/examples/experiments/midazolam/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from sbmlsim.examples.experiments.midazolam.experiments.mandema1992 import Mandema1992
from sbmlsim.experiment import ExperimentRunner, SimulationExperiment
from sbmlsim.report.experiment_report import ExperimentReport, ReportResults
from sbmlsim.simulator.simulation_ray import SimulatorParallel
from sbmlsim.simulator.simulation_serial import SimulatorSerial


def run_midazolam_experiments(output_path: Path) -> None:
Expand All @@ -23,7 +23,7 @@ def run_midazolam_experiments(output_path: Path) -> None:
Mandema1992,
Kupferschmidt1995,
],
simulator=SimulatorParallel(),
simulator=SimulatorSerial(),
base_path=base_path,
data_path=base_path / "data",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Timecourse,
TimecourseSim,
)
from sbmlsim.simulator.simulation_ray import SimulatorParallel, SimulatorSerial
from sbmlsim.simulator.simulation_serial import SimulatorSerial
from sbmlsim.task import Task
from sbmlsim.test import MODEL_REPRESSILATOR

Expand Down Expand Up @@ -219,7 +219,7 @@ def run_repressilator_experiments(output_path: Path) -> Path:
base_path = Path(__file__).parent
data_path = base_path

for simulator in [SimulatorSerial(), SimulatorParallel()]:
for simulator in [SimulatorSerial()]:
runner = ExperimentRunner(
[RepressilatorScanExperiment],
simulator=simulator,
Expand Down
Loading

0 comments on commit 42e6a7e

Please sign in to comment.