check_PackageSet: longrunning R CMD check and BiocCheck of every package in a...

View source: R/check_PackageSet.R

check_PackageSetR Documentation

longrunning R CMD check and BiocCheck of every package in a packageset

Description

longrunning R CMD check and BiocCheck of every package in a packageset

Usage

check_PackageSet(
  pset,
  srcdir,
  update_sources = FALSE,
  prefix = tempfile("checkPS"),
  BPPARAM,
  BPOPTIONS = list(),
  shuffle = FALSE,
  sqlite_target = paste0(prefix, "/test.sqlite")
)

Arguments

pset

BiocBuildTools PackageSet instance

srcdir

character(1) path to folder that can receive all sources using BiocBuildTools::populate_local_gits

update_sources

logical(1) if TRUE, use update_gits to pull new changes in each package in srcdir

prefix

character(1) path to folder within which check artifacts are produced, will be created if nonexistent; defaults to tempfile("checkPS")

BPPARAM

instance of BiocParallelParam

BPOPTIONS

a list, see BiocParallel::bpoptions, defaults to empty list

shuffle

logical(1) if TRUE, the list of packages is randomly permuted to avoid always restarting on the same set, defaults to FALSE

sqlite_target

path to SQLite database to be built using BiocBuildTools::build_sqlite_db

Value

a list with elements sqlite_target, chk, and dbatt which are strings or try-error or outputs of BiocBuildTools::get_checks2() and BiocBuildTools::build_sqlite_db() if these succeed. In good circumstances this function is called for the side effect of creating the SQLite database

Note

The function will test Sys.getenv("CI") to avoid a tcltk query from knitr and will fail if it is not set.

Examples

pset = PackageSet(c("parody", "eds"))
srcdir = tempfile("demo_srcs")
dir.create(srcdir)
spar = BiocParallel::SnowParam(2)
BiocParallel::bplog(spar) = TRUE
BiocParallel::bpstopOnError(spar) = FALSE
BiocParallel::bpexportvariables(spar) = TRUE
BiocParallel::bpexportglobals(spar) = TRUE
dir.create(ldir <- tempfile("chkps_logs"))
system(paste("chmod 777", ldir))
BiocParallel::bplogdir(spar) = ldir
cptry = check_PackageSet(pset, srcdir=srcdir, BPPARAM=spar)
cptry

vjcitn/BiocBuildTools documentation built on March 15, 2024, 4:19 a.m.