Skip to content

testsuite.runner

The pipeline of the harness.

Every runnable case goes through five stages: the roadrunner simulation of the original SBML, the conversion to CellML, the libopencor simulation of the CellML, the conversion back to SBML and the roadrunner simulation of the roundtrip SBML. Every simulation is compared with the expected results of the case. The simulators run in worker processes, the conversions in this process.

roadrunner_selections

roadrunner_selections(case, model)

Roadrunner selections of the settings variables of the original model.

A species expected as concentration is selected as [id], everything else by id.

run_case

run_case(case, work_dir, roadrunner, libopencor)

Run the five stages of a case.

Parameters:

Name Type Description Default
case Case

a runnable case.

required
work_dir Path

directory for the converted files.

required
roadrunner SimulatorWorker

worker for the SBML simulations.

required
libopencor SimulatorWorker

worker for the CellML simulation.

required

Returns:

Type Description
CaseResult

The stage results; a stage whose input stage failed is skip. Every

CaseResult

stage is fail when the case itself cannot be set up (e.g. an

CaseResult

unparsable SBML file). When case.expected is None, the

CaseResult

roadrunner simulation of the original model becomes the expected

CaseResult

results for libopencor and roundtrip when it succeeds; when it

CaseResult

fails, those two stages are skip (roadrunner failed) instead of

CaseResult

running, and roadrunner itself has no max_excess (there is

CaseResult

nothing to compare it with). CaseResult.informative is

CaseResult

sbml2cellml.testsuite.compare.is_informative of the expected frame

CaseResult

(the case's expected results, or the roadrunner simulation once it

CaseResult

is known), None when there is no expected frame, i.e.

CaseResult

case.expected is None and the roadrunner stage failed.

run_suite

run_suite(cases, work_dir, timeout=60.0, progress=None)

Run the pipeline for every runnable case.

Parameters:

Name Type Description Default
cases list[Case]

the cases; unrunnable ones are recorded as skipped.

required
work_dir Path

directory for the converted files, created if needed.

required
timeout float

seconds per simulator call.

60.0
progress Callable[[str], None] | None

called with the finished status line of the case after every runnable case, e.g. 00001 roadrunner=pass sbml2cellml=pass libopencor=fail cellml2sbml=pass roundtrip=fail.

None

Returns:

Type Description
SuiteResult

The suite result.