Skip to content

Commit

Permalink
Repo transferred to 'futureverse' org
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Oct 27, 2024
1 parent f6c7d40 commit 0e92a9d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/future_xapply.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ future_xapply <- local({
## than one element is processed per future. The adjustment is done by
## scaling up the limit by the number of elements in the chunk. This is
## a "good enough" approach.
## (https://github.com/HenrikBengtsson/future.apply/issues/8).
## (https://github.com/futureverse/future.apply/issues/8).
if (length(chunks) > 1L) {
options(future.globals.maxSize = length(chunks) * globals.maxSize.default)
if (debug) mdebugf(" - Adjusted option 'future.globals.maxSize': %.0f -> %d * %.0f = %.0f (bytes)", globals.maxSize.default, length(chunks), globals.maxSize.default, getOption("future.globals.maxSize"))
Expand Down
8 changes: 4 additions & 4 deletions tests/future_lapply,globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ for (strategy in supportedStrategies()) {
}

message("- future_lapply(X, ...) - 'X' containing globals ...")
## From https://github.com/HenrikBengtsson/future.apply/issues/12
## From https://github.com/futureverse/future.apply/issues/12
a <- 42
b <- 21
X <- list(
Expand All @@ -145,7 +145,7 @@ for (strategy in supportedStrategies()) {
str(list(z1 = z1))
stopifnot(identical(z1, z0))

## https://github.com/HenrikBengtsson/future.apply/issues/47
## https://github.com/futureverse/future.apply/issues/47
message("- future_lapply(X, ...) - '{ a <- a + 1; a }' ...")
a <- 1
z0 <- lapply(1, function(ii) {
Expand All @@ -158,15 +158,15 @@ for (strategy in supportedStrategies()) {
})
stopifnot(identical(z1, z0))

## https://github.com/HenrikBengtsson/future.apply/issues/47
## https://github.com/futureverse/future.apply/issues/47
message("- future_lapply(X, ...) - '{ a; a <- a + 1 }' ...")
z2 <- tryCatch(future_lapply(1, function(ii) {
a
a <- a + 1
}), error = identity)
stopifnot(identical(z2, z0))

## https://github.com/HenrikBengtsson/future.apply/issues/85
## https://github.com/futureverse/future.apply/issues/85
message("- future_lapply(..., future.globals = <list>) ...")
a <- 0
y <- future_lapply(1, FUN = function(x) a, future.globals = list(a = 42))
Expand Down
2 changes: 1 addition & 1 deletion tests/future_mapply,globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ for (strategy in supportedStrategies()) {
}

message("- future_mapply(FUN, X, ...) - 'X' containing globals ...")
## From https://github.com/HenrikBengtsson/future.apply/issues/12
## From https://github.com/futureverse/future.apply/issues/12
a <- 42
b <- 21
X <- list(
Expand Down
2 changes: 1 addition & 1 deletion tests/future_sapply.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for (strategy in supportedStrategies()) {
y1 <- future_sapply(1:3, FUN = "sqrt")
stopifnot(identical(y1, y0))

## https://github.com/HenrikBengtsson/future.apply/issues/61
## https://github.com/futureverse/future.apply/issues/61
compute <- function(a, x_vec) a + x_vec
call_compute <- function(..., x_vec = 1:2){
compute_with_dots <- function(x) compute(..., x_vec = x)
Expand Down

0 comments on commit 0e92a9d

Please sign in to comment.