-
Notifications
You must be signed in to change notification settings - Fork 20
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
Generate rust coverage data #84
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds great! Let's add a temporary commit to make sure that it reports missing Rust and Python coverage.
26a9441
to
a500fb7
Compare
a500fb7
to
b4bae89
Compare
Alright, I see good cache hits & usage. And testing commit failed as expected: https://github.com/dottxt-ai/outlines-core/actions/runs/11594946487/job/32282843486
Generated html & uploaded it: Seems, we're good to go 🚀 The only issue I see with this, is that we're adding a strong necessity to add potentially vain and unnecessary tests (which exist) just for the sake of coverage, which isn't always justified, considering huge compiler support in Rust, which will check so many things and complain on its own. At least I would appreciate a review 🙏 @brandonwillard ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! @torymur, feel free to merge it after removing the two test commits.
The only issue I see with this, is that we're adding a strong necessity to add potentially vain and unnecessary tests (which exist) just for the sake of coverage, which isn't always justified, considering huge compiler support in Rust, which will check so many things and complain on its own. At least
tarpaulin
allows to exclude some pieces explicitly. But, let's give it a try and see how it's going to be in action.
Yeah, as you said, we'll need to add some coverage ignore directives; otherwise, we'll leave it up to the admins to ignore those failures and merge anyway.
66a3dce
to
b4bae89
Compare
Closes #33
In order to retain our python
coverage
anddiff-cover
tool chain we're:lcov
format withcargo-tarpaulin
lcov
instead ofxml
lcov
into onediff-cover
seems to be able to handle combinedlcov
filegenhtml
tool is used instead ofcoverage html
to create html from combined file, which will create a bit different UI, but nothing major seems to change.From something like this:
To this:
Also changed in PR:
actions-rs
action is archived,dtolnay/rust-toolchain
now usedSwatinem/rust-cache
currently is the best way to handle rust cache workflows, it's a "smart caching for rust/cargo projects with sensible defaults"