From 4ff0fa033bb7421814dc347df5eead58ab220fea Mon Sep 17 00:00:00 2001 From: Lucian Smith Date: Tue, 15 Aug 2023 13:56:38 -0700 Subject: [PATCH 1/4] Set minimum number of presimulation points to 2. --- biosimulators_tellurium/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/biosimulators_tellurium/core.py b/biosimulators_tellurium/core.py index 2dd1ff7..e527ca1 100644 --- a/biosimulators_tellurium/core.py +++ b/biosimulators_tellurium/core.py @@ -268,6 +268,7 @@ def exec_sed_task(task, variables, preprocessed_task=None, log=None, config=None (sim.output_end_time - sim.output_start_time) * sim.number_of_steps + 1 number_of_presim_points = round(number_of_presim_points) - sim.number_of_steps + number_of_presim_points = max(2, number_of_presim_points) road_runner.simulate(sim.initial_time, sim.output_start_time, number_of_presim_points) results = numpy.array(road_runner.simulate(sim.output_start_time, sim.output_end_time, sim.number_of_steps+1).tolist()).transpose() From 61452fc0154d992951103889d2df4b75d420b978 Mon Sep 17 00:00:00 2001 From: Lucian Smith Date: Tue, 15 Aug 2023 13:57:11 -0700 Subject: [PATCH 2/4] Update version number. --- biosimulators_tellurium/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/biosimulators_tellurium/_version.py b/biosimulators_tellurium/_version.py index 5e82d80..0d033df 100644 --- a/biosimulators_tellurium/_version.py +++ b/biosimulators_tellurium/_version.py @@ -1 +1 @@ -__version__ = '0.1.39' +__version__ = '0.1.40' From 30041787f3fb1f1e625475d8034bceaa82075dbe Mon Sep 17 00:00:00 2001 From: Lucian Smith Date: Tue, 15 Aug 2023 14:14:36 -0700 Subject: [PATCH 3/4] Fix lint. --- biosimulators_tellurium/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/biosimulators_tellurium/core.py b/biosimulators_tellurium/core.py index e527ca1..1caab30 100644 --- a/biosimulators_tellurium/core.py +++ b/biosimulators_tellurium/core.py @@ -311,10 +311,10 @@ def exec_sed_task(task, variables, preprocessed_task=None, log=None, config=None def get_all_tasks_from_task(task): ret = set() - if type(task) == Task: + if task.isinstance(Task): ret.add(task) return ret - elif type(task) == RepeatedTask: + elif task.isinstance(RepeatedTask): for sub_task in task.sub_tasks: submodels = get_all_tasks_from_task(sub_task.task) ret.update(submodels) From 7e8cc5f7bd7aa62c464f4a7de6a88cbae869dfcd Mon Sep 17 00:00:00 2001 From: Lucian Smith Date: Tue, 15 Aug 2023 14:22:31 -0700 Subject: [PATCH 4/4] Use isinstance correctly (sigh). --- biosimulators_tellurium/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/biosimulators_tellurium/core.py b/biosimulators_tellurium/core.py index 1caab30..705e7ef 100644 --- a/biosimulators_tellurium/core.py +++ b/biosimulators_tellurium/core.py @@ -311,10 +311,10 @@ def exec_sed_task(task, variables, preprocessed_task=None, log=None, config=None def get_all_tasks_from_task(task): ret = set() - if task.isinstance(Task): + if isinstance(task, Task): ret.add(task) return ret - elif task.isinstance(RepeatedTask): + elif isinstance(task, RepeatedTask): for sub_task in task.sub_tasks: submodels = get_all_tasks_from_task(sub_task.task) ret.update(submodels)