ChecksSummaryDisplay#

class skore.ChecksSummaryDisplay(check_results, not_applicable_codes, n_ignored_codes, fast_mode)[source]#

Display for the checks summary.

An instance of this class will be created by summarize(). This class should not be instantiated directly.

The display object has an HTML representation organized in four tabs (Issues, Tips, Passed, Not Applicable). The full list of check results is accessible via the frame() method.

Parameters:
check_resultsdict of str to dict

Results of applicable checks keyed by check code (e.g. "SKD001"). Each value is a dict with keys "title", "explanation", "severity" ("issue" or "tip"), and optionally "docs_url".

not_applicable_codesset of str

Check codes that raised CheckNotApplicable.

n_ignored_codesint

Number of the checks that were muted via ignore= or the global ignore_checks configuration.

frame(section='all')[source]#

Return check results as a DataFrame.

Parameters:
section{“issue”, “tip”, “passed”, “not_applicable”, “all”}, default=”all”

Which results to include. "issue" / "tip" return only the matching findings; "passed" returns the checks that ran without reporting anything; "not_applicable" returns checks that could not run; "all" returns every check result.

Returns:
pandas.DataFrame

A DataFrame with one row per check and columns "code", "title", "section", "explanation", and "documentation_url". The "explanation" column is None for checks that passed without reporting anything.

help()[source]#

Display display help using rich or HTML.

set_style(*, policy='update', **kwargs)[source]#

Set the style parameters for the display.

Parameters:
policyLiteral[“override”, “update”], default=”update”

Policy to use when setting the style parameters. If “override”, existing settings are set to the provided values. If “update”, existing settings are not changed; only settings that were previously unset are changed.

**kwargsdict

Style parameters to set. Each parameter name should correspond to a a style attribute passed to the plot method of the display.

Returns:
None
Raises:
ValueError

If a style parameter is unknown.

static style_plot(plot_func)[source]#

Apply consistent style to skore displays.

This decorator: 1. Applies default style settings 2. Runs plot_func under plt.ioff() so figures are not shown until returned 3. Calls Figure.tight_layout() on the returned figure when applicable 4. Restores the original style settings

Parameters:
plot_funccallable

The plot function to be decorated.

Returns:
callable

The decorated plot function.