Skip to content

Commit

Permalink
Migrate to crew 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Sep 18, 2023
1 parent 4bc5c22 commit 4d61b59
Show file tree
Hide file tree
Showing 27 changed files with 263 additions and 119 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Description: In computationally demanding analysis projects,
'clustermq' by Schubert (2019) <doi:10.1093/bioinformatics/btz284>),
and 'batchtools' by Lang, Bischl, and Surmann (2017).
<doi:10.21105/joss.00135>.
Version: 0.1.1.9001
Version: 0.1.2
License: MIT + file LICENSE
URL: https://wlandau.github.io/crew.cluster/,
https://github.com/wlandau/crew.cluster
Expand All @@ -42,7 +42,7 @@ Authors@R: c(
Depends:
R (>= 4.0.0)
Imports:
crew (>= 0.4.0),
crew (>= 0.5.0),
lifecycle,
R6,
rlang,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ importFrom(crew,crew_assert)
importFrom(crew,crew_class_launcher)
importFrom(crew,crew_launcher)
importFrom(crew,crew_random_name)
importFrom(crew,crew_tls)
importFrom(lifecycle,badge)
importFrom(rlang,is_installed)
importFrom(utils,globalVariables)
7 changes: 4 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# crew.cluster 0.1.1.9001 (development)
# crew.cluster 0.1.2

* Require `crew` >= 0.4.0.
* Require `crew` >= 0.5.0.
* Add a new `slurm_time_minutes` for SLURM wall time (#1, @cfljam).
* Enable TLS.
* Use MB format for memory in SLURM launcher (#22, @kendonB).
* Use MB format for memory in SLURM launcher (#22, @kendonB).
* Use `launch_max` and `crew_tls()` from `crew` 0.5.0.

# crew.cluster 0.1.1

Expand Down
7 changes: 6 additions & 1 deletion R/crew_controller_lsf.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ crew_controller_lsf <- function(
workers = 1L,
host = NULL,
port = NULL,
tls_enable = FALSE,
tls = crew::crew_tls(),
tls_enable = NULL,
tls_config = NULL,
seconds_interval = 0.25,
seconds_timeout = 10,
Expand All @@ -40,6 +41,7 @@ crew_controller_lsf <- function(
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
verbose = FALSE,
command_submit = as.character(Sys.which("bsub")),
command_delete = as.character(Sys.which("bkill")),
Expand All @@ -57,6 +59,7 @@ crew_controller_lsf <- function(
workers = workers,
host = host,
port = port,
tls = tls,
tls_enable = tls_enable,
tls_config = tls_config,
seconds_interval = seconds_interval,
Expand All @@ -75,6 +78,8 @@ crew_controller_lsf <- function(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down
7 changes: 6 additions & 1 deletion R/crew_controller_pbs.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ crew_controller_pbs <- function(
workers = 1L,
host = NULL,
port = NULL,
tls_enable = FALSE,
tls = crew::crew_tls(),
tls_enable = NULL,
tls_config = NULL,
seconds_interval = 0.25,
seconds_timeout = 10,
Expand All @@ -36,6 +37,7 @@ crew_controller_pbs <- function(
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
verbose = FALSE,
command_submit = as.character(Sys.which("qsub")),
command_delete = as.character(Sys.which("qdel")),
Expand All @@ -54,6 +56,7 @@ crew_controller_pbs <- function(
workers = workers,
host = host,
port = port,
tls = tls,
tls_enable = tls_enable,
tls_config = tls_config,
seconds_interval = seconds_interval,
Expand All @@ -72,6 +75,8 @@ crew_controller_pbs <- function(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down
7 changes: 6 additions & 1 deletion R/crew_controller_sge.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ crew_controller_sge <- function(
workers = 1L,
host = NULL,
port = NULL,
tls_enable = FALSE,
tls = crew::crew_tls(),
tls_enable = NULL,
tls_config = NULL,
seconds_interval = 0.25,
seconds_timeout = 10,
Expand All @@ -36,6 +37,7 @@ crew_controller_sge <- function(
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
verbose = FALSE,
command_submit = as.character(Sys.which("qsub")),
command_delete = as.character(Sys.which("qdel")),
Expand All @@ -56,6 +58,7 @@ crew_controller_sge <- function(
workers = workers,
host = host,
port = port,
tls = tls,
tls_enable = tls_enable,
tls_config = tls_config,
seconds_interval = seconds_interval,
Expand All @@ -74,6 +77,8 @@ crew_controller_sge <- function(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down
7 changes: 6 additions & 1 deletion R/crew_controller_slurm.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ crew_controller_slurm <- function(
workers = 1L,
host = NULL,
port = NULL,
tls_enable = FALSE,
tls = crew::crew_tls(),
tls_enable = NULL,
tls_config = NULL,
seconds_interval = 0.25,
seconds_timeout = 10,
Expand All @@ -40,6 +41,7 @@ crew_controller_slurm <- function(
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
verbose = FALSE,
command_submit = as.character(Sys.which("sbatch")),
command_delete = as.character(Sys.which("scancel")),
Expand All @@ -56,6 +58,7 @@ crew_controller_slurm <- function(
workers = workers,
host = host,
port = port,
tls = tls,
tls_enable = tls_enable,
tls_config = tls_config,
seconds_interval = seconds_interval,
Expand All @@ -74,6 +77,8 @@ crew_controller_slurm <- function(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down
12 changes: 11 additions & 1 deletion R/crew_launcher_cluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ crew_launcher_cluster <- function(
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
tls = crew::crew_tls(),
verbose = FALSE,
command_submit = "",
command_delete = "",
Expand All @@ -64,6 +66,8 @@ crew_launcher_cluster <- function(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down Expand Up @@ -111,6 +115,8 @@ crew_class_launcher_cluster <- R6::R6Class(
#' @param reset_packages See [crew_launcher_cluster()].
#' @param reset_options See [crew_launcher_cluster()].
#' @param garbage_collection See [crew_launcher_cluster()].
#' @param launch_max See [crew_launcher_cluster()].
#' @param tls See [crew_launcher_cluster()].
#' @param verbose See [crew_launcher_cluster()].
#' @param command_submit See [crew_launcher_cluster()].
#' @param command_delete See [crew_launcher_cluster()].
Expand All @@ -129,6 +135,8 @@ crew_class_launcher_cluster <- R6::R6Class(
reset_packages = NULL,
reset_options = NULL,
garbage_collection = NULL,
launch_max = NULL,
tls = NULL,
verbose = NULL,
command_submit = NULL,
command_delete = NULL,
Expand All @@ -147,7 +155,9 @@ crew_class_launcher_cluster <- R6::R6Class(
reset_globals = reset_globals,
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls
)
self$verbose <- verbose
self$command_submit <- command_submit
Expand Down
10 changes: 10 additions & 0 deletions R/crew_launcher_lsf.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ crew_launcher_lsf <- function(
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
tls = crew::crew_tls(),
verbose = FALSE,
command_submit = as.character(Sys.which("bsub")),
command_delete = as.character(Sys.which("bkill")),
Expand All @@ -94,6 +96,8 @@ crew_launcher_lsf <- function(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down Expand Up @@ -147,6 +151,8 @@ crew_class_launcher_lsf <- R6::R6Class(
#' @param reset_packages See [crew_launcher_lsf()].
#' @param reset_options See [crew_launcher_lsf()].
#' @param garbage_collection See [crew_launcher_lsf()].
#' @param launch_max See [crew_launcher_lsf()].
#' @param tls See [crew_launcher_lsf()].
#' @param verbose See [crew_launcher_lsf()].
#' @param command_submit See [crew_launcher_lsf()].
#' @param command_delete See [crew_launcher_lsf()].
Expand All @@ -171,6 +177,8 @@ crew_class_launcher_lsf <- R6::R6Class(
reset_packages = NULL,
reset_options = NULL,
garbage_collection = NULL,
launch_max = NULL,
tls = NULL,
verbose = NULL,
command_submit = NULL,
command_delete = NULL,
Expand All @@ -196,6 +204,8 @@ crew_class_launcher_lsf <- R6::R6Class(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down
10 changes: 10 additions & 0 deletions R/crew_launcher_pbs.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ crew_launcher_pbs <- function(
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
tls = crew::crew_tls(),
verbose = FALSE,
command_submit = as.character(Sys.which("qsub")),
command_delete = as.character(Sys.which("qdel")),
Expand Down Expand Up @@ -100,6 +102,8 @@ crew_launcher_pbs <- function(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down Expand Up @@ -156,6 +160,8 @@ crew_class_launcher_pbs <- R6::R6Class(
#' @param reset_packages See [crew_launcher_pbs()].
#' @param reset_options See [crew_launcher_pbs()].
#' @param garbage_collection See [crew_launcher_pbs()].
#' @param launch_max See [crew_launcher_pbs()].
#' @param tls See [crew_launcher_pbs()].
#' @param verbose See [crew_launcher_pbs()].
#' @param command_submit See [crew_launcher_pbs()].
#' @param command_delete See [crew_launcher_pbs()].
Expand All @@ -181,6 +187,8 @@ crew_class_launcher_pbs <- R6::R6Class(
reset_packages = NULL,
reset_options = NULL,
garbage_collection = NULL,
launch_max = NULL,
tls = NULL,
verbose = NULL,
command_submit = NULL,
command_delete = NULL,
Expand All @@ -207,6 +215,8 @@ crew_class_launcher_pbs <- R6::R6Class(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down
10 changes: 10 additions & 0 deletions R/crew_launcher_sge.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ crew_launcher_sge <- function(
reset_packages = FALSE,
reset_options = FALSE,
garbage_collection = FALSE,
launch_max = 5L,
tls = crew::crew_tls(),
verbose = FALSE,
command_submit = as.character(Sys.which("qsub")),
command_delete = as.character(Sys.which("qdel")),
Expand Down Expand Up @@ -104,6 +106,8 @@ crew_launcher_sge <- function(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down Expand Up @@ -166,6 +170,8 @@ crew_class_launcher_sge <- R6::R6Class(
#' @param reset_packages See [crew_launcher_sge()].
#' @param reset_options See [crew_launcher_sge()].
#' @param garbage_collection See [crew_launcher_sge()].
#' @param launch_max See [crew_launcher_sge()].
#' @param tls See [crew_launcher_sge()].
#' @param verbose See [crew_launcher_sge()].
#' @param command_submit See [crew_launcher_sge()].
#' @param command_delete See [crew_launcher_sge()].
Expand Down Expand Up @@ -193,6 +199,8 @@ crew_class_launcher_sge <- R6::R6Class(
reset_packages = NULL,
reset_options = NULL,
garbage_collection = NULL,
launch_max = NULL,
tls = NULL,
verbose = NULL,
command_submit = NULL,
command_delete = NULL,
Expand Down Expand Up @@ -221,6 +229,8 @@ crew_class_launcher_sge <- R6::R6Class(
reset_packages = reset_packages,
reset_options = reset_options,
garbage_collection = garbage_collection,
launch_max = launch_max,
tls = tls,
verbose = verbose,
command_submit = command_submit,
command_delete = command_delete,
Expand Down
Loading

0 comments on commit 4d61b59

Please sign in to comment.