Skip to content

Finalize coverage schema #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 3, 2025
Merged

Conversation

Pennycook
Copy link
Contributor

Related issues

Proposed changes

  • Remove all the old coverage-*.schema files, since we only support the latest (and we're in pre-release!).
  • Remove support for regions within coverage files (e.g., [[1, 5]] being equivalent to [1, 2, 3, 4, 5]) to simplify usage.
  • Split lines into used_lines and unused_lines, because this is required to compute coverage.
  • Update tests and documentation to reflect these changes.

The library only supports a single version of the coverage schema,
and there is no reason for us to maintain this list of previous versions.

Signed-off-by: John Pennycook <[email protected]>
We originally designed this to support a nested list, where inner lists
represented regions (e.g., [[1, 4], [6, 8]]).

We've never used this functionality, and it makes consuming coverage
information more complicated than it needs to be. This is an example of
premature optimization, so I'm reverting things to the simpler form.

Signed-off-by: John Pennycook <[email protected]>
Tracking only the used lines was sufficient to compute divergence, but is not
sufficient to compute coverage; computing coverage requires information about
the number of unused lines, in order to represent things as a percentage.

Signed-off-by: John Pennycook <[email protected]>
The new results aren't accurate, in the sense that I didn't regenerate them to
capture the true number of unused lines. This commit simply changes the format,
replacing "lines" with "used_lines" and setting "unused_lines" to [].

Signed-off-by: John Pennycook <[email protected]>
@Pennycook Pennycook added the enhancement New feature or request label Mar 21, 2025
@Pennycook Pennycook added this to the 1.0.0 milestone Mar 21, 2025
@Pennycook Pennycook requested a review from laserkelvin March 21, 2025 13:28
@Pennycook
Copy link
Contributor Author

@swright87 - I don't think this should break anything that you've contributed here, but I wanted to make you aware of this change in case it impacts anything that you're doing with P3 Explorer. But if you and @laserkelvin agree on this direction, this should be the last breaking change to this format.

@swright87
Copy link
Collaborator

I'm 99.9% sure it'll be fine with my contributions to P3, but it will likely impact some of the P3 Explorer stuff. I'll poke @Mxtt-smith to update

Copy link

@laserkelvin laserkelvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm broadly okay with these changes!

@Pennycook Pennycook merged commit 88d14c4 into P3HPC:main Apr 3, 2025
7 checks passed
@Pennycook Pennycook deleted the feature/coverage-format branch April 3, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants