vignettes/components.Rmd
components.Rmd
In this vignette we illustrate the use of software to capture information from R CMD check and BiocCheck::BiocCheck in concise formats.
td = tempdir()
od = getwd()
setwd(td)
library(BiocBuildTools)
ps = PackageSet(c("parody", "BiocFileCache"))
## 'getOption("repos")' replaces Bioconductor standard repositories, see
## '?repositories' for details
##
## replacement repositories:
## CRAN: https://cloud.r-project.org
getwd()
## [1] "/tmp/RtmpIao2O2"
system("mkdir gits")
populate_local_gits(ps, "gits")
date_string = function(x) as.character(as.Date(x, origin="1970-01-01"))
last_commit_date = function(repo) {
ans = Sys.time() + NA # if gert not available, produce a classed NA
if (requireNamespace("gert")) ans = gert::git_log(repo=repo, max=1)$time
ans
}
setwd(td)
rc = lapply(dir("gits", full=TRUE), function(x) {
ans = rcmdcheck::rcmdcheck(x,quiet=TRUE)
attr(ans, "last_commit_date") <- last_commit_date(x)
attr(ans, "check_date") <- Sys.time()
ans
})
rdfs = rcclist_to_dataframes(rc)
In this chunk we use BiocParallel to get separate processes for BiocCheck runs. Without this we can see namespace detachment problems.
setwd(td)
library(BiocParallel)
register(SnowParam(2)) # gets around namespace detachment issue
ini = dir("gits")
bdfs = bplapply(dir("gits", full=TRUE), function(x) {
ans = BiocCheck::BiocCheck(x)
attr(ans, "last_commit_date") <- last_commit_date(x)
attr(ans, "check_date") <- Sys.time()
bco2df(ans)
})
names(bdfs) = ini
names(rdfs)
## [1] "basic" "notes" "warnings" "errors" "inst" "desc"
rdfs[1:4]
## $basic
## package version date_commit date_check
## 1 BiocFileCache 2.6.0 2022-11-01 2022-11-16
## 2 parody 1.56.0 2022-11-01 2022-11-16
##
## $notes
## package
## 1 BiocFileCache
## 2 parody
## notes
## 1 checking R code for possible problems ... NOTE\n.sql_clean_cache: no visible binding for global variable ‘rid’\n.sql_clean_cache: no visible binding for global variable ‘access_time’\n.sql_get_resource_table: no visible binding for global variable ‘rid’\n.sql_get_resource_table: no visible binding for global variable ‘id’\nUndefined global functions or variables:\n access_time id rid
## 2 NO NOTES
## date_commit date_check
## 1 2022-11-01 2022-11-16
## 2 2022-11-01 2022-11-16
##
## $warnings
## package warnings date_commit date_check
## 1 BiocFileCache NO WARNINGS 2022-11-01 2022-11-16
## 2 parody NO WARNINGS 2022-11-01 2022-11-16
##
## $errors
## package errors date_commit date_check
## 1 BiocFileCache NO ERRORS 2022-11-01 2022-11-16
## 2 parody NO ERRORS 2022-11-01 2022-11-16
bdfs
## $BiocFileCache
## $BiocFileCache$errors
## type
## 1 checkExportsAreDocumented
## 2 checkExportsAreDocumented
## 3 checkExportsAreDocumented
## message
## 1 * ERROR: At least 80% of man pages documenting exported objects must have runnable examples.
## 2 The following pages do not:
## 3 makeBiocFileCacheFromDataFrame.Rd
## commit_date check_date
## 1 2022-11-01 2022-11-16
## 2 2022-11-01 2022-11-16
## 3 2022-11-01 2022-11-16
##
## $BiocFileCache$warnings
## type
## 1 checkVersionNumber
## 2 checkDescriptionNamespaceConsistency
## 3 checkForValueSection
## 4 checkForValueSection
## message
## 1 * WARNING: y of x.y.z version should be odd in devel
## 2 * WARNING: Import tools in DESCRIPTION as well as NAMESPACE.
## 3 * WARNING: Add non-empty \\value sections to the following man pages:
## 4 man/makeCachedActiveBinding.Rd
## commit_date check_date
## 1 2022-11-01 2022-11-16
## 2 2022-11-01 2022-11-16
## 3 2022-11-01 2022-11-16
## 4 2022-11-01 2022-11-16
##
##
## $parody
## $parody$errors
## type message commit_date check_date
## 1 error none 2022-11-01 2022-11-16
##
## $parody$warnings
## type
## 1 checkVersionNumber
## 2 checkDescriptionNamespaceConsistency
## 3 checkForValueSection
## 4 checkForValueSection
## message
## 1 * WARNING: y of x.y.z version should be odd in devel
## 2 * WARNING: Import stats in DESCRIPTION as well as NAMESPACE.
## 3 * WARNING: Add non-empty \\value sections to the following man pages:
## 4 man/box.scale.Rd, man/tukeyor.Rd
## commit_date check_date
## 1 2022-11-01 2022-11-16
## 2 2022-11-01 2022-11-16
## 3 2022-11-01 2022-11-16
## 4 2022-11-01 2022-11-16