Skip to content

Commit 07bdf79

Browse files
Merge branch 'release/0.5.0'
2 parents 473df4b + 8273653 commit 07bdf79

File tree

8 files changed

+75
-18
lines changed

8 files changed

+75
-18
lines changed

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: future.batchtools
2-
Version: 0.4.0
2+
Version: 0.5.0
33
Depends:
44
R (>= 3.2.0),
5-
future (>= 1.4.0)
5+
future (>= 1.5.0)
66
Imports:
77
batchtools (>= 0.9.3)
88
Suggests:
@@ -19,7 +19,6 @@ Description: Implements of the Future API on top of the 'batchtools' package.
1919
in parallel out of the box, not only on your local machine or ad-hoc
2020
cluster of machines, but also via high-performance compute ('HPC') job
2121
schedulers such as 'LSF', 'OpenLava', 'Slurm', 'SGE', and 'TORQUE' / 'PBS',
22-
as well as 'Docker Swarm' clusters,
2322
e.g. 'y <- future_lapply(files, FUN = process)'.
2423
License: LGPL (>= 2.1)
2524
LazyLoad: TRUE

NEWS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Package: future.batchtools
22
==========================
33

4+
Version: 0.5.0 [2017-06-02]
5+
6+
o First version submitted to CRAN.
7+
8+
SOFTWARE QUALITY:
9+
10+
o Added more tests; test coverage now at 93%.
11+
12+
413
Version: 0.4.0 [2017-05-16]
514

615
NEW FEATURES:

R/future_cache_path.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ future_cache_path <- local({
1717
}
1818
path <<- path_tmp
1919
}
20-
if (absolute) path <- normalizePath(path)
20+
if (absolute) path <- normalizePath(path, mustWork = FALSE)
2121

2222
path
2323
}

tests/future,labels.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
source("incl/start.R")
2-
supportedStrategies <- future:::supportedStrategies
32

43
message("*** Futures - labels ...")
54

6-
strategies <- supportedStrategies()
7-
strategies <- setdiff(strategies, "multiprocess")
85
strategies <- c("batchtools_local")
96

107
for (strategy in strategies) {

tests/future,lazy.R

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
source("incl/start.R")
2+
3+
message("*** Futures - lazy ...")
4+
5+
strategies <- c("batchtools_local")
6+
7+
for (strategy in strategies) {
8+
mprintf("- plan('%s') ...", strategy)
9+
plan(strategy)
10+
11+
a <- 42
12+
f <- future(2 * a, lazy = TRUE)
13+
a <- 21
14+
v <- value(f)
15+
stopifnot(v == 84)
16+
17+
a <- 42
18+
v %<-% { 2 * a } %lazy% TRUE
19+
a <- 21
20+
stopifnot(v == 84)
21+
22+
mprintf("- plan('%s') ... DONE", strategy)
23+
} ## for (strategy ...)
24+
25+
message("*** Futures - lazy ... DONE")
26+
27+
source("incl/end.R")

tests/globals,formulas.R

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,14 @@ outer_function <- function(x) {
111111
y0 <- outer_function(1L)
112112
str(y0)
113113

114-
## Check if globals version installed identifies globals in formulas
115-
if (packageVersion("globals") >= "0.10.0") {
116-
f <- future({ outer_function(1L) })
117-
y <- value(f)
118-
str(y)
119-
stopifnot(all.equal(y, y0))
120-
121-
y %<-% { outer_function(1L) }
122-
str(y)
123-
stopifnot(all.equal(y, y0))
124-
}
114+
f <- future({ outer_function(1L) })
115+
y <- value(f)
116+
str(y)
117+
stopifnot(all.equal(y, y0))
118+
119+
y %<-% { outer_function(1L) }
120+
str(y)
121+
stopifnot(all.equal(y, y0))
125122

126123
message("*** Globals - map(x, ~ expr) ... DONE")
127124

tests/resources_OP.R

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
source("incl/start.R")
2+
3+
message("*** %resources% ...")
4+
5+
plan(batchtools_local)
6+
7+
## This will test `%resources%` but it'll be ignored
8+
## (with a warning) by batchtools_local()
9+
y %<-% { 42 } %resources% list(mem = "42gb")
10+
11+
message("*** %resources% ... DONE")
12+
13+
source("incl/end.R")

tests/zzz.onUnload.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
source("incl/start.R")
2+
3+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4+
# Load and unload of package
5+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6+
loadNamespace("future.batchtools")
7+
8+
message("*** .onUnload() ...")
9+
10+
libpath <- dirname(system.file(package = "future.batchtools"))
11+
future.batchtools:::.onUnload(libpath)
12+
13+
message("*** .onUnload() ... DONE")
14+
15+
source("incl/end.R")

0 commit comments

Comments
 (0)