From e87be03e9eb52825794e630a9fbf022f0a0a77b2 Mon Sep 17 00:00:00 2001 From: Lucian Smith Date: Wed, 9 Oct 2024 16:54:26 -0700 Subject: [PATCH] Handle local parameters (again). Two aspects to the fix: * Load in the 'param promoted' version of the SBML. * Use the new 'separator' argument of validate_target_xpaths from biosimulators_utils to get IDs like "J0_n" instead of just "n". --- .github/workflows/ci.yml | 1 + biosimulators_tellurium/core.py | 6 ++++-- requirements.txt | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d4a62b..f7b8056 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,6 +125,7 @@ jobs: fi echo "version=$version" >> $GITHUB_OUTPUT + echo "version=$version" - id: get-docker-image-tag name: Determine Docker image tag diff --git a/biosimulators_tellurium/core.py b/biosimulators_tellurium/core.py index 0754333..9dac704 100644 --- a/biosimulators_tellurium/core.py +++ b/biosimulators_tellurium/core.py @@ -431,7 +431,8 @@ def preprocess_sed_task(task, variables, config=None, simulator_config=None): warning_summary='Model `{}` may be invalid.'.format(model.id)) # read model - road_runner = roadrunner.RoadRunner(model.source) + road_runner = roadrunner.RoadRunner() + road_runner = roadrunner.RoadRunner(road_runner.getParamPromotedSBML(model.source)) # get algorithm to execute algorithm_substitution_policy = get_algorithm_substitution_policy(config=config) @@ -583,7 +584,7 @@ def get_model_change_target_tellurium_change_map(model_etree, changes, alg_kisao Returns: :obj:`dict`: dictionary that maps the targets of changes to their corresponding tellurium identifiers """ - change_targets_to_sbml_ids = validation.validate_target_xpaths(changes, model_etree, attr='id') + change_targets_to_sbml_ids = validation.validate_target_xpaths(changes, model_etree, attr='id', separator="_") species_ids = model.getFloatingSpeciesIds() + model.getBoundarySpeciesIds() component_ids = species_ids + model.getGlobalParameterIds() + model.getCompartmentIds() @@ -889,3 +890,4 @@ def exec_sed_doc_with_tellurium(doc, working_dir, base_out_path, rel_out_path=No # Return a data structure with the results of the reports return report_results, log + diff --git a/requirements.txt b/requirements.txt index 965b78d..6d9c617 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -biosimulators_utils[logging] >= 0.1.187 -kisao >= 2.33 -libroadrunner >= 2.5.0 +biosimulators_utils[logging] >= 0.2.3 +kisao >= 2.34 +libroadrunner >= 2.7.0 lxml numpy pandas