prrd (version 0.0.2)

runSanityChecks: Various Helper Functions

Description

These functions create a data directory name given a package name and additional optional arguments which can be used to store test meta-data and results, return a queue file name, return the configuration object (retrieved from several standard locations) and load the exclusion set.

Usage

runSanityChecks()

runEnqueueSanityChecks()

getDataDirectory(package, date = format(Sys.Date()), path = ".", sep = "_")

getQueueFile(package, date = format(Sys.Date()), path = ".", sep = "_")

getConfig(debug = FALSE)

getExclusionSet(exclusionfile)

Arguments

package

Character variable providing the package name.

date

Optional character variable describing a date, default is current date.

path

Optional path, default is current directory.

sep

Optional character with component separator, default is “_”.

debug

Optional boolean

exclusionfile

Character variable with path and file for an optional exclusion set.

Value

For getDataDirectory, a directory name. For getQueueFile, a queue database file name (used only internally). For getConfig, a named vector with config entries. For getExclusionSet a character vector of package names. Nothing is returned by runSanityChecks which is invoked for its side effect of validation (currently only if run-xvfb-safe is in the PATH).

Config File

An optional config file can be used to set several configuration variables. Currently supported are

setup

The path to an R file that will be source'ed.

workdir

The directory used for the parallel run of reverse depends.

libdir

The directory passed to .libPaths allow for additonal build-dependencies.

debug

A boolean switch to enable more debugging output.

verbose

A boolean switch to enable more verbose output.

The setup field is particularly useful as the file being sourced can contain other R expressions setting environment variables or options. It is (currently) searched in the four locations “.prrd.yaml”, “~/.R/prrd.yaml”, “~/.prrd.yaml”, and “/etc/R/prrd.yaml”. The first file found ends the search and is used, content is not merged from several files.

Details

Additional helper functions get particular directories, config settings or check some assumptions about files in PATH and alike,