Learn R Programming

drake (version 5.0.0)

read_drake_meta: Read the metadata of a target or import.

Description

The metadata helps determine if the target is up to date or outdated. The metadata of imports is used to compute the metadata of targets.

Usage

read_drake_meta(targets = NULL, path = getwd(), search = TRUE,
  cache = NULL, verbose = 1, jobs = 1)

Arguments

targets

character vector, names of the targets to get metadata. If NULL, all metadata is collected.

path

Root directory of the drake project, or if search is TRUE, either the project root or a subdirectory of the project.

search

logical. If TRUE, search parent directories to find the nearest drake cache. Otherwise, look in the current working directory only.

cache

optional drake cache. See codenew_cache(). If cache is supplied, the path and search arguments are ignored.

verbose

whether to print console messages

jobs

number of jobs for light parallelism. Supports 1 job only on Windows.

Value

The cached master internal configuration list of the last make().

Details

Target metadata is computed with drake_meta() and then drake:::finish_meta(). This metadata corresponds to the state of the target immediately after it was built or imported in the last make() that did not skip it. The exception to this is the $missing element of the metadata, which indicates if the target/import was missing just before it was built.

See Also

dependency_profile, make

Examples

Run this code
# NOT RUN {
test_with_dir("Quarantine side effects.", {
load_basic_example() # Get the code with drake_example("basic").
make(my_plan) # Run the project, build the targets.
# Retrieve the build decision metadata for one target.
read_drake_meta(targets = "small")
# Retrieve the build decision metadata for all targets,
# parallelizing over 2 jobs.
read_drake_meta(jobs = 2)
})
# }

Run the code above in your browser using DataLab