check_design {checked}R Documentation

Check Design Object

Description

Abstract object that drives all separate processes required to run R CMD check sequence.

Public fields

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.

Methods

Public 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 = TRUE,
  ...
)
Arguments
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

Returns

check_design.


Method active_processes()

Get Active Processes list

Usage
check_design$active_processes()

Method failed_tasks()

Get Failed Tasks list

Usage
check_design$failed_tasks()

Method terminate()

Terminate Design Processes

Immediately terminates all the active processes.

Usage
check_design$terminate()

Method step()

Fill Available Processes with Tasks

Usage
check_design$step()
Returns

A logical value, indicating whether processes are actively running.


Method start_next_task()

Start Next Task

Usage
check_design$start_next_task()
Returns

A integer value, coercible to logical to indicate whether a new process was spawned, or -1 if all tasks have finished.


Method is_done()

Check if checks are done

Checks whether all the scheduled tasks were successfully executed.

Usage
check_design$is_done()

Method clone()

The objects of this class are cloneable with this method.

Usage
check_design$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## 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)

[Package checked version 0.2.0 Index]