Skip to content

[Bioc-devel] Package coverage

2 messages · Lluís Revilla, Shepherd, Lori

#
Dear Lori and all,

Some years ago there was a coverage badge, which disappeared when
transitioning to git. Afterwards there were some mails about including the
coverage badge on package's landing page again (
https://stat.ethz.ch/pipermail/bioc-devel/2017-November/012417.html), but
still there isn't one.

As there is some interest from the core, and I don't know how to add it to
the package builder: https://github.com/Bioconductor/packagebuilder. (I
guess somewhere in builder.py?) I would like to contribute some lines to
bring back the coverage badge:

library(covr)p <- package_coverage("yourpackage", "all")
# This will return the % of coverage of the package
percent_coverage(tally_coverage(p))

Adding this will probably slow down the building of the new landing pages,
but it shouldn't take much longer than the time used for the tests and the
vignette.

Hope this helps,

Llu?s
#
Thank you for these code snippets.  I will look at adding the coverage badge over the next few weeks.




Lori Shepherd

Bioconductor Core Team

Roswell Park Cancer Institute

Department of Biostatistics & Bioinformatics

Elm & Carlton Streets

Buffalo, New York 14263