diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index bb3cd91..a125e4a 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -38,7 +38,7 @@ jobs: - name: Add r-universe to repos run: | - cat("\noptions(repos=c(paws='https://paws-r.r-universe.dev',CRAN ='https://cloud.r-project.org'))\n", file = "~/.Rprofile", append = TRUE) + cat("\noptions(repos=c(paws='https://paws-r.r-universe.dev',wlandau='https://wlandau.r-universe.dev',CRAN ='https://cloud.r-project.org'))\n", file = "~/.Rprofile", append = TRUE) shell: Rscript {0} - uses: r-lib/actions/setup-r-dependencies@v2 diff --git a/.github/workflows/cover.yaml b/.github/workflows/cover.yaml index fe1b0fc..ce88ce0 100644 --- a/.github/workflows/cover.yaml +++ b/.github/workflows/cover.yaml @@ -28,7 +28,7 @@ jobs: - name: Add r-universe to repos run: | - cat("\noptions(repos=c(paws='https://paws-r.r-universe.dev',CRAN ='https://cloud.r-project.org'))\n", file = "~/.Rprofile", append = TRUE) + cat("\noptions(repos=c(paws='https://paws-r.r-universe.dev',wlandau='https://wlandau.r-universe.dev',CRAN ='https://cloud.r-project.org'))\n", file = "~/.Rprofile", append = TRUE) shell: Rscript {0} - uses: r-lib/actions/setup-r-dependencies@v2 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index b6d24f8..d5d78a3 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,7 +21,7 @@ jobs: - name: Add r-universe to repos run: | - cat("\noptions(repos=c(paws='https://paws-r.r-universe.dev',CRAN ='https://cloud.r-project.org'))\n", file = "~/.Rprofile", append = TRUE) + cat("\noptions(repos=c(paws='https://paws-r.r-universe.dev',wlandau='https://wlandau.r-universe.dev',CRAN ='https://cloud.r-project.org'))\n", file = "~/.Rprofile", append = TRUE) shell: Rscript {0} - uses: r-lib/actions/setup-r-dependencies@v2 diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 8135c51..22def79 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -35,7 +35,7 @@ jobs: - name: Add r-universe to repos run: | - cat("\noptions(repos=c(paws='https://paws-r.r-universe.dev',CRAN ='https://cloud.r-project.org'))\n", file = "~/.Rprofile", append = TRUE) + cat("\noptions(repos=c(paws='https://paws-r.r-universe.dev',wlandau='https://wlandau.r-universe.dev',CRAN ='https://cloud.r-project.org'))\n", file = "~/.Rprofile", append = TRUE) shell: Rscript {0} - uses: r-lib/actions/setup-r-dependencies@v2 diff --git a/DESCRIPTION b/DESCRIPTION index 1d09e19..9bbd4d2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -13,7 +13,7 @@ Description: In computationally demanding analysis projects, 'clustermq' by Schubert (2019) ), and 'batchtools' by Lang, Bischl, and Surmann (2017). . -Version: 0.0.6.9003 +Version: 0.0.6.9004 License: MIT + file LICENSE URL: https://wlandau.github.io/crew.aws.batch/, https://github.com/wlandau/crew.aws.batch @@ -34,7 +34,7 @@ Depends: R (>= 4.0.0) Imports: cli (>= 3.1.0), - crew (>= 0.9.5), + crew (>= 0.9.5.9003), paws.common (>= 0.7.0), paws.compute, paws.management, diff --git a/NEWS.md b/NEWS.md index 3bd9997..5067640 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,9 @@ -# crew.aws.batch 0.0.6.9003 (development) +# crew.aws.batch 0.0.6.9004 (development) * Send both cancellation and termination requests to end jobs. * Fix launcher bug/typo where parameters were supplied to container overrides. * Add a new `all` argument to `terminate()` in the AWS Batch monitor. +* Add `r_arguments` to accept command line arguments to R. # crew.aws.batch 0.0.6 diff --git a/R/crew_controller_aws_batch.R b/R/crew_controller_aws_batch.R index 849c4ad..20b56a2 100644 --- a/R/crew_controller_aws_batch.R +++ b/R/crew_controller_aws_batch.R @@ -43,6 +43,7 @@ crew_controller_aws_batch <- function( garbage_collection = FALSE, launch_max = 5L, processes = NULL, + r_arguments = NULL, aws_batch_config = list(), aws_batch_credentials = list(), aws_batch_endpoint = NULL, @@ -88,6 +89,7 @@ crew_controller_aws_batch <- function( launch_max = launch_max, tls = tls, processes = processes, + r_arguments = r_arguments, aws_batch_config = aws_batch_config, aws_batch_credentials = aws_batch_credentials, aws_batch_endpoint = aws_batch_endpoint, diff --git a/R/crew_launcher_aws_batch.R b/R/crew_launcher_aws_batch.R index 033e075..08a292d 100644 --- a/R/crew_launcher_aws_batch.R +++ b/R/crew_launcher_aws_batch.R @@ -83,7 +83,7 @@ #' For more details, visit #' and the #' "AWS arguments" sections of this help file. -#' @param aws_batch_propagate_tags `NULL` or a nonempty list. +#' @param aws_batch_propagate_tags `NULL` or a logical of length 1. #' For more details, visit #' and the #' "AWS arguments" sections of this help file. @@ -91,7 +91,7 @@ #' For more details, visit #' and the #' "AWS arguments" sections of this help file. -#' @param aws_batch_tags `NULL` or a nonempty list. +#' @param aws_batch_tags `NULL` or a nonempty named list. #' For more details, visit #' and the #' "AWS arguments" sections of this help file. @@ -115,6 +115,7 @@ crew_launcher_aws_batch <- function( launch_max = 5L, tls = crew::crew_tls(mode = "automatic"), processes = NULL, + r_arguments = NULL, aws_batch_config = list(), aws_batch_credentials = list(), aws_batch_endpoint = NULL, @@ -149,6 +150,7 @@ crew_launcher_aws_batch <- function( launch_max = launch_max, tls = tls, processes = processes, + r_arguments = r_arguments, aws_batch_config = aws_batch_config, aws_batch_credentials = aws_batch_credentials, aws_batch_endpoint = aws_batch_endpoint, @@ -316,6 +318,7 @@ crew_class_launcher_aws_batch <- R6::R6Class( #' @param launch_max See [crew_launcher_aws_batch()]. #' @param tls See [crew_launcher_aws_batch()]. #' @param processes See [crew_launcher_aws_batch()]. + #' @param r_arguments See [crew_launcher_aws_batch()]. #' @param aws_batch_config See [crew_launcher_aws_batch()]. #' @param aws_batch_credentials See [crew_launcher_aws_batch()]. #' @param aws_batch_endpoint See [crew_launcher_aws_batch()]. @@ -350,6 +353,7 @@ crew_class_launcher_aws_batch <- R6::R6Class( launch_max = NULL, tls = NULL, processes = NULL, + r_arguments = NULL, aws_batch_config = NULL, aws_batch_credentials = NULL, aws_batch_endpoint = NULL, @@ -382,7 +386,8 @@ crew_class_launcher_aws_batch <- R6::R6Class( garbage_collection = garbage_collection, launch_max = launch_max, tls = tls, - processes = processes + processes = processes, + r_arguments = r_arguments ) private$.aws_batch_config <- aws_batch_config private$.aws_batch_credentials <- aws_batch_credentials diff --git a/man/crew_class_launcher_aws_batch.Rd b/man/crew_class_launcher_aws_batch.Rd index 97ad93a..e653a1c 100644 --- a/man/crew_class_launcher_aws_batch.Rd +++ b/man/crew_class_launcher_aws_batch.Rd @@ -148,6 +148,7 @@ Abstract launcher constructor. launch_max = NULL, tls = NULL, processes = NULL, + r_arguments = NULL, aws_batch_config = NULL, aws_batch_credentials = NULL, aws_batch_endpoint = NULL, @@ -200,6 +201,8 @@ Abstract launcher constructor. \item{\code{processes}}{See \code{\link[=crew_launcher_aws_batch]{crew_launcher_aws_batch()}}.} +\item{\code{r_arguments}}{See \code{\link[=crew_launcher_aws_batch]{crew_launcher_aws_batch()}}.} + \item{\code{aws_batch_config}}{See \code{\link[=crew_launcher_aws_batch]{crew_launcher_aws_batch()}}.} \item{\code{aws_batch_credentials}}{See \code{\link[=crew_launcher_aws_batch]{crew_launcher_aws_batch()}}.} diff --git a/man/crew_class_monitor_aws_batch.Rd b/man/crew_class_monitor_aws_batch.Rd index a6e33b1..68b9e99 100644 --- a/man/crew_class_monitor_aws_batch.Rd +++ b/man/crew_class_monitor_aws_batch.Rd @@ -125,7 +125,8 @@ Validate the object. Terminate one or more AWS Batch jobs. \subsection{Usage}{ \if{html}{\out{
}}\preformatted{crew_class_monitor_aws_batch$terminate( - ids, + ids = NULL, + all = FALSE, reason = "cancelled/terminated by crew.aws.batch monitor", verbose = TRUE )}\if{html}{\out{
}} @@ -135,7 +136,11 @@ Terminate one or more AWS Batch jobs. \if{html}{\out{
}} \describe{ \item{\code{ids}}{Character vector with the IDs of the AWS Batch jobs -to terminate.} +to terminate. Leave as \code{NULL} if \code{all} is \code{TRUE}.} + +\item{\code{all}}{\code{TRUE} to terminate all jobs belonging to +the previously specified job definition. \code{FALSE} to terminate +only the job IDs given in the \code{ids} argument.} \item{\code{reason}}{Character of length 1, natural language explaining the reason the job was terminated.} diff --git a/man/crew_controller_aws_batch.Rd b/man/crew_controller_aws_batch.Rd index 0b44344..6297374 100644 --- a/man/crew_controller_aws_batch.Rd +++ b/man/crew_controller_aws_batch.Rd @@ -26,6 +26,7 @@ crew_controller_aws_batch( garbage_collection = FALSE, launch_max = 5L, processes = NULL, + r_arguments = NULL, aws_batch_config = list(), aws_batch_credentials = list(), aws_batch_endpoint = NULL, @@ -144,6 +145,10 @@ Plugins that may use these processes should run asynchronous calls using \code{launcher$async$eval()} and expect a \code{mirai} task object as the return value.} +\item{r_arguments}{Optional character vector of command line arguments +to pass to R when starting a worker. Example: +\code{r_arguments = c("--vanilla", "--max-connections=32")}.} + \item{aws_batch_config}{Named list, \code{config} argument of \code{paws.compute::batch()} with optional configuration details.} @@ -206,7 +211,7 @@ For more details, visit \url{https://www.paws-r-sdk.com/docs/batch_submit_job/} and the "AWS arguments" sections of this help file.} -\item{aws_batch_propagate_tags}{\code{NULL} or a nonempty list. +\item{aws_batch_propagate_tags}{\code{NULL} or a logical of length 1. For more details, visit \url{https://www.paws-r-sdk.com/docs/batch_submit_job/} and the "AWS arguments" sections of this help file.} @@ -216,7 +221,7 @@ For more details, visit \url{https://www.paws-r-sdk.com/docs/batch_submit_job/} and the "AWS arguments" sections of this help file.} -\item{aws_batch_tags}{\code{NULL} or a nonempty list. +\item{aws_batch_tags}{\code{NULL} or a nonempty named list. For more details, visit \url{https://www.paws-r-sdk.com/docs/batch_submit_job/} and the "AWS arguments" sections of this help file.} diff --git a/man/crew_launcher_aws_batch.Rd b/man/crew_launcher_aws_batch.Rd index c51be60..406ab27 100644 --- a/man/crew_launcher_aws_batch.Rd +++ b/man/crew_launcher_aws_batch.Rd @@ -20,6 +20,7 @@ crew_launcher_aws_batch( launch_max = 5L, tls = crew::crew_tls(mode = "automatic"), processes = NULL, + r_arguments = NULL, aws_batch_config = list(), aws_batch_credentials = list(), aws_batch_endpoint = NULL, @@ -116,6 +117,10 @@ Plugins that may use these processes should run asynchronous calls using \code{launcher$async$eval()} and expect a \code{mirai} task object as the return value.} +\item{r_arguments}{Optional character vector of command line arguments +to pass to R when starting a worker. Example: +\code{r_arguments = c("--vanilla", "--max-connections=32")}.} + \item{aws_batch_config}{Named list, \code{config} argument of \code{paws.compute::batch()} with optional configuration details.} @@ -178,7 +183,7 @@ For more details, visit \url{https://www.paws-r-sdk.com/docs/batch_submit_job/} and the "AWS arguments" sections of this help file.} -\item{aws_batch_propagate_tags}{\code{NULL} or a nonempty list. +\item{aws_batch_propagate_tags}{\code{NULL} or a logical of length 1. For more details, visit \url{https://www.paws-r-sdk.com/docs/batch_submit_job/} and the "AWS arguments" sections of this help file.} @@ -188,7 +193,7 @@ For more details, visit \url{https://www.paws-r-sdk.com/docs/batch_submit_job/} and the "AWS arguments" sections of this help file.} -\item{aws_batch_tags}{\code{NULL} or a nonempty list. +\item{aws_batch_tags}{\code{NULL} or a nonempty named list. For more details, visit \url{https://www.paws-r-sdk.com/docs/batch_submit_job/} and the "AWS arguments" sections of this help file.}