Scan ReportΒΆ
- class giskard.scanner.report.ScanReport(issues, model=None, dataset=None, as_html: bool = True)[source]ΒΆ
Bases:
object
The scan report contains the results of the scan.
Note that this object is not meant to be instantiated directly. Instead, it is returned by the
giskard.scan
. SeeScanner
for more details.- Parameters:
- generate_test_suite(name=None)[source]ΒΆ
Automatically generates a test suite from the scan results.
This method provides a way to generate a test suite automatically, based on the issues detected by the scan. The test suite can be used to reproduce the issues and can be uploaded to the Giskard Hub for debugging.
- Parameters:
name (Optional[str]) β The name of the test suite. If not provided, a default name will be used. You can also change the name later by accessing the
name
attribute of the returned test suite.- Returns:
A test suite containing tests from the scan results.
- Return type:
- generate_tests(with_names=False)[source]ΒΆ
Automatically generates tests from the scan results.
This method provides a way to generate a list of tests automatically, based on the issues detected by the scan. Usually you will want to generate a test suite directly, see
generate_test_suite
for more details.- Parameters:
with_names (Optional[bool]) β Whether to return the test names as well. If
True
, the method will return a list of tuples.- Returns:
A list of Giskard test objects.
- Return type:
list
- to_avid(filename=None)[source]ΒΆ
Renders the scan report as an AVID report.
Saves or returns the AVID representation of the scan report.
- Parameters:
filename (Optional[str]) β If provided, the AVID report will be written to the file.
- to_dataframe()[source]ΒΆ
Returns the scan report as a pandas DataFrame.
- Returns:
A pandas DataFrame containing the scan report details.
- Return type:
pd.DataFrame
- to_html(filename=None, embed=False)[source]ΒΆ
Renders the scan report as HTML.
Saves or returns the HTML representation of the scan report.
- Parameters:
filename (Optional[str]) β If provided, the HTML will be written to the file.
embed (Optional[bool]) β Whether to configure the HTML to be embedded in an iframe.
- to_markdown(filename=None, template='summary')[source]ΒΆ
Renders the scan report as markdown.
Saves or returns the markdown representation of the scan report.
- Parameters:
filename (Optional[str]) β If provided, the markdown will be written to the file.
template (Optional[str]) β The template to use. Currently, only
summary
is supported.