From c051c372f9a2119639c7f4925e4074076946543e Mon Sep 17 00:00:00 2001 From: Jonathan Karr Date: Sat, 26 Feb 2022 23:35:15 -0500 Subject: [PATCH] feat: added additional error checking for XPP ODE files for too many boundary conditions --- biosimulators_utils/_version.py | 2 +- biosimulators_utils/model_lang/xpp/validation.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/biosimulators_utils/_version.py b/biosimulators_utils/_version.py index ec51d014..1bc7156d 100644 --- a/biosimulators_utils/_version.py +++ b/biosimulators_utils/_version.py @@ -1 +1 @@ -__version__ = '0.1.163' +__version__ = '0.1.164' diff --git a/biosimulators_utils/model_lang/xpp/validation.py b/biosimulators_utils/model_lang/xpp/validation.py index aac475a1..de241d8c 100644 --- a/biosimulators_utils/model_lang/xpp/validation.py +++ b/biosimulators_utils/model_lang/xpp/validation.py @@ -93,6 +93,9 @@ def validate_model(filename, elif re.search(r'\berror\b', stdout, re.IGNORECASE): errors.append(['`{}` is not a valid XPP file.'.format(filename), [[stdout]]]) + elif 'Too many boundary conditions' in stdout: + errors.append(['`{}` has too many boundary conditions']) + if not errors: cmd = ['xppaut', os.path.basename(sanitized_filename), '-qics', '-qpars', '-outfile', var_param_filename, '-quiet', '1'] result = subprocess.run(