Skip to content

Commit

Permalink
Handle local parameters (again).
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
luciansmith committed Oct 9, 2024
1 parent 3242f97 commit e87be03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
fi
echo "version=$version" >> $GITHUB_OUTPUT
echo "version=$version"
- id: get-docker-image-tag
name: Determine Docker image tag
Expand Down
6 changes: 4 additions & 2 deletions biosimulators_tellurium/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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

6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e87be03

Please sign in to comment.