Open
Description
Currently, coverage data is found in HTML files. To ease extraction and metrics, would be good to write coverage data to a JSON file.
The first time coverage data for a particular package is written to this repo, a JSON file should be created and committed. For subsequent coverage runs, coverage data should be appended to the JSON file to allow for tracking coverage over time.
JSON coverage data can then be rolled up/aggregated within namespaces to provide coverage metrics for an entire namespace.
The format of the coverage data can be condensed. E.g.,
[ <num_statements>, <total_statements>, <statements_percentage>, <num_branches>, <total_branches>, <branches, percentage>, ... ]
The condensed format should be explicitly documented.
May also be good to append coverage data to a CSV file, as well, for ease of use in other analysis tools.
Metadata
Metadata
Assignees
Labels
No labels
Activity
vtushar06 commentedon Jun 19, 2025
Hi @kgryte sir,
This sounds like a great feature and a valuable addition to the project!
I’d love to contribute to this issue by implementing JSON coverage output and appending future results to the same file for historical tracking.
Just to clarify before I get started:
• Should the JSON file follow a naming convention (e.g., package-name.coverage.json)?
• Do you have a preferred directory for storing these JSON/CSV files?
• Is there already an example HTML file or coverage output format I can refer to while extracting data?
Once confirmed, I’ll get started with a PR for initial coverage data write logic and documentation of the condensed format.
Looking forward to your guidance!
@vtushar06