Skip to content

testsuite.report

The report of a run of the SBML Test Suite.

TestSuiteReport renders the results of a run as a single HTML page which extends report_base.html, i.e. it has the search, the filter chips and the sortable tables of the other reports of sbmlsim and needs no network. The page answers which parts of SBML the simulation supports: the cases are aggregated over their componentTags and their testTags, and the outcome of a case is a filter over the case table.

TagSummary dataclass

TagSummary(tag, n, passed)

The cases of one tag of the suite.

Attributes:

Name Type Description
tag str

the component or test tag.

n int

number of cases which carry it.

passed int

number of them which passed.

failed property

failed

Get the number of cases of the tag which did not pass.

rate property

rate

Get the fraction of the cases of the tag which passed.

TestSuiteReport

TestSuiteReport(results, suite_version)

Report of a run of the semantic cases of the SBML Test Suite.

Construct the report.

Parameters:

Name Type Description Default
results Sequence[CaseResult]

the results of the run, one per case.

required
suite_version str

release of the suite which was run.

required

n_passed property

n_passed

Get the number of cases which passed.

pass_rate property

pass_rate

Get the fraction of the cases which passed.

counts

counts()

Get the number of cases per outcome, the largest first.

tag_summaries

tag_summaries(test_tags=False)

Aggregate the cases over their tags.

A case carries several tags and counts for each of them, so the numbers of the tags do not add up to the number of cases.

Parameters:

Name Type Description Default
test_tags bool

aggregate the testTags instead of the componentTags.

False

Returns:

Type Description
list[TagSummary]

One summary per tag, the worst pass rate first. Sorting by the

list[TagSummary]

number of failures instead would lead with the tags almost every

list[TagSummary]

case carries, i.e. Parameter and Species, which only restate

list[TagSummary]

the overall rate; a tag which fails everywhere is the finding.

to_df

to_df()

Get the results as a table, one row per case.

context

context()

Collect everything the report shows.

Returns:

Type Description
dict[str, Any]

The context of the testsuite_report.html template.

create

create(output_dir)

Write the report and the results it is made from.

Parameters:

Name Type Description Default
output_dir Path

directory of the report, created if it is missing.

required

Returns:

Type Description
Path

Path of index.html.

versions

versions()

Get the versions the results were produced with.

Returns:

Type Description
dict[str, str]

The packages which decide the results, by name.