Coverage (Output)
Mutant provides comprehensive reporting capabilities to evaluate the diversity, difficulty, and overall quality of your generated datasets. This is the final stage of the pipeline.
Dataset Coverage
When generating datasets, you want to ensure they cover a wide range of behavioral dimensions. Mutant analyzes the generated scenarios and produces a coverage report.
This report visualizes: - Input Diversity: How varied the prompts are. - Difficulty: The cognitive load required to solve the scenarios. - Domain Coverage: The breadth of topics addressed.
Example: HTML Dashboard
You can instantly visualize your dataset's coverage using the HTML reporter:
from mutant.reports.html import HtmlReport
# Generate a self-contained HTML file
report = HtmlReport()
report.save(scenario, dataset.cases, path="dashboard.html")
API Reference
mutant.reports.html
HTML report generator.
HtmlReport
Generates a self-contained HTML report.
Example
report = HtmlReport() report.save(scenario, cases, path="report.html")
Source code in mutant/reports/html.py
mutant.reports.json
JSON and Markdown report generators.
JsonReport
Serialises mutation results to JSON.
Example
report = JsonReport() report.save(scenario, cases, path="report.json")
Source code in mutant/reports/json.py
render(scenario, cases)
save(scenario, cases, path)
Render and save the report to path. Returns the resolved path.
Source code in mutant/reports/json.py
MarkdownReport
Serialises mutation results to a Markdown document.
Example
report = MarkdownReport() report.save(scenario, cases, path="report.md")
Source code in mutant/reports/json.py
save(scenario, cases, path)
Render and save the report to path. Returns the resolved path.