From 0b0aa417a9ff5513df61f61a7b4f9cde521d31af Mon Sep 17 00:00:00 2001 From: wlandau-lilly Date: Mon, 2 Oct 2023 14:08:38 -0400 Subject: [PATCH] Adjust to https://github.com/wlandau/crew/issues/131 (seconds_interval) --- DESCRIPTION | 2 +- NEWS.md | 1 + R/crew_controller_lsf.R | 1 - R/crew_controller_pbs.R | 1 - R/crew_controller_sge.R | 1 - R/crew_controller_slurm.R | 1 - R/crew_launcher_lsf.R | 15 ++++++++++----- R/crew_launcher_pbs.R | 15 ++++++++++----- R/crew_launcher_sge.R | 15 ++++++++++----- R/crew_launcher_slurm.R | 15 ++++++++++----- man/crew_class_launcher_cluster.Rd | 2 ++ man/crew_class_launcher_lsf.Rd | 5 ++--- man/crew_class_launcher_pbs.Rd | 5 ++--- man/crew_class_launcher_sge.Rd | 5 ++--- man/crew_class_launcher_slurm.Rd | 5 ++--- man/crew_launcher_cluster.Rd | 3 ++- man/crew_launcher_lsf.Rd | 5 +++-- man/crew_launcher_pbs.Rd | 5 +++-- man/crew_launcher_sge.Rd | 5 +++-- man/crew_launcher_slurm.Rd | 5 +++-- 20 files changed, 66 insertions(+), 46 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3d58743..0104dcd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -42,7 +42,7 @@ Authors@R: c( Depends: R (>= 4.0.0) Imports: - crew (>= 0.5.0.9002), + crew (>= 0.5.0.9003), lifecycle, R6, rlang, diff --git a/NEWS.md b/NEWS.md index 1cb6474..be203d7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # crew.cluster 0.1.2.9000 (development) * Deprecate `seconds_exit` (https://github.com/wlandau/crew/issues/125, @shikokuchuo). +* Deprecate `seconds_interval` (https://github.com/wlandau/crew/issues/131). # crew.cluster 0.1.2 diff --git a/R/crew_controller_lsf.R b/R/crew_controller_lsf.R index fa2ba3a..7ee778c 100644 --- a/R/crew_controller_lsf.R +++ b/R/crew_controller_lsf.R @@ -77,7 +77,6 @@ crew_controller_lsf <- function( ) launcher <- crew_launcher_lsf( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, diff --git a/R/crew_controller_pbs.R b/R/crew_controller_pbs.R index 1780771..4559f02 100644 --- a/R/crew_controller_pbs.R +++ b/R/crew_controller_pbs.R @@ -74,7 +74,6 @@ crew_controller_pbs <- function( ) launcher <- crew_launcher_pbs( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, diff --git a/R/crew_controller_sge.R b/R/crew_controller_sge.R index cc3ce8f..0f4cd29 100644 --- a/R/crew_controller_sge.R +++ b/R/crew_controller_sge.R @@ -76,7 +76,6 @@ crew_controller_sge <- function( ) launcher <- crew_launcher_sge( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, diff --git a/R/crew_controller_slurm.R b/R/crew_controller_slurm.R index ae5ff05..115a083 100644 --- a/R/crew_controller_slurm.R +++ b/R/crew_controller_slurm.R @@ -76,7 +76,6 @@ crew_controller_slurm <- function( ) launcher <- crew_launcher_slurm( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, diff --git a/R/crew_launcher_lsf.R b/R/crew_launcher_lsf.R index 2378375..f7e5991 100644 --- a/R/crew_launcher_lsf.R +++ b/R/crew_launcher_lsf.R @@ -57,7 +57,7 @@ #' `lsf_cores = NULL` omits this line. crew_launcher_lsf <- function( name = NULL, - seconds_interval = 0.25, + seconds_interval = NULL, seconds_launch = 86400, seconds_idle = Inf, seconds_wall = Inf, @@ -81,10 +81,18 @@ crew_launcher_lsf <- function( lsf_memory_gigabytes_required = NULL, lsf_cores = NULL ) { + crew_deprecate( + name = "seconds_interval", + date = "2023-10-02", + version = "0.5.0.9003", + alternative = "none (no longer necessary)", + condition = "message", + value = seconds_interval, + frequency = "once" + ) name <- as.character(name %|||% crew::crew_random_name()) launcher <- crew_class_launcher_lsf$new( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, @@ -138,7 +146,6 @@ crew_class_launcher_lsf <- R6::R6Class( #' @description LSF launcher constructor. #' @return an LSF launcher object. #' @param name See [crew_launcher_lsf()]. - #' @param seconds_interval See [crew_launcher_lsf()]. #' @param seconds_launch See [crew_launcher_lsf()]. #' @param seconds_idle See [crew_launcher_lsf()]. #' @param seconds_wall See [crew_launcher_lsf()]. @@ -163,7 +170,6 @@ crew_class_launcher_lsf <- R6::R6Class( #' @param lsf_cores See [crew_launcher_lsf()]. initialize = function( name = NULL, - seconds_interval = NULL, seconds_launch = NULL, seconds_idle = NULL, seconds_wall = NULL, @@ -189,7 +195,6 @@ crew_class_launcher_lsf <- R6::R6Class( ) { super$initialize( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, diff --git a/R/crew_launcher_pbs.R b/R/crew_launcher_pbs.R index 95a4c3a..c9f4ad6 100644 --- a/R/crew_launcher_pbs.R +++ b/R/crew_launcher_pbs.R @@ -62,7 +62,7 @@ #' `pbs_walltime_hours = NULL` omits this line. crew_launcher_pbs <- function( name = NULL, - seconds_interval = 0.25, + seconds_interval = NULL, seconds_launch = 86400, seconds_idle = Inf, seconds_wall = Inf, @@ -87,10 +87,18 @@ crew_launcher_pbs <- function( pbs_cores = NULL, pbs_walltime_hours = 12 ) { + crew_deprecate( + name = "seconds_interval", + date = "2023-10-02", + version = "0.5.0.9003", + alternative = "none (no longer necessary)", + condition = "message", + value = seconds_interval, + frequency = "once" + ) name <- as.character(name %|||% crew::crew_random_name()) launcher <- crew_class_launcher_pbs$new( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, @@ -147,7 +155,6 @@ crew_class_launcher_pbs <- R6::R6Class( #' @description PBS/TORQUE launcher constructor. #' @return an PBS/TORQUE launcher object. #' @param name See [crew_launcher_pbs()]. - #' @param seconds_interval See [crew_launcher_pbs()]. #' @param seconds_launch See [crew_launcher_pbs()]. #' @param seconds_idle See [crew_launcher_pbs()]. #' @param seconds_wall See [crew_launcher_pbs()]. @@ -173,7 +180,6 @@ crew_class_launcher_pbs <- R6::R6Class( #' @param pbs_walltime_hours See [crew_launcher_pbs()]. initialize = function( name = NULL, - seconds_interval = NULL, seconds_launch = NULL, seconds_idle = NULL, seconds_wall = NULL, @@ -200,7 +206,6 @@ crew_class_launcher_pbs <- R6::R6Class( ) { super$initialize( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, diff --git a/R/crew_launcher_sge.R b/R/crew_launcher_sge.R index 8afa115..5edf7dd 100644 --- a/R/crew_launcher_sge.R +++ b/R/crew_launcher_sge.R @@ -64,7 +64,7 @@ #' `"#$ -l gpu=1"` in the SGE job script. `sge_gpu = NULL` omits this line. crew_launcher_sge <- function( name = NULL, - seconds_interval = 0.25, + seconds_interval = NULL, seconds_launch = 86400, seconds_idle = Inf, seconds_wall = Inf, @@ -91,10 +91,18 @@ crew_launcher_sge <- function( sge_cores = NULL, sge_gpu = NULL ) { + crew_deprecate( + name = "seconds_interval", + date = "2023-10-02", + version = "0.5.0.9003", + alternative = "none (no longer necessary)", + condition = "message", + value = seconds_interval, + frequency = "once" + ) name <- as.character(name %|||% crew::crew_random_name()) launcher <- crew_class_launcher_sge$new( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, @@ -157,7 +165,6 @@ crew_class_launcher_sge <- R6::R6Class( #' @description SGE launcher constructor. #' @return an SGE launcher object. #' @param name See [crew_launcher_sge()]. - #' @param seconds_interval See [crew_launcher_sge()]. #' @param seconds_launch See [crew_launcher_sge()]. #' @param seconds_idle See [crew_launcher_sge()]. #' @param seconds_wall See [crew_launcher_sge()]. @@ -185,7 +192,6 @@ crew_class_launcher_sge <- R6::R6Class( #' @param sge_gpu See [crew_launcher_sge()]. initialize = function( name = NULL, - seconds_interval = NULL, seconds_launch = NULL, seconds_idle = NULL, seconds_wall = NULL, @@ -214,7 +220,6 @@ crew_class_launcher_sge <- R6::R6Class( ) { super$initialize( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, diff --git a/R/crew_launcher_slurm.R b/R/crew_launcher_slurm.R index a46264d..4c94107 100644 --- a/R/crew_launcher_slurm.R +++ b/R/crew_launcher_slurm.R @@ -51,7 +51,7 @@ #' omits this line. crew_launcher_slurm <- function( name = NULL, - seconds_interval = 0.25, + seconds_interval = NULL, seconds_launch = 86400, seconds_idle = Inf, seconds_wall = Inf, @@ -74,10 +74,18 @@ crew_launcher_slurm <- function( slurm_cpus_per_task = NULL, slurm_time_minutes = 1440 ) { + crew_deprecate( + name = "seconds_interval", + date = "2023-10-02", + version = "0.5.0.9003", + alternative = "none (no longer necessary)", + condition = "message", + value = seconds_interval, + frequency = "once" + ) name <- as.character(name %|||% crew::crew_random_name()) launcher <- crew_class_launcher_slurm$new( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, @@ -128,7 +136,6 @@ crew_class_launcher_slurm <- R6::R6Class( #' @description SLURM launcher constructor. #' @return an SLURM launcher object. #' @param name See [crew_launcher_slurm()]. - #' @param seconds_interval See [crew_launcher_slurm()]. #' @param seconds_launch See [crew_launcher_slurm()]. #' @param seconds_idle See [crew_launcher_slurm()]. #' @param seconds_wall See [crew_launcher_slurm()]. @@ -152,7 +159,6 @@ crew_class_launcher_slurm <- R6::R6Class( #' @param slurm_time_minutes See [crew_launcher_slurm()]. initialize = function( name = NULL, - seconds_interval = NULL, seconds_launch = NULL, seconds_idle = NULL, seconds_wall = NULL, @@ -177,7 +183,6 @@ crew_class_launcher_slurm <- R6::R6Class( ) { super$initialize( name = name, - seconds_interval = seconds_interval, seconds_launch = seconds_launch, seconds_idle = seconds_idle, seconds_wall = seconds_wall, diff --git a/man/crew_class_launcher_cluster.Rd b/man/crew_class_launcher_cluster.Rd index 879801d..906fe04 100644 --- a/man/crew_class_launcher_cluster.Rd +++ b/man/crew_class_launcher_cluster.Rd @@ -68,6 +68,8 @@ Other launchers: \if{html}{\out{
Inherited methods