Skip to content

testsuite.report

Markdown report of a suite run, the page docs/testsuite.md.

tolerance_text

tolerance_text(value)

A tolerance as it is written in the documentation, e.g. 1e-9.

Parameters:

Name Type Description Default
value float

a tolerance.

required

Returns:

Type Description
str

The scientific notation without the zeros of the mantissa and the

str

exponent, e.g. 1e-3 and 2.5e-4.

solver_text

solver_text()

Sentences on the solver settings of the simulations of a report.

Returns:

Type Description
str

The tolerances and the number of internal steps of

str

sbml2cellml.testsuite.runner.SOLVER_SETTINGS, so that the reports

str

document the settings the simulations ran with.

render_report

render_report(
    result,
    title="SBML test suite",
    intro=TESTSUITE_INTRO,
    command="sbml2cellml-testsuite",
    names=False,
    figure=None,
)

Render the report.

Parameters:

Name Type Description Default
result SuiteResult

a suite run.

required
title str

page title, the level-1 heading.

'SBML test suite'
intro str

intro text right after the title; {suite} is replaced with result.suite and {solver} with solver_text.

TESTSUITE_INTRO
command str

command named in the generated-by header.

'sbml2cellml-testsuite'
names bool

whether the cases table gets a name column.

False
figure str | None

path of the bar diagram relative to the report, shown in the summary together with its variant for dark backgrounds (sbml2cellml.testsuite.figure); no figure when None.

None

Returns:

Type Description
str

The markdown page.

write_report

write_report(
    result,
    path,
    title="SBML test suite",
    intro=TESTSUITE_INTRO,
    command="sbml2cellml-testsuite",
    names=False,
    figure=None,
    figure_title=None,
    figure_cases="cases",
)

Write the report and, with figure, its bar diagram.

Parameters:

Name Type Description Default
result SuiteResult

a suite run.

required
path Path

markdown file, overwritten.

required
title str

page title, the level-1 heading.

'SBML test suite'
intro str

intro text right after the title; {suite} is replaced with result.suite and {solver} with solver_text.

TESTSUITE_INTRO
command str

command named in the generated-by header.

'sbml2cellml-testsuite'
names bool

whether the cases table gets a name column.

False
figure str | None

path of the bar diagram relative to the report, written for light and dark backgrounds; no figure when None.

None
figure_title str | None

start of the title of the figure, the SBML test suite with its version when None.

None
figure_cases str

what a case is in the figure, e.g. models.

'cases'