-
Notifications
You must be signed in to change notification settings - Fork 26
Implementing code coverage #208
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
Conversation
This PR adds R and JavaScript code coverage tracking:
Once request for installation of Codecov is approved for animint, and the CODECOV_TOKEN is added to GitHub Secrets, the coverage tracking will be uploaded to Codecov . we can further refine the coverage reporting and verify if this works once codecov token is uploaded. |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Update : the R side code coverage is correctly being uploaded to codecov for every commit. see here : https://app.codecov.io/gh/animint/animint2/tree/coverage/R About the JS code coverage, I have managed to collect the JS code coverage from chrome devtools while the renderer tests run. This coverage is currently being stored in a raw json format. to upload it to codecov, we require it to be in a different (istanbul) format. For this, I am currently facing difficulty downloading the node package pupeteer-to-istanbul (responsible for converting raw json js coverage data to codecov accepted format) correctly in Github Actions workflow. As soon as I am able to convert it correctly, The js coverage will also be uploaded to codecov along with the R coverage. |
code coverage is now being uploaded for both JS and R codes to codecov . see here : https://app.codecov.io/github/animint/animint2/commit/1747fde5868452bd9651a8637022bb3b75b84836/tree?dropdown=coverage |
this is really excellent work, thanks! Can you please tell codecov to ignore the files under vendor/ ? |
there is an issue with the CRAN test suite, which currently has a WARNING but is not failing (green build).
|
That warning was appearing earlier because of a file I had created for a previous implementation, which is no longer needed. I've removed that file now, and the warning no longer appears. |
In CRAN test suite I still see
the fix is to add this file to Rbuildignore. But before doing that, can you please modify the CI so that the CRAN test suite will fail when there is a WARNING or NOTE? |
thanks for the clarification! I have now modified the CI so that the CRAN test suite will fail when there is a WARNING or NOTE: https://github.com/animint/animint2/actions/runs/16154589438/job/45594000311 |
update : currently, one of the test files, test-renderer2-PredictedPeaks is causing chromote timeout issue which isnt getting resolved even after increasing the chromote timeout. So I am trying to figure out why that is happening. |
The original test-renderer2-PredictedPeaks was a little heavy and was slowing down the browser, especially after we added JavaScript coverage collection through Chrome DevTools. I’ve now refactored the test to make it lighter by:
With this update, both JavaScript and R code coverage are now correctly collected and uploaded to Codecov: |
showSelected=c("dotID", "chrom"), | ||
clickSelects="peak.name", | ||
size=11, | ||
data=PredictedPeaks$chromCounts)+ | ||
scale_y_discrete("cell type", drop=FALSE), | ||
chroms=ggplot()+ | ||
theme_bw()+ | ||
theme_animint(width=1500, height=330)+ | ||
scale_y_discrete("chromosome", drop=FALSE)+ | ||
scale_x_continuous("position on chromosome (mega bases)")+ | ||
geom_text(aes(0, chrom, label=paste0(peaks, "_")), | ||
clickSelects="chrom", | ||
showSelected="dotID", | ||
hjust=1, |
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.
it is unusual that these were not used at all in the test.
Instead of deleting them, I would think it should be preferable to include them in the test somehow.
It seems that there are several significant changes to this test, and it is not clear which one is responsible for the fix, can you please clarify?
- deleting two plots
- making smaller data set
- modifying timeout
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.
- Timeout has not been modified ( I have again set it to 120 as it was before)
- making smaller data set is the change responsible for the fix.
- I have now restored the 2 deleted plots and also included them in a small test case. Is that okay?
2fce574
to
cba32ec
Compare
Apologies for any confusion caused. While updating NEWS.md, I accidentally ran git rebase instead of merging master into coverage, which resulted in some duplicate commits and a rewritten history due to a force push. I've verified that all intended changes ,including test improvements and coverage additions are intact. The branch is now clean, up-to-date with master, and ready for review. |
Can you please provide a link to a more recent coverage report which shows R/JS code coverage? (but not vendor files) For some reason I can't find a newer report on codecov. What do I need to click on? |
coverage report for the most recent commit : https://app.codecov.io/github/animint/animint2/commit/1065d7f9c082536e4db9e0e90dc7abd0717883ba/tree
So the link to the homepage for the coverage reports for animint2 is : https://app.codecov.io/github/animint/animint2 In order to view the coverage reports for different commits, you can click on "commits" in the navbar and then click on the commit you want to view the coverage report for. Shall I make a video demonstrating the usage of this dashboard? |
ok, I had to click File Explorer. |
Implementing code coverage for animint2 using codecov. (using covr for R side and Chrome devtools coverage + v8-to-istanbul for JS side)
Closes #122