| Title: | Systematically Run R CMD Checks |
| Version: | 0.5.0 |
| Description: | Systematically Run R checks against multiple packages. Checks are run in parallel with strategies to minimize dependency installation. Provides out of the box interface for running reverse dependency check. |
| URL: | https://Genentech.github.io/checked/, https://github.com/Genentech/checked |
| BugReports: | https://github.com/Genentech/checked/issues |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Depends: | R (≥ 3.6.2) |
| Imports: | callr, cli, glue, igraph, jsonlite, memoise, options, R6, rcmdcheck, rlang, utils (≥ 3.6.2), tools |
| RoxygenNote: | 7.3.3 |
| Suggests: | remotes, testthat (≥ 3.0.0), visNetwork, withr |
| Config/Needs/website: | r-lib/asciicast |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-02-20 00:34:47 UTC; maksymis |
| Author: | Szymon Maksymiuk |
| Maintainer: | Szymon Maksymiuk <sz.maksymiuk@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-02-20 10:00:17 UTC |
checked: Systematically Run R CMD Checks
Description
Systematically Run R checks against multiple packages. Checks are run in parallel with strategies to minimize dependency installation. Provides out of the box interface for running reverse dependency check.
Author(s)
Maintainer: Szymon Maksymiuk sz.maksymiuk@gmail.com (ORCID)
Authors:
Doug Kelkhoff doug.kelkhoff@gmail.com (ORCID)
Other contributors:
F. Hoffmann-La Roche AG [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/Genentech/checked/issues
Available packages database dependencies columns
Description
Available packages database dependencies columns
Usage
DB_COLNAMES
Format
An object of class character of length 6.
Dependencies categories
Description
Dependencies categories
Usage
DEP
Format
An object of class enum (inherits from factor) of length 5.
Strong dependencies categories
Description
Strong dependencies categories
Usage
DEP_STRONG
Format
An object of class enum (inherits from factor) of length 3.
Relation types
Description
A flag for edges that articulate different relations between nodes.
Usage
RELATION
Format
An object of class enum (inherits from factor) of length 2.
Check execution status categories
Description
Check execution status categories
Usage
STATUS
Format
An object of class enum (inherits from factor) of length 4.
Various utilities for formatting ANSI output
Description
Various utilities for formatting ANSI output
Usage
ansi_line_erase(n = "")
ansi_move_line_rel(n)
ansi_tty_height()
Arguments
n |
The number of lines to move. Positive is up, negative is down. |
Functions
-
ansi_line_erase(): Erase the current line -
ansi_move_line_rel(): Offset the cursor by a relative number of lines -
ansi_tty_height(): Get the height of the ansi tty using 'tput lines' interface
A simple alternative to devtools::as.package
Description
Functionally identical to devtools' as.package, but without interactive
options for package creation.
Usage
as.package.remotes(x)
Arguments
x |
A package object to coerce |
Details
Function required for communicating with the remotes package interface
Note
Code inspired by devtools load_pkg_description with very minor
edits to further reduce devtools dependencies.
Convert a value to a set of dependency types
Description
Implements conventions established by both tools::package_dependencies()
and pkgdepends::as_pkg_dependencies(), following
pkgdepends::as_pkg_dependencies() return type structure of a list
including $direct and $indirect dependency types. Reimplemented to
avoid dependence on pkgdepends compilation requirements.
Usage
as_pkg_dependencies(x)
Arguments
x |
A |
Note
locally defined and bespoke dispatch system to avoid registering
methods when loaded in combination with pkgdepends
Available Packages
Description
Functionally Equivalent to utils::available.packages(), assuming
utils's cache doesn't expire in the middle of a top-level call evaluation.
Modifications were made so that the results for queries with unique
arguments are only called once for each top-level expression.
Usage
available_packages(...)
Details
Though utils::available.packages() will cache the PACKAGES index,
it must still be parsed with each call. Since this can happen hundreds of
times when building a R CMD check plan, this can cause a signficiant
bottleneck to the responsiveness of this package.
system.time({ for (i in 1:10) available.packages() })
#> user system elapsed
#> 3.453 0.196 3.655
system.time({ for (i in 1:10) available_packages() })
#> user system elapsed
#> 0.325 0.002 0.328
Note
This could be removed by propagating the available.packages()
database matrix through all the calls that need to use it, though this
would be a sizable refactor.
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
Arguments
path |
file path to the package source directory |
n |
|
output |
|
lib.loc |
|
repos |
|
reverse_repos |
|
restore |
|
... |
Additional arguments passed to |
Value
checker() R6 class storing all the details
regarding checks that run. Can be combined with
results and summary() methods to generate results.
Check packages
Description
Runs classical R CMD check for the given source package. It
first identifies and installs, in parallel, all dependencies required
to check the package. Then, it runs R CMD check for each specified package.
Usage
check_pkgs(
package,
n = 2L,
output = tempfile(paste(utils::packageName(), Sys.Date(), sep = "-")),
lib.loc = .libPaths(),
repos = getOption("repos"),
restore = TRUE,
...
)
Arguments
package |
A path to either package, directory with packages or name of the package (details) |
n |
|
output |
|
lib.loc |
|
repos |
|
restore |
|
... |
Additional arguments passed to |
Value
checker() R6 class storing all the details
regarding checks that run. Can be combined with
results and summary() methods to generate results.
See Also
Other checks:
check_rev_deps(),
checker,
new_checker()
Check reverse dependencies
Description
Check a package's reverse dependencies in order to identify differences in reverse dependency check results when run alongside your package's development and release versions.
Usage
check_rev_deps(
path,
n = 2L,
output = tempfile(paste(utils::packageName(), Sys.Date(), sep = "-")),
lib.loc = .libPaths(),
repos = getOption("repos"),
reverse_repos = repos,
restore = TRUE,
...
)
Arguments
path |
file path to the package source directory |
n |
|
output |
|
lib.loc |
|
repos |
|
reverse_repos |
|
restore |
|
... |
Additional arguments passed to |
Details
Runs classical reverse dependency checks for the given source package. It
first identifies reverse dependencies available in repos. Then, after
installing all required dependencies, runs R CMD check twice for each
package, one time with the release version of the given source package
installed from repos and a second time with the development version
installed from local source. Both R CMD checks are later compared to
identify changes in reverse dependency behaviors.
Value
checker() R6 class storing all the details
regarding checks that run. Can be combined with
results and summary() methods to generate results.
See Also
Other checks:
check_pkgs(),
checker,
new_checker()
Create a task to run R CMD check
Description
Create a task to run R CMD check
Usage
check_task(build_args = NULL, args = NULL, env = NULL, ...)
Arguments
build_args |
Character vector of arguments to pass to |
args |
Character vector of arguments to pass to |
env |
A named character vector, extra environment variables to set in the check process. |
... |
Arguments passed on to
|
See Also
Other tasks:
install_task(),
meta_task(),
task()
R6 Checks Coordinator
Description
A stateful object that orchestrates all separate processes required to
manage installation, library setup and run R CMD checks in sequence.
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()plan(
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
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
checker$new(
plan,
n = 2L,
output = file.path(tempdir(), paste(packageName(), Sys.Date(), sep = "-")),
lib.loc = .libPaths(),
repos = getOption("repos"),
restore = options::opt("restore"),
...
)Arguments
planplandata.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
Returns
Method active_processes()
Get Active Processes list
Usage
checker$active_processes()
Method failed_tasks()
Get Failed Tasks list
Usage
checker$failed_tasks()
Method terminate()
Kill All Active Design Processes
Immediately terminates all the active processes.
Usage
checker$terminate()
Method step()
Fill Available Processes with Tasks
Usage
checker$step()
Returns
A logical value, indicating whether processes are actively running.
Method start_next_task()
Start Next Task
Usage
checker$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
checker$is_done()
Method clone()
The objects of this class are cloneable with this method.
Usage
checker$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Other checks:
check_pkgs(),
check_rev_deps(),
new_checker()
Examples
## Not run:
library(checked)
plan <- plan_checks(c(
system.file("example_packages", "exampleBad", package = "checked"),
system.file("example_packages", "exampleGood", package = "checked")
))
orchestrator <- checker$new(
plan,
n = 10,
repos = "https://cran.r-project.org/"
)
while (!orchestrator$is_done()) {
orchestrator$start_next_task()
}
## End(Not run)
Parse R CMD checks from a partial check output string
Description
Parse R CMD checks from a partial check output string
Usage
checks_capture(x)
Arguments
x |
A string, compsoed of any subsection of R CMD check console output |
Value
A matrix of matches and capture groups "check" and "status" ("OK", "NONE", "NOTE", "WARNING" or "ERROR").
Examples
## Not run:
check_output <- "
* checking check one ... OK
* checking check two ... NOTE
* checking tests ...
Running test_abc.R
Running test_xyz.R
NONE
* checking check three ... WARNING
* ch
"
checks_capture(check_output)
## End(Not run)
Simplify Captures into Vector
Description
Simplify Captures into Vector
Usage
checks_simplify(x)
Arguments
x |
Matrix of regex captures as produced by checks_capture. |
Value
A vector of check status, with names indicating the check
Internal Utilities for Command-line Output
Description
Various helper functions for consistent cli output, including theming and formatting.
Usage
cli_table_row(
status = "",
ok = "OK",
notes = "N",
warnings = "W",
errors = "E",
msg = "",
style = c("row", "title", "header"),
symbols = DEFAULT_ROW_SYMBOL
)
cli_theme(..., .envir = parent.frame())
Arguments
status, ok, notes, warnings, errors |
|
msg |
|
..., .envir |
Additional arguments passed to |
Reuse or Create A Null File Connection
Description
Reuse or Create A Null File Connection
Usage
devnull()
Produce cli output for a task
Description
Provided a task, allows for use of a handful of shorthand symbols which will use the task as a context for formatting task fields.
Usage
fmt(..., g, nodes, task = NULL, .envir = parent.frame(), ansi = TRUE)
Arguments
... |
params passed to |
g |
task_graph object. |
nodes |
graph nodes to format. |
task |
task to format. |
.envir |
output environment. |
ansi |
logical whether ansi should be stripped. |
Deduplicate attributes
Description
Primarily intended for cleaning up the result of an igraph::union(),
which adds duplicated attributes when attributes of the same name exist in
multiple graphs. Searches for suffixes and consolidates attributes,
taking the attribute from the first non-NA value observed.
Usage
graph_dedup_attrs(g)
Arguments
g |
task_graph object |
Create a task to install a package and dependencies
Description
Create a task to install a package and dependencies
Usage
install_task(
origin,
type = package_install_type(origin),
INSTALL_opts = NULL,
lib = lib_path(origin),
...
)
Arguments
origin |
|
type |
character, indicating the type of package to download and
install. Will be |
INSTALL_opts |
an optional character vector of additional option(s) to be passed to
Can also be a named list of character vectors to be used as additional options, with names the respective package names. |
lib |
Any object that can be passed to |
... |
further arguments to be passed to |
See Also
Other tasks:
check_task(),
meta_task(),
task()
Get Library Location
Description
Get Library Location
Usage
lib(x, ...)
## S3 method for class ''NULL''
lib(x, ...)
## S3 method for class 'character'
lib(x, ...)
## S3 method for class 'lib_path_isolated'
lib(
x,
...,
lib.root = tempdir(),
dir_hash = hash(Sys.time(), n = 8),
name = ""
)
## S3 method for class 'lib_path_default'
lib(x, ..., lib.loc = .libPaths())
## S3 method for class 'task'
lib(x, ...)
## S3 method for class 'install_task'
lib(x, ...)
## S3 method for class 'check_task'
lib(x, ...)
Arguments
x |
An object describing a library location |
... |
additional parameters passed to methods |
lib.root |
A root directory for the isolated library. |
dir_hash |
unique identifier of the isolated library |
name |
human-readable subname of the isolated library |
lib.loc |
Library paths, defaulting to |
Make a Library Location
Description
A description of where packages should be installed. This object provides necessary information to determine where a package should be installed. lib_path method creates default path handlers for given pkg origin while lib_path_x creates an actual object.
Usage
lib_path(x, ..., .class = c())
lib_path_default(.class = c())
lib_path_isolated(.class = c())
Arguments
x |
A |
... |
Additional values |
.class |
An optional subclass, used primarily for dispatch. |
See Also
Other specs:
pkg_origin()
Construct a 'Meta' Task
Description
Meta tasks are tasks which are not intended to perform computation. They exist simply to provide relationships among computational tasks.
Usage
meta_task(..., .subclass = NULL)
Arguments
... |
Objects passed to specified class functions |
.subclass |
character name of the subclass. It will be appended with "_meta" suffix. |
See Also
Other tasks:
check_task(),
install_task(),
task()
Creating new Check Design Objects
Description
Instantiate a check design from a path or directory.
Usage
new_checker(...)
new_rev_dep_checker(x, ...)
Arguments
... |
Additional arguments passed to |
x |
A file path, passed to |
See Also
Other checks:
check_pkgs(),
check_rev_deps(),
checker
Other checks:
check_pkgs(),
check_rev_deps(),
checker
checked Options
Description
Internally used, package-specific options. All options will prioritize R options() values, and fall back to environment variables if undefined. If neither the option nor the environment variable is set, a default value is used.
Checking Option Values
Option values specific to checked can be
accessed by passing the package name to env.
options::opts(env = "checked") options::opt(x, default, env = "checked")
Options
- tty_tick_interval
-
tty refresh interval when reporting results in milliseconds
- default:
0.1
- option:
checked.tty_tick_interval
- envvar:
R_CHECKED_TTY_TICK_INTERVAL (evaluated if possible, raw string otherwise)
- tty_default_height
-
deafult tty height used for the ANSI reporter. Used only if correct values could not be acquired with system('tput lines')
- default:
50
- option:
checked.tty_default_height
- envvar:
R_CHECKED_TTY_DEFAULT_HEIGHT (evaluated if possible, raw string otherwise)
- proactive_gc
-
logical, indicating whether additional garbage collection should be performed before starting a new task, if at least one process recently finalized. This can cause the checker to orchestrate tasks slower but is recommended to be used for designs with many sub-processes required as native garbage collection can lag leading to memory issues. Disable only when maximum prefromance is required and memory is not the issue.- default:
TRUE
- option:
checked.proactive_gc
- envvar:
R_CHECKED_PROACTIVE_GC (evaluated if possible, raw string otherwise)
- results_error_on
-
character vector indicating whether R error should be thrown when issues are discovered when generating results. "never" means that no errors are thrown. If "issues" then errors are emitted only on issues, whereas "potential issues" stands for error on both issues and potential issues.
- default:
"never"
- option:
checked.results_error_on
- envvar:
R_CHECKED_RESULTS_ERROR_ON (evaluated if possible, raw string otherwise)
- results_keep
-
character vector indicating which packages should be included in the results. "all" means that all packages are kept. If "issues" then only packages with issues identified, whereas "potential_issues" stands for keeping packages with both "issues" and "potential_issues".
- default:
"all"
- option:
checked.results_keep
- envvar:
R_CHECKED_RESULTS_KEEP (evaluated if possible, raw string otherwise)
- restore
-
logicalindicating whether output directory should be unlinked before running checks. IfFALSE, an attempt will me made to restore previous progress from the sameoutput- default:
NA
- option:
checked.restore
- envvar:
R_CHECKED_RESTORE (evaluated if possible, raw string otherwise)
- add_remotes
-
logicalindicating whether origins inheriting frompkg_origin_local, should be scanned for packages in theremotesfield and added while constrocuting a plantask_grap- default:
TRUE
- option:
checked.add_remotes
- envvar:
R_CHECKED_ADD_REMOTES (evaluated if possible, raw string otherwise)
- check_envvars
-
named
charactervector of environment variables to use during the R CMD check.- default:
c(`_R_CHECK_FORCE_SUGGESTS_` = "false", `_R_CHECK_RD_XREFS_` = "false", `_R_CHECK_SYSTEM_CLOCK_` = "false", `_R_CHECK_SUGGESTS_ONLY_` = "true", `_R_CHECK_CRAN_INCOMING_` = "false")- option:
checked.check_envvars
- envvar:
R_CHECKED_CHECK_ENVVARS (evaluated if possible, raw string otherwise)
- check_build_args
-
charactervector of args passed to the R CMD build.- default:
c("--no-build-vignettes", "--no-manual")- option:
checked.check_build_args
- envvar:
R_CHECKED_CHECK_BUILD_ARGS (space-separated R CMD build flags)
- check_args
-
charactervector of args passed to the R CMD check.- default:
c("--timings", "--ignore-vignettes", "--no-manual", "--as-cran")- option:
checked.check_args
- envvar:
R_CHECKED_CHECK_ARGS (space-separated R CMD check flags)
See Also
options getOption Sys.setenv Sys.getenv
Other documentation:
options_params
Checked Options
Description
Checked Options
Arguments
proactive_gc |
|
results_error_on |
character vector indicating whether R error should be thrown when issues
are discovered when generating results. "never" means that no errors
are thrown. If "issues" then errors are emitted only on issues, whereas
"potential issues" stands for error on both issues and potential issues. (Defaults to |
check_args |
|
results_keep |
character vector indicating which packages should be included in the results.
"all" means that all packages are kept. If "issues" then only packages
with issues identified, whereas "potential_issues" stands for keeping
packages with both "issues" and "potential_issues". (Defaults to |
add_remotes |
|
check_envvars |
named |
tty_tick_interval |
tty refresh interval when reporting results in milliseconds (Defaults to |
check_build_args |
|
restore |
|
tty_default_height |
deafult tty height used for the ANSI reporter. Used only
if correct values could not be acquired with system('tput lines') (Defaults to |
See Also
Other documentation:
options()
Split a Filepath into Parts
Description
Split a Filepath into Parts
Usage
path_parts(x)
Arguments
x |
A |
Value
A character vector of path parts
Build Package Dependencies Table
Description
Inspired by tools::package_dependencies, but with the added benefit
of recording the dependency type and relationships throughout the
dependency tree.
Usage
pkg_dependencies(
packages,
dependencies = TRUE,
db = available_packages(),
verbose = FALSE
)
Arguments
packages |
a character vector of package names. |
dependencies |
A |
db |
character matrix as from |
verbose |
logical indicating if output should monitor the package search cycles. |
Package specification
Description
Create package specification list which consists of all the details required to identify and acquire source of the package.
Usage
pkg_origin(package, ..., .class = c())
pkg_origin_repo(package, repos, ...)
pkg_origin_is_base(package, ...)
pkg_origin_base(package, ...)
pkg_origin_unknown(package, ...)
pkg_origin_local(path = NULL, ...)
pkg_origin_remote(remote = NULL, ...)
pkg_origin_archive(path = NULL, ...)
Arguments
package |
name of the package. |
... |
parameters passed to downstream constructors. |
.class |
Additional subclasses. |
repos |
repository where package with given name should identified. |
path |
path to the source of the package (either bundled or not). URLs are acceptable. |
remote |
remote object from the |
See Also
Other specs:
lib_path()
Plan R CMD Checks
Description
Generates a plan for running R CMD check for a specified set of packages.
Usage
plan_local_checks(package, repos = getOption("repos"))
Arguments
package |
A path to either package, directory with packages or name of the package (details) |
repos |
repository used to identify packages when name is provided. |
Details
package parameter has two different allowed values:
Package - checked looks for a DESCRIPTION file in the provided path, if found treats it like a source package.
If the specified value does not correspond to a source package, the parameter is treated as the name and
reposparameter is used to identify the source.
See Also
Other plan:
plan_local_install(),
plan_rev_dep_checks()
Plan source package installation
Description
Generates a plan for running installing a package from source.
Usage
plan_local_install(package, repos = getOption("repos"))
Arguments
package |
A path to package source. |
repos |
repository used to identify packages when name is provided. |
See Also
Other plan:
plan_local_checks(),
plan_rev_dep_checks()
Plan Reverse Dependency Checks
Description
Generates a plan for running reverse dependency check for certain
source package. In such case path should be proivded with a directory
path to the development version of the package and repos should be a
repository for which reverse dependencies should be identified.
Usage
plan_rev_dep_checks(path, repos = getOption("repos"))
Arguments
path |
path to the package source. |
repos |
repository used to identify reverse dependencies. |
See Also
Other plan:
plan_local_checks(),
plan_local_install()
Print checked results
Description
Print checked results
Usage
## S3 method for class 'checked_results'
print(x, ...)
## S3 method for class 'rev_dep_dep_results'
print(x, ..., name = NULL, keep = options::opt("results_keep"))
## S3 method for class 'local_check_results'
print(x, ..., name = NULL, keep = options::opt("results_keep"))
Arguments
x |
an object to be printed. |
... |
other parameters. |
name |
character name of the |
keep |
character vector indicating which packages should be included in the results.
"all" means that all packages are kept. If "issues" then only packages
with issues identified, whereas "potential_issues" stands for keeping
packages with both "issues" and "potential_issues". (Defaults to |
See Also
Other results:
results()
Check checker Runner Reporters
Description
Reporters are used to configure how output is communicated while running
a checker. They range from glossy command-line tools intended for
displaying progress in an interactive R session, to line-feed logs which
may be better suited for automated execution, such as in continuous
itegration.
Usage
reporter_ansi_tty()
reporter_ansi_tty2()
reporter_basic_tty()
reporter_default()
Details
reporter_default()
Automatically chooses an appropriate reporter based on the calling context.
reporter_ansi_tty()
Highly dynamic output for fully capable terminals. Requires multi-line dynamic output, which may not be available in editors that that present a terminal as a web component.
reporter_basic_tty()
A line-feed reporter presenting output one line at a time, providing a reporter with minimal assumptions about terminal capabilities.
Reporter Internal Methods
Description
Each of the internal methods for reporters take a reporter, the check checker object and a calling environment.
Usage
report_sleep(reporter, checker, sleep)
## Default S3 method:
report_sleep(reporter, checker, sleep = 1)
report_start_setup(reporter, checker, ..., envir = parent.frame())
report_start_checks(reporter, checker, ..., envir = parent.frame())
## Default S3 method:
report_start_checks(reporter, checker, ..., envir = parent.frame())
report_status(reporter, checker, envir = parent.frame())
report_finalize(reporter, checker)
report_task(reporter, g, v)
report_step(reporter, checker)
Arguments
reporter |
A object produced using |
checker |
|
sleep |
|
envir |
|
Check results
Description
Get R CMD check results
Usage
results(x, ...)
## S3 method for class 'checker'
results(x, error_on = options::opt("results_error_on"), ...)
## S3 method for class 'integer'
results(x, checker_obj, ...)
## S3 method for class 'igraph.vs'
results(x, ...)
## S3 method for class 'rev_dep_dep_meta_task'
results(x, checker_obj, ...)
## S3 method for class 'rev_dep_check_meta_task'
results(x, checker_obj, ...)
## S3 method for class 'local_check_meta_task'
results(x, checker_obj, ...)
Arguments
x |
object which results should be presented. |
... |
other parameters. |
error_on |
character vector indicating whether R error should be thrown when issues
are discovered when generating results. "never" means that no errors
are thrown. If "issues" then errors are emitted only on issues, whereas
"potential issues" stands for error on both issues and potential issues. (Defaults to |
checker_obj |
|
See Also
Other results:
print.checked_results()
Run a Series of R CMD checks
Description
run() provides a generic, and is the central interface for executing
checkers. If a path is provided, a new reverse dependency check
plan is generated from the source code path. Otherwise a plan can be
built separately and executed using run().
Usage
run(checker, ..., reporter = reporter_default())
Arguments
checker |
|
... |
Additional arguments passed to |
reporter |
A reporter to provide progress updates. Will default to the most expressive command-line reporter given your terminal capabilities. |
Create a 'cli' Spinner With Suppressed Output
Description
'cli' will implicitly push spinner output to various output streams, affecting the terminal cursor position. To allow for a terminal interface that has spinners above the last line, this function suppresses the output and simply returns its frame contents.
Usage
silent_spinner(..., stream = devnull())
Arguments
... |
passed to cli::make_spinner |
stream |
passed to cli::make_spinner, defaults to a null file device |
Value
A interface similar to a 'cli' spinner, but with suppressed output
Start a new task
Description
Starts task based on the task object encapsulated in the node taken
from then task_graph g. It returns an install_process or
check_process R6 object.
Usage
start_task(node, g, ...)
Arguments
node |
Node(s) for which libpath should be constructed based on |
g |
|
... |
additional params passed to downstream methods |
Task specification
Description
Create task specification list which consists of all the details required to run specific task.
Usage
task(..., .subclass = NULL)
Arguments
... |
parameters passed to downstream constructors. |
.subclass |
Additional subclasses. |
Details
Tasks can be nested, representing either a singular task, or a set of related tasks.
See Also
Other tasks:
check_task(),
install_task(),
meta_task()
Task formatter bindings
Description
This bit of code is intended for use with fmt(), and allows for us
to layer symbol bindings on top of the environment used for string
interpolation which provide syntactic sugar for common formatting components.
Usage
task_formats(g = NULL, nodes = V(g), task = NULL, tasks = list(task))
Arguments
g |
task_graph object. |
nodes |
graph nodes to format. |
task |
task to format. |
tasks |
currently unused. |
Build task graph edges
Description
Edges describe relationships between tasks. Often, this is a dependency between packages, requiring that some package be installed before a latter task can be executed.
Usage
task_graph(x, repos = getOption("repos"), ...)
Arguments
x |
a |
repos |
|
... |
params passed to helper methods. |
Details
tools::package_dependencies() is used to calculate these relationships.
However, the package data returned by utils::available.packages(),
that is used internally to determine dependencies does not know about
local or remote packages, so those are first appended to this data set
prior to calculating edges. The bulk of this function serves to join this
data.
Value
A data.frame that can be used to build
igraph::make_graph edges.
Examples
## Not run:
task_graph(plan_rev_dep_checks("."))
## End(Not run)
Libpaths from task graph
Description
Function that traverses over the task dependency task to acquire libpaths for given nodes. It ensures that when runing a node, a libpath is constructed which has all the required packages on it.
Usage
task_graph_libpaths(g, node = NULL, lib.loc = .libPaths(), output = tempdir())
Arguments
g |
|
node |
Node(s) for which libpath should be constructed based on |
lib.loc |
Library paths, defaulting to |
output |
Path to the checked output directory |
Find Task Neighborhood
Description
Find Task Neighborhood
Usage
task_graph_neighborhoods(g, nodes, ...)
Arguments
g |
A task graph, as produced with |
nodes |
Names or nodes objects of packages whose neighborhoods should be calculated. |
Sort Task Graph by Strong Dependency Order
Description
Sort Task Graph by Strong Dependency Order
Usage
task_graph_sort(g)
Arguments
g |
A igraph::graph, expected to contain node attribute |
Value
The igraph::graph g, with vertices sorted in preferred
installation order.
Note
Cyclic dependencies are possible. Cyclic dependencies are disallowed for all hard dependencies on CRAN today, though there have been historical instances where they appeared on CRAN.
Installation priority is based on:
Total dependency footprint (low to high)
Topology (leaf nodes first)
Find the Next Packages Not Dependent on an Unavailable Package
Description
While other packages are in progress, ensure that the next selected package already has its dependencies done.
Usage
task_graph_update_ready(
g,
v = V(g),
dependencies = TRUE,
status = STATUS$pending
)
Arguments
g |
A dependency graph, as produced with |
v |
Names or nodes objects of packages whose satisfiability should be checked. |
dependencies |
Which dependencies types should be met for a node to be considered satisfied. |
status |
status name. Nodes in v fill be filtered to consists only nodes with that status. |
Details
There are helpers defined for particular use cases that strictly rely on the
task_graph_which_ready(), they are:
-
task_graph_update_check_ready()- Updates check vertices whose all dependencies are satisfied. -
task_graph_update_install_ready()- Update install vertices whose all dependencies are satisfied. -
task_graph_which_ready()- List vertices whose wit ready status.
Value
The name of the next package to prioritize
Find nodes with ready state
Description
List nodes which have ready state prioritizing check task nodes over install task nodes.
Usage
task_graph_which_ready(g)
Arguments
g |
A dependency graph, as produced with |
Value
The names of packages with ready state.
Generate A Rate Limiting Throttle Function
Description
Generate A Rate Limiting Throttle Function
Usage
throttle(interval = 0.2)
Arguments
interval |
An interval (in seconds) that is the minimum interval
before throttle will return |
Value
A throttling function with the provided interval. When called, returns a logical value indicating whether the throttle interval has passed (TRUE if the interval has not yet passed).