Skip to content

Commit

Permalink
Re-fix old problem; also fix test.
Browse files Browse the repository at this point in the history
Somehow, the old 'relative tolerance adjustment factor' fix got dropped?  Probably because of git?  Anyway, re-reverted.  Also, the roadrunner objects inside the presimulated task are now organized by task ID.
  • Loading branch information
luciansmith committed Jul 24, 2023
1 parent 61f38d7 commit ce83dac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion biosimulators_tellurium/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def preprocess_sed_task(task, variables, config=None, simulator_config=None):
att = param_props['id']
if "roadrunner_attribute" in param_props:
att = param_props['roadrunner_attribute']
setattr(solver, att, new_value)
setattr(solver, att, new_value)

else:
if (
Expand Down
1 change: 1 addition & 0 deletions biosimulators_tellurium/data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class PlottingEngine(str, enum.Enum):
'KISAO_0000571': {
'kisao_id': 'KISAO_0000571',
'id': 'absolute_tolerance_adjustment_factor',
'roadrunner_attribute': 'absolute_tolerance',
'name': 'absolute tolerance adjustment factor',
'type': ValueType.float,
'default': 1e-12,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_core_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,9 @@ def test_exec_sed_task_with_preprocesssed_task(self):
variable_results, log = core.exec_sed_task(task, variables, preprocessed_task=preprocessed_task)
with self.assertRaises(AssertionError):
numpy.testing.assert_allclose(variable_results['C'][-1], end_c)
mid_c = preprocessed_task.road_runner['C']
mid_m = preprocessed_task.road_runner['M']
mid_x = preprocessed_task.road_runner['X']
mid_c = preprocessed_task.road_runner[task.id]['C']
mid_m = preprocessed_task.road_runner[task.id]['M']
mid_x = preprocessed_task.road_runner[task.id]['X']
self.assertIsInstance(mid_c, float)

variable_results, log = core.exec_sed_task(task, variables, preprocessed_task=preprocessed_task)
Expand Down

0 comments on commit ce83dac

Please sign in to comment.