Skip to content

Commit 02fc42c

Browse files
committed
removed deprecated chunkIds
1 parent 5c11a43 commit 02fc42c

File tree

8 files changed

+7
-148
lines changed

8 files changed

+7
-148
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export(cfHandleUnknownSubmitError)
4040
export(cfKillJob)
4141
export(cfReadBrewTemplate)
4242
export(chunk)
43-
export(chunkIds)
4443
export(clearRegistry)
4544
export(doJobCollection)
4645
export(estimateRuntimes)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# batchtools 0.9.11
2+
3+
* Removed deprecated function `chunkIds()`.
4+
15
# batchtools 0.9.10
26

37
* Exported functions `findConfFile()` and `findTemplateFile()`.

R/chunkIds.R

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,8 @@
1-
#' @title Chunk Jobs for Sequential Execution
2-
#'
3-
#' @description
4-
#' This function is deprecated in favor of the more flexible \code{chunk}, \code{lpt} and \code{binpack}.
5-
#'
6-
#' @templateVar ids.default all
7-
#' @template ids
8-
#' @param group.by [\code{character(0)}]\cr
9-
#' If \code{ids} is a \code{\link{data.frame}} with additional columns
10-
#' (in addition to the required column \dQuote{job.id}), then the chunking is performed using
11-
#' subgroups defined by the columns set in \code{group.by}.
12-
#' See example.
13-
#' @inheritParams chunk
14-
#' @template reg
15-
#' @return [\code{\link[data.table]{data.table}}] with columns \dQuote{job.id} and \dQuote{chunk}.
16-
#' @seealso \code{\link{chunk}} \code{\link{binpack}} \code{\link{lpt}}
17-
#' @export
18-
chunkIds = function(ids = NULL, n.chunks = NULL, chunk.size = NULL, group.by = character(0L), reg = getDefaultRegistry()) {
19-
.Deprecated("chunk", package = "batchtools")
20-
assertRegistry(reg)
21-
assertCharacter(group.by, any.missing = FALSE, min.chars = 1L)
22-
ids = convertIds(reg, ids, default = allIds(reg), keep.extra = group.by)
23-
24-
if (length(group.by) > 0L) {
25-
job.id = NULL
26-
if (any(group.by %chnin% names(ids)))
27-
stop("All columns to group by must be provided in the 'ids' table")
28-
ids[, "chunk" := chunk(job.id, n.chunks = n.chunks, chunk.size = chunk.size), by = group.by]
29-
ids[, "chunk" := .GRP, by = c(group.by, "chunk")]
30-
} else {
31-
ids[, "chunk" := chunk(job.id, n.chunks = n.chunks, chunk.size = chunk.size)]
32-
}
33-
34-
return(ids[, c("job.id", "chunk")])
35-
}
36-
37-
381
#' @title Chunk Jobs for Sequential Execution
392
#'
403
#' @description
414
#' Jobs can be partitioned into \dQuote{chunks} to be executed sequentially on the computational nodes.
42-
#' Chunks are defined by providing a data frame with columns \dQuote{job.id} and \dQuote{chunk} (integer).
5+
#' Chunks are defined by providing a data frame with columns \dQuote{job.id} and \dQuote{chunk} (integer)
436
#' to \code{\link{submitJobs}}.
447
#' All jobs with the same chunk number will be grouped together on one node to form a single
458
#' computational job.

R/zzz.R

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,13 @@
3131
#' @importFrom withr with_dir with_seed local_options local_dir
3232
"_PACKAGE"
3333

34-
#' @title Deprecated function in the batchtools package
35-
#' @rdname batchtools-deprecated
36-
#' @name batchtools-deprecated
37-
#' @description
38-
#' The following functions have been deprecated:
39-
#' \tabular{rl}{
40-
#' \code{chunkIds} \tab deprecated in favor of \code{\link{chunk}}, \code{\link{lpt}} and \code{\link{binpack}}\cr
41-
#' }
42-
NULL
43-
4434
batchtools = new.env(parent = emptyenv())
4535
batchtools$debug = FALSE
4636
batchtools$hooks = list(
4737
remote = c("pre.do.collection", "post.do.collection"),
4838
local = c("pre.sync", "post.sync", "pre.submit.job", "post.submit.job", "pre.submit", "post.submit", "pre.kill", "post.kill")
4939
)
40+
5041
batchtools$resources = list(
5142
per.job = c("walltime", "memory", "ncpus", "omp.threads", "blas.threads"),
5243
per.chunk = c("measure.memory", "chunks.as.arrayjobs", "pm.backend", "foreach.backend")

man/batchtools-deprecated.Rd

Lines changed: 0 additions & 11 deletions
This file was deleted.

man/chunk.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chunkIds.Rd

Lines changed: 0 additions & 48 deletions
This file was deleted.

tests/testthat/test_chunkIds.R

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)