-
Notifications
You must be signed in to change notification settings - Fork 184
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
Add GHA workflow to compute code coverage via examples #1785
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1785 +/- ##
==========================================
+ Coverage 98.15% 98.86% +0.71%
==========================================
Files 125 112 -13
Lines 5738 4841 -897
==========================================
- Hits 5632 4786 -846
+ Misses 106 55 -51 ☔ View full report in Codecov by Sentry. |
# examples present but not run | ||
"R/lint.R", | ||
"R/use_lintr.R", | ||
# mostly internal utilities |
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.
We can work on removing some of these exceptions in the future.
Thanks for keeping at this PR. I'm not sure at a high level how to think of this PR... are we expecting ourselves to achieve (asymptotically) 100% coverage, twice? (once through Would it be better if we just focused on getting (asymptotically) 100% coverage between |
No, I think the goals here are quite different-
I don't think there is much to gain from achieving 100% code coverage in the latter case, and this is why we have such an extensive exceptions list. The goal is to make sure that we have enough examples for key functions, and code coverage is just a way to check that; maybe there is another way to check this, but I am not aware of one. Does that sound reasonable? |
Does it make sense to have such a test in CI? It feels like something we should monitor occasionally, but is not high importance to match on every PR. In particular the long list of Next, what does |
I think so, yes. We have added linters for which either there were no examples or not sufficient number of examples.
Sure, we don't need to run it on every PR. We could set up a cron job to run this workflow on a weekly or monthly basis on the default branch.
This is going to be a problem only if we frequently add new files that contain utility or internal-only functions. But, based on my experience in the last 2 years, this is rarely the case, and it may become increasingly rare going forward.
Can you give me an example where we will need to do this? |
Sorry, I was confusing myself. I guess what I had in mind is a separate sentinel like
Yes, let's go with monthly for now. |
Yes, that's something we can slowly work on. |
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.
LGTM to try it out, thanks for your persistence!
Closes #1675