Skip to content

Commit

Permalink
feat: improved messages for invalid CellML files
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Dec 20, 2021
1 parent 22dc6f4 commit 022309e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# VERSION
ARG VERSION=0.0.10
ARG VERSION=0.0.11
ARG SIMULATOR_VERSION="2021-10-05"

# Base OS
Expand Down
2 changes: 1 addition & 1 deletion biosimulators_opencor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.10'
__version__ = '0.0.11'
8 changes: 7 additions & 1 deletion biosimulators_opencor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,13 @@ def validate_opencor_simulation(sim):
:obj:`ValueError`: if the simulation is invalid
"""
if sim.hasBlockingIssues() or not sim.valid():
raise ValueError('The task does not describe a valid simulation.')
msg = 'The task does not describe a valid simulation:\n\n {}'.format(
'\n\n '.join(
''.join(lxml.etree.fromstring('<root>' + issue + '</root>').itertext())
for issue in sim.issues()
)
)
raise ValueError(msg)


def get_results_from_opencor_simulation(opencor_sim, sed_task, sed_variables, opencor_variable_names):
Expand Down

0 comments on commit 022309e

Please sign in to comment.