From 0eda49b5ce1ad10b6fbad8240d0a9a584d44ea6c Mon Sep 17 00:00:00 2001 From: be-marc Date: Tue, 18 Jun 2024 15:46:33 +0200 Subject: [PATCH] fix: cran --- DESCRIPTION | 2 +- LICENSE | 2 +- NAMESPACE | 1 - R/AppenderRedis.R | 2 ++ R/Rush.R | 3 ++- R/RushWorker.R | 2 ++ R/assertions.R | 1 + R/heartbeat_loops.R | 1 + R/rush_plan.R | 5 +++++ R/start_worker.R | 1 + R/sugar.R | 1 + R/worker_loops.R | 2 ++ man/AppenderRedis.Rd | 4 ++++ man/Rush.Rd | 4 ++++ man/RushWorker.Rd | 4 ++++ man/heartbeat.Rd | 1 + man/remove_rush_plan.Rd | 4 ++++ man/rsh.Rd | 1 + man/rush_assertions.Rd | 1 + man/rush_available.Rd | 1 + man/rush_config.Rd | 1 + man/rush_plan.Rd | 1 + man/start_worker.Rd | 1 + man/worker_loop_callr.Rd | 1 + man/worker_loop_default.Rd | 1 + 25 files changed, 44 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9eece42..58d2891 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,6 @@ Description: Parallel computing with a network of local and remote workers. Fast exchange of results between the workers through a 'Redis' database. Key features include task queues, local caching, and sophisticated error handling. -License: MIT + file LICENSE URL: https://github.com/mlr-org/rush BugReports: https://github.com/mlr-org/rush/issues Depends: @@ -33,3 +32,4 @@ Config/testthat/parallel: false Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.1 +License: MIT + file LICENSE diff --git a/LICENSE b/LICENSE index bcd6032..b01ffd9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,2 @@ YEAR: 2024 -COPYRIGHT HOLDER: 2024 mlr-org +COPYRIGHT HOLDER: rush authors diff --git a/NAMESPACE b/NAMESPACE index 479e082..c83887c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,7 +1,6 @@ # Generated by roxygen2: do not edit by hand export(AppenderRedis) -export(Rush) export(RushWorker) export(assert_rush) export(assert_rush_worker) diff --git a/R/AppenderRedis.R b/R/AppenderRedis.R index 4141b65..071fe50 100644 --- a/R/AppenderRedis.R +++ b/R/AppenderRedis.R @@ -25,8 +25,10 @@ #' @param filters (`list`)\cr #' List of filters. #' +#' @return Object of class [R6::R6Class] and `AppenderRedis` with methods for writing log events to Redis data bases. #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' diff --git a/R/Rush.R b/R/Rush.R index 81f1d0a..611bf7c 100644 --- a/R/Rush.R +++ b/R/Rush.R @@ -106,8 +106,9 @@ #' @template param_seed #' @template param_data_format #' -#' @export +#' @return Object of class [R6::R6Class] and `Rush` with controller methods. #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush = rsh(network_id = "test_network", config = config_local) diff --git a/R/RushWorker.R b/R/RushWorker.R index e85491d..2ca729f 100644 --- a/R/RushWorker.R +++ b/R/RushWorker.R @@ -17,8 +17,10 @@ #' @template param_lgr_buffer_size #' @template param_seed #' +#' @return Object of class [R6::R6Class] and `RushWorker` with worker methods. #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush = rsh(network_id = "test_network", config = config_local) diff --git a/R/assertions.R b/R/assertions.R index 960ccf6..13d8192 100644 --- a/R/assertions.R +++ b/R/assertions.R @@ -9,6 +9,7 @@ #' @name rush_assertions #' @keywords internal #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush = rsh(network_id = "test_network", config = config_local) diff --git a/R/heartbeat_loops.R b/R/heartbeat_loops.R index 79fb3a9..37f4629 100644 --- a/R/heartbeat_loops.R +++ b/R/heartbeat_loops.R @@ -19,6 +19,7 @@ #' @keywords internal #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' diff --git a/R/rush_plan.R b/R/rush_plan.R index b5042dd..384398e 100644 --- a/R/rush_plan.R +++ b/R/rush_plan.R @@ -19,6 +19,7 @@ #' @return `list()` with the stored configuration. #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush_plan(config = config_local, n_workers = 2) @@ -59,6 +60,7 @@ rush_plan = function( #' #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush_plan(config = config_local, n_workers = 2) @@ -78,8 +80,10 @@ rush_config = function() { #' @description #' Removes the rush plan that was set by [rush_plan()]. #' +#' @return Invisible `TRUE`. Function called for side effects. #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush_plan(config = config_local, n_workers = 2) @@ -99,6 +103,7 @@ remove_rush_plan = function() { #' #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush_plan(config = config_local, n_workers = 2) diff --git a/R/start_worker.R b/R/start_worker.R index e6802ae..d7cc82a 100644 --- a/R/start_worker.R +++ b/R/start_worker.R @@ -21,6 +21,7 @@ #' @return `NULL` #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \dontrun{ #' rush::start_worker( #' network_id = 'test-rush', diff --git a/R/sugar.R b/R/sugar.R index 4b1e5a7..adbddce 100644 --- a/R/sugar.R +++ b/R/sugar.R @@ -10,6 +10,7 @@ #' @return [Rush] controller. #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush = rsh(network_id = "test_network", config = config_local) diff --git a/R/worker_loops.R b/R/worker_loops.R index c58fd42..af7a39e 100644 --- a/R/worker_loops.R +++ b/R/worker_loops.R @@ -15,6 +15,7 @@ #' @return `NULL` #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush = rsh(network_id = "test_network", config = config_local) @@ -63,6 +64,7 @@ worker_loop_default = function(fun, constants = NULL, rush) { #' @return `NULL` #' @export #' @examples +#' # This example is not executed since Redis must be installed #' \donttest{ #' config_local = redux::redis_config() #' rush = rsh(network_id = "test_network", config = config_local) diff --git a/man/AppenderRedis.Rd b/man/AppenderRedis.Rd index 68231d8..4e83d9f 100644 --- a/man/AppenderRedis.Rd +++ b/man/AppenderRedis.Rd @@ -3,11 +3,15 @@ \name{AppenderRedis} \alias{AppenderRedis} \title{Log to Redis Database} +\value{ +Object of class \link[R6:R6Class]{R6::R6Class} and \code{AppenderRedis} with methods for writing log events to Redis data bases. +} \description{ \link{AppenderRedis} writes log messages to a Redis data base. This \link[lgr:Appender]{lgr::Appender} is created internally by \link{RushWorker} when logger thresholds are passed via \code{\link[=rush_plan]{rush_plan()}}. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() diff --git a/man/Rush.Rd b/man/Rush.Rd index 8ea0c30..4ad7d38 100644 --- a/man/Rush.Rd +++ b/man/Rush.Rd @@ -3,6 +3,9 @@ \name{Rush} \alias{Rush} \title{Rush Controller} +\value{ +Object of class \link[R6:R6Class]{R6::R6Class} and \code{Rush} with controller methods. +} \description{ \link{Rush} is the controller in a centralized rush network. The controller starts and stops the workers, pushes tasks to the workers and fetches results. @@ -117,6 +120,7 @@ See \link[parallel:RngStream]{parallel::nextRNGStream} for more details. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush = rsh(network_id = "test_network", config = config_local) diff --git a/man/RushWorker.Rd b/man/RushWorker.Rd index de69023..630c71f 100644 --- a/man/RushWorker.Rd +++ b/man/RushWorker.Rd @@ -3,6 +3,9 @@ \name{RushWorker} \alias{RushWorker} \title{Rush Worker} +\value{ +Object of class \link[R6:R6Class]{R6::R6Class} and \code{RushWorker} with worker methods. +} \description{ \link{RushWorker} evaluates tasks and writes results to the data base. The worker inherits from \link{Rush}. @@ -11,6 +14,7 @@ The worker inherits from \link{Rush}. The worker registers itself in the data base of the rush network. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush = rsh(network_id = "test_network", config = config_local) diff --git a/man/heartbeat.Rd b/man/heartbeat.Rd index ff2ce77..a34117f 100644 --- a/man/heartbeat.Rd +++ b/man/heartbeat.Rd @@ -44,6 +44,7 @@ If the kill key is set, the worker is killed. This function is called in a callr session. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() diff --git a/man/remove_rush_plan.Rd b/man/remove_rush_plan.Rd index bb96a8f..bea9dec 100644 --- a/man/remove_rush_plan.Rd +++ b/man/remove_rush_plan.Rd @@ -6,10 +6,14 @@ \usage{ remove_rush_plan() } +\value{ +Invisible \code{TRUE}. Function called for side effects. +} \description{ Removes the rush plan that was set by \code{\link[=rush_plan]{rush_plan()}}. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) diff --git a/man/rsh.Rd b/man/rsh.Rd index 04f2b0f..a0ad401 100644 --- a/man/rsh.Rd +++ b/man/rsh.Rd @@ -28,6 +28,7 @@ See \link[redux:redis_config]{redux::redis_config} for details.} Function to construct a \link{Rush} controller. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush = rsh(network_id = "test_network", config = config_local) diff --git a/man/rush_assertions.Rd b/man/rush_assertions.Rd index 08e4c51..e07ed66 100644 --- a/man/rush_assertions.Rd +++ b/man/rush_assertions.Rd @@ -37,6 +37,7 @@ If an assertion fails, an exception is raised. Otherwise, the input object is returned invisibly. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush = rsh(network_id = "test_network", config = config_local) diff --git a/man/rush_available.Rd b/man/rush_available.Rd index 976c8f0..9b1a72f 100644 --- a/man/rush_available.Rd +++ b/man/rush_available.Rd @@ -13,6 +13,7 @@ rush_available() Returns \code{TRUE} if a redis config file (\link[redux:redis_config]{redux::redis_config}) has been set by \code{\link[=rush_plan]{rush_plan()}}. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) diff --git a/man/rush_config.Rd b/man/rush_config.Rd index 97b970b..ab9009c 100644 --- a/man/rush_config.Rd +++ b/man/rush_config.Rd @@ -13,6 +13,7 @@ rush_config() Returns the rush config that was set by \code{\link[=rush_plan]{rush_plan()}}. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) diff --git a/man/rush_plan.Rd b/man/rush_plan.Rd index f012d64..c5e3345 100644 --- a/man/rush_plan.Rd +++ b/man/rush_plan.Rd @@ -39,6 +39,7 @@ Stores the number of workers and Redis configuration options (\link[redux:redis_ The function tests the connection to Redis and throws an error if the connection fails. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush_plan(config = config_local, n_workers = 2) diff --git a/man/start_worker.Rd b/man/start_worker.Rd index bf415f9..2adc4c9 100644 --- a/man/start_worker.Rd +++ b/man/start_worker.Rd @@ -36,6 +36,7 @@ It loads the packages and copies the globals to the global environment of the wo The function initialize the \link{RushWorker} instance and starts the worker loop. } \examples{ +# This example is not executed since Redis must be installed \dontrun{ rush::start_worker( network_id = 'test-rush', diff --git a/man/worker_loop_callr.Rd b/man/worker_loop_callr.Rd index 0349315..d38d4e0 100644 --- a/man/worker_loop_callr.Rd +++ b/man/worker_loop_callr.Rd @@ -24,6 +24,7 @@ Worker loop that pops a single task from the queue, executes the function in an Supports timeouts on the tasks. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush = rsh(network_id = "test_network", config = config_local) diff --git a/man/worker_loop_default.Rd b/man/worker_loop_default.Rd index ea45331..3c6613d 100644 --- a/man/worker_loop_default.Rd +++ b/man/worker_loop_default.Rd @@ -23,6 +23,7 @@ Rush worker instance.} Worker loop that pops a single task from the queue, executes the function and pushes the results. } \examples{ +# This example is not executed since Redis must be installed \donttest{ config_local = redux::redis_config() rush = rsh(network_id = "test_network", config = config_local)