check_functions {checked}R Documentation

Check functions

Description

Set of functions to run orchestrated R CMD checks and automatically manage the dependencies installation. Each functions prepares the plan based on the supplied package source(s) which includes installing dependencies and running required R CMD checks. All the functions are parallelized through sperate processes

Usage

check_reverse_dependencies(
  path,
  n = 2L,
  output = tempfile(paste(utils::packageName(), Sys.Date(), sep = "-")),
  lib.loc = .libPaths(),
  repos = getOption("repos"),
  reverse_repos = repos,
  restore = TRUE,
  reporter = default_reporter(),
  ...
)

check_reverse_dependencies_development(
  path,
  n = 2L,
  output = tempfile(paste(utils::packageName(), Sys.Date(), sep = "-")),
  lib.loc = .libPaths(),
  repos = getOption("repos"),
  restore = TRUE,
  reporter = default_reporter(),
  ...
)

check_packages(
  path,
  n = 2L,
  output = tempfile(paste(utils::packageName(), Sys.Date(), sep = "-")),
  lib.loc = .libPaths(),
  repos = getOption("repos"),
  restore = TRUE,
  reporter = default_reporter(),
  ...
)

check_dir(
  path,
  n = 2L,
  output = tempfile(paste(utils::packageName(), Sys.Date(), sep = "-")),
  lib.loc = .libPaths(),
  repos = getOption("repos"),
  restore = TRUE,
  reporter = default_reporter(),
  ...
)

Arguments

path

path to the package source.

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.

reverse_repos

character vector of repositories which will be used to pull sources for reverse dependencies. In some cases, for instance using binaries on Linux, we want to use different repositories when pulling sources to check and different when installing 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

reporter

A reporter to provide progress updates. Will default to the most expressive command-line reporter given your terminal capabilities.

...

other parameters

Details

check_reverse_dependencies runs classical reverse dependency check for the given source package. It first identifies reverse dependencies available in repos. Then, after installing all required dependencies, it runs the R CMD check twice for each package, one time with the release version of the package and the second time with the development version. Both R CMD checks are later compared to get the result.

check_reverse_dependencies_development works similarly to check_reverse_dependencies but it runs R CMD check only once for each package, with the development version of the package installed. It is advantageous to check whether adding a new package into repository breaks existing packages that possibly take said package as Suggests dependency.

check_packages Installs all dependencies and runs parallelly R CMD checks for all source packages specified by path parameter

check_dir Identifies all R packages in the given directory (non-recursively) and passes them to the check_packages

Value

check_design R6 class storing all the details regarding checks that run. Can be combined with results and summary methods to generate results.


[Package checked version 0.2.0 Index]