check_design {checked} | R Documentation |
Abstract object that drives all separate processes required to run R CMD check sequence.
graph
(igraph::igraph()
)
A dependency graph, storing information about which dependencies
are required prior to execution of each check task.
Created with task_graph_create
input
(data.fragme()
)
Checks data.frame which is the source of all the checks
Created with source_check_tasks_df
output
(character(1)
)
Output directory where raw results and temporary library will
be created and stored.
new()
Initialize a new check design
Use checks data.frame to generate task graph in which all dependencies and installation order are embedded.
check_design$new( df, n = 2L, output = tempfile(paste(packageName(), Sys.Date(), sep = "-")), lib.loc = .libPaths(), repos = getOption("repos"), restore = TRUE, ... )
df
checks data.frame.
n
integer value indicating maximum number of subprocesses that can be simultaneously spawned when executing tasks.
output
character value specifying path where the output should be stored.
lib.loc
character vector with libraries allowed to be used when checking packages, defaults to entire .libPaths().
repos
character vector of repositories which will be used when generating task graph and later pulling dependencies.
restore
logical value, whether output directory should be unlinked
before running checks. If FALSE, an attempt will me made to restore previous
progress from the same output
...
other parameters
active_processes()
Get Active Processes list
check_design$active_processes()
failed_tasks()
Get Failed Tasks list
check_design$failed_tasks()
terminate()
Terminate Design Processes
Immediately terminates all the active processes.
check_design$terminate()
step()
Fill Available Processes with Tasks
check_design$step()
A logical value, indicating whether processes are actively running.
start_next_task()
Start Next Task
check_design$start_next_task()
A integer value, coercible to logical to indicate whether a new
process was spawned, or -1
if all tasks have finished.
is_done()
Check if checks are done
Checks whether all the scheduled tasks were successfully executed.
check_design$is_done()
clone()
The objects of this class are cloneable with this method.
check_design$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run:
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()
}
## End(Not run)