Title: | Parallel Runs of Reverse Depends |
---|---|
Description: | Reverse depends for a given package are queued such that multiple workers can run the reverse-dependency tests in parallel. |
Authors: | Dirk Eddelbuettel [aut, cre] |
Maintainer: | Dirk Eddelbuettel <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.0.6 |
Built: | 2024-12-03 02:55:14 UTC |
Source: | https://github.com/eddelbuettel/prrd |
Reverse depends for a given package are queued such that multiple workers can run the reverse-dependency tests in parallel.
Index of help topics:
dequeueJobs Dequeue and run reverse-dependency checks, possibly in parallel enqueueJobs Enqueues reverse-dependent packages getDatabaseConnection Database Helper Functions prrd-package Parallel Runs of Reverse Depends runSanityChecks Various Helper Functions summariseQueue Summarisse results from a reverse-dependency check
Dirk Eddelbuettel <[email protected]>
Dirk Eddelbuettel [aut, cre] (<https://orcid.org/0000-0001-6419-907X>)
Dequeue package for (potentially parallel) reverse-dependency check
dequeueJobs(package, directory, exclude = NULL, date = format(Sys.Date())) dequeueDepends(package, directory)
dequeueJobs(package, directory, exclude = NULL, date = format(Sys.Date())) dequeueDepends(package, directory)
package |
A character variable denoting a package |
directory |
A character variable denoting a directory for the queuefile |
exclude |
An optional character variable denoting an exclusion set csv file. |
date |
Optional character variable describing a date (as part of the queue file, default is current date. |
This function consumes previously enqueued jobs for reverse dependency checks. It is set up in such a way that multiple distinct and independent process can run checks in parallel without effecting each other. If the underlying queue file is on a network drive, this should may also work across multiple machines.
A queue is create as a side effect, its elements are returned invisibly
Dirk Eddelbuettel
Enqueue package for subsequent reverse-dependency check
enqueueJobs(package, directory, dbfile = "", addfailed = FALSE) enqueueDepends(package, directory)
enqueueJobs(package, directory, dbfile = "", addfailed = FALSE) enqueueDepends(package, directory)
package |
A character variable denoting a package |
directory |
A character variable denoting a directory |
dbfile |
Optional character with path to previous runs db file |
addfailed |
Optional logical swith to add previous failures |
This function relies on the available.packages
function from R
along with the liteq
package. The getQueueFile
function is used to
determine the queue file directory and name.
A queue is create as a side effect, its elements are returned invisibly
Dirk Eddelbuettel
## Not run: td <- tempdir() options(repos=c(CRAN="https://cloud.r-project.org")) jobsdf <- enqueueJobs(package="digest", directory=td) ## End(Not run)
## Not run: td <- tempdir() options(repos=c(CRAN="https://cloud.r-project.org")) jobsdf <- enqueueJobs(package="digest", directory=td) ## End(Not run)
Several Database Connection Helper Functions
getDatabaseConnection(file) createTable(con) insertRow(con, df) createRunDataTable(con)
getDatabaseConnection(file) createTable(con) insertRow(con, df) createRunDataTable(con)
file |
A character variable pointing to a sqlite3 file |
con |
A database connection object |
df |
A one-row data.frame with results to be appended |
These functions return a connection, create a table and insert a row of data, respectively.
A connection object
Dirk Eddelbuettel
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.
runSanityChecks() runEnqueueSanityChecks() getDataDirectory(package, date = format(Sys.Date()), path = ".", sep = "_") getQueueFile(package, date = format(Sys.Date()), path = ".", sep = "_") getConfig(debug = FALSE) getExclusionSet(exclusionfile)
runSanityChecks() runEnqueueSanityChecks() getDataDirectory(package, date = format(Sys.Date()), path = ".", sep = "_") getQueueFile(package, date = format(Sys.Date()), path = ".", sep = "_") getConfig(debug = FALSE) getExclusionSet(exclusionfile)
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. |
Additional helper functions get particular directories, config settings or
check some assumptions about files in PATH
and alike,
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).
An optional config file can be used to set several configuration variables. Currently supported are
The path to an R file that will be source
'ed.
The directory used for the parallel run of reverse depends. May be an absolute or relative path.
The directory passed to .libPaths
allow for additional
build-dependencies. May be an absolute or relative path.
A boolean switch to enable more debugging output.
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.
Dirk Eddelbuettel
Summarise results from (potentially parallel) reverse-dependency check
summariseQueue(package, directory, dbfile = "", extended = FALSE, foghorn = FALSE)
summariseQueue(package, directory, dbfile = "", extended = FALSE, foghorn = FALSE)
package |
A character variable denoting a package |
directory |
A character variable denoting a directory |
dbfile |
A character variable for an optional override which, if present, is used over ‘package’ and ‘directory’. |
extended |
A boolean variable to select extended analysis of
failures, default is |
foghorn |
A boolean variable to invoke the foghorn to
retrieve and review CRAN result status, default is |
NULL, invisibly
Dirk Eddelbuettel