firecrown.fctools.coverage_summary
Comprehensive tool to analyze test coverage output in JSON format.
This tool provides a detailed analysis of test coverage including: - Overall coverage summary - Per-file coverage breakdown - Detailed information about untested lines and branches - Files with less than perfect coverage
Attributes
Classes
Summary statistics for coverage analysis. |
|
Information about coverage issues in a specific file. |
Functions
|
Analyze coverage data from a JSON file. |
|
Print overall coverage summary. |
|
Print detailed information about files with coverage issues. |
|
Print files with perfect coverage. |
|
Analyze test coverage output in JSON format. |
Module Contents
- class firecrown.fctools.coverage_summary.CoverageSummary[source]
Summary statistics for coverage analysis.
- total_files: int = 0
- files_with_perfect_coverage: int = 0
- files_with_missing_lines: int = 0
- files_with_missing_branches: int = 0
- files_with_excluded_lines: int = 0
- overall_line_coverage: float = 0.0
- overall_branch_coverage: float = 0.0
- total_statements: int = 0
- total_missing_lines: int = 0
- total_excluded_lines: int = 0
- total_branches: int = 0
- total_missing_branches: int = 0
- class firecrown.fctools.coverage_summary.FileIssue[source]
Information about coverage issues in a specific file.
- file_path: str
- line_coverage: float
- branch_coverage: float
- missing_lines_count: int
- missing_branches_count: int
- excluded_lines_count: int
- missing_lines: list[int]
- missing_branches: list[list[int]]
- excluded_lines: list[int]
- total_statements: int
- total_branches: int
- firecrown.fctools.coverage_summary.analyze_coverage_json(console, coverage_file)[source]
Analyze coverage data from a JSON file.
- Parameters:
console (rich.console.Console)
coverage_file (pathlib.Path)
- Return type:
tuple[CoverageSummary, list[FileIssue]]
- firecrown.fctools.coverage_summary.print_coverage_summary(console, summary)[source]
Print overall coverage summary.
- Parameters:
console (rich.console.Console)
summary (CoverageSummary)
- Return type:
None
- firecrown.fctools.coverage_summary.print_file_issues(console, file_issues, show_source=True)[source]
Print detailed information about files with coverage issues.
- Parameters:
console (rich.console.Console)
file_issues (list[FileIssue])
show_source (bool)
- Return type:
None
- firecrown.fctools.coverage_summary.print_perfect_coverage_files(console, file_issues, all_files)[source]
Print files with perfect coverage.
- Parameters:
console (rich.console.Console)
file_issues (list[FileIssue])
all_files (list[str])
- Return type:
None
- firecrown.fctools.coverage_summary.app
- firecrown.fctools.coverage_summary.main(coverage_file=typer.Argument(..., exists=True, file_okay=True, dir_okay=False, readable=True, resolve_path=True, help='Path to the coverage JSON file to analyze'), show_source=typer.Option(False, '--show-source', help='Show source code for missing lines'), show_perfect=typer.Option(False, '--show-perfect', help='Show files with perfect coverage'))[source]
Analyze test coverage output in JSON format.
This tool provides a detailed analysis of test coverage including overall coverage summary, per-file breakdown, detailed information about untested lines and branches, and files with imperfect coverage.
- Parameters:
coverage_file (pathlib.Path)
show_source (bool)
show_perfect (bool)
- Return type:
None