ChecksSummaryDisplay#
- class skore.ChecksSummaryDisplay(check_results, 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 tabs (
Issues,Tips,Passed,Not Applicable,Skipped,Ignored). The full list of check results is accessible via theframe()method.- Parameters:
- check_resultsdict of CheckCode to CheckResult
Summary of all checks keyed by check code (e.g.
"SKD001"). Each value has keys"title","explanation","section", and optionally"docs_url". The"section"value is one of"issue","tip","passed","not_applicable","skipped", or"ignored".
- frame(section='all')[source]#
Return check results as a DataFrame.
- Parameters:
- section{“issue”, “tip”, “passed”, “not_applicable”, “skipped”, “ignored”, “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;"skipped"returns checks not run in fast mode;"ignored"returns muted checks;"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 isNonefor checks that passed, were skipped, or were ignored. For issue/tip/not-applicable rows it is a string for single-report results, or a dict mapping source names to messages for aggregated comparison results (entries with aNoneexplanation are omitted from the dict).
- 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_funcunderplt.ioff()so figures are not shown until returned 3. CallsFigure.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.