A stateful object that orchestrates all separate processes required to
manage installation, library setup and run R CMD checks in sequence.
See also
Other checks:
check_dev_rev_deps(),
check_dir(),
check_pkgs(),
check_rev_deps(),
new_check_design()
Public fields
graph(
igraph::igraph())
A dependency graph, storing information about which dependencies are required prior to execution of each check task. Created withtask_graph_create()input(
data.frame())
Checks taskdata.framewhich is the source of all the checks.output(
character(1))
Output directory where raw results and temporary library will be created and stored.
Methods
Method new()
Initialize a new check design
Use checks data.frame to generate task graph in which all dependencies and installation order are embedded.
Usage
check_design$new(
df,
n = 2L,
output = tempfile(paste(packageName(), Sys.Date(), sep = "-")),
lib.loc = .libPaths(),
repos = getOption("repos"),
restore = options::opt("restore"),
...
)Arguments
dfcheck_designdata.frame.nintegervalue indicating maximum number of subprocesses that can be simultaneously spawned when executing tasks.outputcharactervalue specifying path where the output should be stored.lib.loccharactervector with libraries allowed to be used when checking packages, defaults to entire .libPaths().reposcharactervector of repositories which will be used when generating task graph and later pulling dependencies.restorelogicalvalue, whether output directory should be unlinked before running checks. IfFALSE, an attempt will me made to restore previous progress from the sameoutput....Additional arguments unused
Method terminate()
Kill All Active Design Processes
Immediately terminates all the active processes.
Method step()
Fill Available Processes with Tasks
Method is_done()
Check if checks are done
Checks whether all the scheduled tasks were successfully executed.
Examples
if (FALSE) { # \dontrun{
library(checked)
df <- source_check_tasks_df(c(
system.file("example_packages", "exampleBad", package = "checked"),
system.file("example_packages", "exampleGood", package = "checked")
))
plan <- check_design$new(df, n = 10, repos = "https://cran.r-project.org/")
while (!plan$is_done()) {
plan$start_next_task()
}
} # }