Skip to content

Commit

Permalink
feat: updated to pyBioNetGen 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Mar 26, 2022
1 parent e8960a6 commit 8c4f72a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion biosimulators_utils/model_lang/bngl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_parameters_variables_outputs_for_simulation(model_filename, model_langua
raise ValueError((
'Sample times (`sample_times`) must be a non-empty array of floats '
'greater than or equal to the simulation start time (`t_start`).'
))
)) # pragma: no cover; caught by BioNetGen's own validation
sample_times = sorted([float(sample_time.strip()) for sample_time in args['sample_times'][1:-1].strip().split(',')])
output_start_time = sample_times[0]
output_end_time = sample_times[-1]
Expand Down
2 changes: 1 addition & 1 deletion requirements.optional.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#################################
## Model languages
[bngl]
bionetgen >= 0.4.7
bionetgen >= 0.7.2

[cellml]
libcellml
Expand Down
2 changes: 1 addition & 1 deletion tests/model_lang/bngl/test_bngl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_get_parameters_variables_for_simulation_with_sample_times(self):
self.assertEqual(sims[0].number_of_steps, 4)

def test_get_parameters_variables_for_simulation_with_empty_sample_times(self):
with self.assertRaisesRegex(ValueError, 'must be a non-empty array'):
with self.assertRaisesRegex(ValueError, 'failed to parse action'):
get_parameters_variables_outputs_for_simulation(os.path.join(self.FIXTURE_DIRNAME, 'empty-sample-times.bngl'),
None, UniformTimeCourseSimulation, None)

Expand Down

0 comments on commit 8c4f72a

Please sign in to comment.