Skip to content

testsuite.figure

Bar diagram of a suite run, the figures docs/images/testsuite*.svg.

One horizontal bar per stage of the pipeline, stacked from the cases which pass, fail and skip the stage, so the drop along the pipeline is visible at a glance. The figure is written twice, for light and for dark backgrounds; both are transparent, so they fit the documentation site as well as the README on GitHub and PyPI.

dark_path

dark_path(path)

Path of the figure for dark backgrounds.

Parameters:

Name Type Description Default
path P

path of the figure for light backgrounds.

required

Returns:

Type Description
P

The path with _dark added to the file name, testsuite_dark.svg

P

for testsuite.svg.

render_figure

render_figure(
    result, title=None, dark=False, cases="cases"
)

Render the bar diagram.

Parameters:

Name Type Description Default
result SuiteResult

a suite run.

required
title str | None

start of the title, followed by the number of cases; the SBML test suite with its version when None.

None
dark bool

whether the figure is for a dark background.

False
cases str

what a case is, in the title and on the axis, e.g. models.

'cases'

Returns:

Type Description
Figure

The figure with a transparent background.

write_figures

write_figures(result, path, title=None, cases='cases')

Write the bar diagram for light and for dark backgrounds.

Parameters:

Name Type Description Default
result SuiteResult

a suite run.

required
path Path

SVG file of the figure for light backgrounds, overwritten; the figure for dark backgrounds goes to dark_path(path).

required
title str | None

start of the title of the figure, see render_figure.

None
cases str

what a case is, see render_figure.

'cases'