Skip to content

Commit 1895d85

Browse files
Merge branch 'release/0.8.1'
2 parents 26cbdce + f5f358d commit 1895d85

File tree

16 files changed

+217
-178
lines changed

16 files changed

+217
-178
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: future.batchtools
2-
Version: 0.8.0
2+
Version: 0.8.1
33
Depends:
44
R (>= 3.2.0),
5-
future (>= 1.12.0)
5+
future (>= 1.14.0)
66
Imports:
77
batchtools (>= 0.9.11)
88
Suggests:

NEWS

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

4+
Version: 0.8.1 [2019-09-30]
5+
6+
BUG FIXES:
7+
8+
* print() for BatchtoolsFuture would produce an error if the underlying
9+
batchtools Registry was incomplete.
10+
11+
412
Version: 0.8.0 [2019-05-04]
513

614
NEW FEATURES:

R/BatchtoolsFuture-class.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ print.BatchtoolsFuture <- function(x, ...) {
133133
class(reg))
134134
} else {
135135
printf("batchtools Registry:\n ")
136-
print(reg)
137136
printf(" File dir exists: %s\n", file_test("-d", reg$file.dir))
138137
printf(" Work dir exists: %s\n", file_test("-d", reg$work.dir))
138+
try(print(reg))
139139
}
140140

141141
invisible(x)
@@ -305,6 +305,7 @@ result.BatchtoolsFuture <- function(future, cleanup = TRUE, ...) {
305305
stop_if_not(inherits(result, "FutureResult"))
306306
future$result <- result
307307
future$state <- "finished"
308+
308309
if (cleanup) delete(future)
309310

310311
NextMethod()

R/future_cache_path.R

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
#' @importFrom utils file_test sessionInfo
22
future_cache_path <- local({
3-
## The path used for this session
4-
path <- NULL
3+
## The subfolder used for this session
4+
dir <- NULL
55

66
function(root_path = Sys.getenv("R_FUTURE_CACHE_PATH", ".future"), absolute = TRUE, create = TRUE) {
7-
if (is.null(path)) {
7+
if (is.null(dir)) {
88
id <- basename(tempdir())
99
id <- gsub("Rtmp", "", id, fixed = TRUE)
1010
timestamp <- format(Sys.time(), format = "%Y%m%d_%H%M%S")
11-
dir <- sprintf("%s-%s", timestamp, id)
12-
path_tmp <- file.path(root_path, dir)
13-
if (create && !file_test("-d", path_tmp)) {
14-
dir.create(path_tmp, recursive = TRUE)
15-
pathname_tmp <- file.path(path_tmp, "sessioninfo.txt")
16-
writeLines(capture_output(print(sessionInfo())), con = pathname_tmp)
17-
}
18-
path <<- path_tmp
11+
dir <<- sprintf("%s-%s", timestamp, id)
1912
}
13+
14+
path <- file.path(root_path, dir)
15+
if (create && !file_test("-d", path)) {
16+
dir.create(path, recursive = TRUE)
17+
pathname <- file.path(path, "sessioninfo.txt")
18+
writeLines(capture_output(print(sessionInfo())), con = pathname)
19+
}
20+
2021
if (absolute) path <- normalizePath(path, mustWork = FALSE)
2122

2223
path

R/resources_OP.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
on.exit(plan(oplan, substitute = FALSE, .call = NULL))
2525

2626
## Tweak current strategy and apply
27-
args <- list(plan(), resources = tweaks, penvir = envir)
27+
args <- list(plan("next"), resources = tweaks, penvir = envir)
2828
strategy <- do.call(tweak, args = args)
2929
plan(strategy, substitute = FALSE, .call = NULL)
3030

R/zzz.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
.onLoad <- function(libname, pkgname) {
2+
inRCmdCheck <- import_future("inRCmdCheck")
3+
if (inRCmdCheck()) {
4+
Sys.setenv("R_FUTURE_CACHE_PATH" = file.path(tempdir(), ".future"))
5+
}
6+
}
7+
18
#' @importFrom utils file_test
29
.onUnload <- function(libpath) {
310
## (a) Force finalizer of Future objects to run such

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,30 @@ To configure batchtools for job schedulers we need to setup a `*.tmpl` template
116116
file that is used to generate the script used by the scheduler.
117117
This is what a template file for TORQUE / PBS may look like:
118118
```sh
119+
#!/bin/bash
120+
119121
## Job name:
120-
#PBS -N <%= job.name %>
122+
#PBS -N <%= if (exists("job.name", mode = "character")) job.name else job.hash %>
123+
124+
## Direct streams to logfile:
125+
#PBS -o <%= log.file %>
121126

122127
## Merge standard error and output:
123128
#PBS -j oe
124129

125-
## Resource parameters:
126-
<% for (name in names(resources)) { %>
127-
#PBS -l <%= name %>=<%= resources[[name]] %>
130+
## Email on abort (a) and termination (e), but not when starting (b)
131+
#PBS -m ae
132+
133+
## Resources needed:
134+
<% if (length(resources) > 0) {
135+
opts <- unlist(resources, use.names = TRUE)
136+
opts <- sprintf("%s=%s", names(opts), opts)
137+
opts <- paste(opts, collapse = ",") %>
138+
#PBS -l <%= opts %>
128139
<% } %>
129140

130-
## Run R:
131-
R CMD BATCH --no-save --no-restore "<%= rscript %>" /dev/stdout
141+
## Launch R and evaluated the batchtools R job
142+
Rscript -e 'batchtools::doJobCollection("<%= uri %>")'
132143
```
133144
If this template is saved to file `batchtools.torque.tmpl` (without period)
134145
in the working directory or as `.batchtools.torque.tmpl` (with period) the

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ environment:
2020
init:
2121
ps: |
2222
$ErrorActionPreference = "Stop"
23-
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
23+
Invoke-WebRequest https://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
2424
Import-Module '..\appveyor-tool.ps1'
2525
2626
install:

cran-comments.md

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# CRAN submission future.batchtools 0.8.0
1+
# CRAN submission future.batchtools 0.8.1
22

3-
on 2019-05-04
3+
on 2019-09-30
44

55
I've verified that this submission causes no issues for any of the 3 reverse package dependencies available on CRAN.
66

7-
Thanks in advance
7+
Thanks in advance.
88

99

1010
## Notes not sent to CRAN
@@ -14,47 +14,35 @@ Thanks in advance
1414
The package has been verified using `R CMD check --as-cran` on:
1515

1616
* Platform x86_64-apple-darwin15.6.0 (64-bit) [Travis CI]:
17-
- R version 3.5.3 (2019-03-11)
18-
- R version 3.6.0 (2019-04-26)
17+
- R version 3.5.3 (2017-01-27)
18+
- R version 3.6.1 (2019-07-05)
1919

2020
* Platform x86_64-unknown-linux-gnu (64-bit) [Travis CI]:
21-
- R version 3.5.3 (2017-01-27) [sic!]
22-
- R version 3.6.0 (2019-04-26)
23-
- R Under development (unstable) (2019-05-04 r76458)
21+
- R version 3.5.3 (2017-01-27)
22+
- R version 3.6.1 (2019-07-05)
23+
- R Under development (unstable) (2019-09-27 r77229)
2424

25+
* Platform x86_64-pc-linux-gnu (64-bit) [r-hub]:
26+
- R version 3.6.1 (2019-07-05)
27+
2528
* Platform x86_64-pc-linux-gnu (64-bit):
26-
- R version 3.2.0 (2015-04-16) w/ Torque/PBS scheduler
27-
- R version 3.3.0 (2016-05-03) w/ Torque/PBS scheduler
28-
- R version 3.4.0 (2017-04-21) w/ Torque/PBS scheduler
29-
- R version 3.5.0 (2018-04-23) w/ SGE scheduler
30-
- R version 3.6.0 (2019-04-26) w/ Torque/PBS scheduler
31-
- R version 3.6.0 (2019-04-26) w/ SGE scheduler
32-
- R version 3.6.0 (2019-04-26)
29+
- R version 3.2.0 (2015-04-16)
30+
- R version 3.6.1 (2019-07-05) w/ Torque/PBS scheduler
31+
- R version 3.6.1 Patched (2019-09-12 r77183)
3332

34-
* Platform x86_64-pc-linux-gnu (64-bit) [r-hub]:
33+
* Platform i386-pc-solaris2.10 (32-bit):
3534
- R version 3.6.0 (2019-04-26)
36-
- R Under development (unstable) (2019-05-02 r76453)
37-
38-
* Platform i686-pc-linux-gnu (32-bit):
39-
- R version 3.4.4 (2018-03-15)
4035

4136
* Platform i386-w64-mingw32 (32-bit) [Appveyor CI]:
42-
- R version 3.6.0 (2019-04-26)
37+
- R Under development (unstable) (2019-09-27 r77229)
4338

44-
* Platform x86_64-w64-mingw32/x64 (64-bit) [Appveyor CI]:
45-
- R version 3.6.0 (2019-04-26)
46-
- R Under development (unstable) (2019-05-03 r76456)
47-
4839
* Platform x86_64-w64-mingw32 (64-bit) [r-hub]:
49-
- R Under development (unstable) (2019-04-26 r76431)
50-
51-
* Platform x86_64-w64-mingw32/x64 (64-bit) [win-builder]:
52-
- R version 3.6.0 (2019-04-26)
53-
- R Under development (unstable) (2019-05-02 r76454)
40+
- R Under development (unstable) (2019-09-18 r77193)
5441

42+
* Platform x86_64-w64-mingw32/x64 (64-bit) [Appveyor CI]:
43+
- R version 3.6.1 (2019-07-05)
44+
- R Under development (unstable) (2019-09-27 r77229)
5545

56-
The following setups were skipped due to non-availability:
57-
58-
* Platform i386-pc-solaris2.10 (32-bit) [r-hub]:
59-
- R version 3.5.0 Patched (2018-04-30 r74674)
60-
REASON: Package required but not available: ‘batchtools’
46+
* Platform x86_64-w64-mingw32/x64 (64-bit) [win-builder]:
47+
- R version 3.6.1 (2019-07-05)
48+
- R Under development (unstable) (2019-09-30 r77236)

revdep/README.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,59 @@
11
# Platform
22

3-
|field |value |
4-
|:--------|:----------------------------|
5-
|version |R version 3.6.0 (2019-04-26) |
6-
|os |Ubuntu 18.04.2 LTS |
7-
|system |x86_64, linux-gnu |
8-
|ui |X11 |
9-
|language |en |
10-
|collate |en_US.UTF-8 |
11-
|ctype |en_US.UTF-8 |
12-
|tz |America/Los_Angeles |
13-
|date |2019-05-04 |
3+
|field |value |
4+
|:--------|:-------------------------------------------|
5+
|version |R version 3.6.1 Patched (2019-09-12 r77183) |
6+
|os |Ubuntu 18.04.3 LTS |
7+
|system |x86_64, linux-gnu |
8+
|ui |X11 |
9+
|language |en |
10+
|collate |en_US.UTF-8 |
11+
|ctype |en_US.UTF-8 |
12+
|tz |America/Los_Angeles |
13+
|date |2019-09-30 |
1414

1515
# Dependencies
1616

1717
|package |old |new |Δ |
1818
|:-----------------|:------|:----------|:--|
19-
|future.batchtools |0.7.2 |0.7.2-9000 |* |
19+
|future.batchtools |0.8.0 |0.8.0-9000 |* |
2020
|assertthat |0.2.1 |0.2.1 | |
2121
|backports |1.1.4 |1.1.4 | |
2222
|base64url |1.4 |1.4 | |
2323
|batchtools |0.9.11 |0.9.11 | |
2424
|brew |1.0-6 |1.0-6 | |
25-
|checkmate |1.9.3 |1.9.3 | |
25+
|checkmate |1.9.4 |1.9.4 | |
26+
|codetools |0.2-16 |0.2-16 | |
2627
|crayon |1.3.4 |1.3.4 | |
2728
|data.table |1.12.2 |1.12.2 | |
28-
|digest |0.6.18 |0.6.18 | |
29-
|fs |1.3.0 |1.3.0 | |
30-
|future |1.12.0 |1.12.0 | |
29+
|digest |0.6.21 |0.6.21 | |
30+
|ellipsis |0.3.0 |0.3.0 | |
31+
|fs |1.3.1 |1.3.1 | |
32+
|future |1.14.0 |1.14.0 | |
3133
|globals |0.12.4 |0.12.4 | |
32-
|hms |0.4.2 |0.4.2 | |
34+
|glue |1.3.1 |1.3.1 | |
35+
|hms |0.5.1 |0.5.1 | |
3336
|listenv |0.7.0 |0.7.0 | |
3437
|magrittr |1.5 |1.5 | |
35-
|pkgconfig |2.0.2 |2.0.2 | |
38+
|pkgconfig |2.0.3 |2.0.3 | |
3639
|prettyunits |1.0.2 |1.0.2 | |
37-
|progress |1.2.0 |1.2.0 | |
40+
|progress |1.2.2 |1.2.2 | |
3841
|R6 |2.4.0 |2.4.0 | |
3942
|rappdirs |0.3.1 |0.3.1 | |
40-
|Rcpp |1.0.1 |1.0.1 | |
41-
|rlang |0.3.4 |0.3.4 | |
43+
|Rcpp |1.0.2 |1.0.2 | |
44+
|rlang |0.4.0 |0.4.0 | |
4245
|stringi |1.4.3 |1.4.3 | |
46+
|vctrs |0.2.0 |0.2.0 | |
4347
|withr |2.1.2 |2.1.2 | |
48+
|zeallot |0.1.0 |0.1.0 | |
4449

4550
# Revdeps
4651

4752
## All (3)
4853

49-
|package |version |error |warning |note |
50-
|:------------------------------------|:-------|:-----|:-------|:----|
51-
|[batchtools](problems.md#batchtools) |0.9.11 | | |1 |
52-
|[drtmle](problems.md#drtmle) |1.0.4 | | |1 |
53-
|[FAMoS](problems.md#famos) |0.1.0 | | |1 |
54+
|package |version |error |warning |note |
55+
|:----------|:-------|:-----|:-------|:----|
56+
|batchtools |0.9.11 | | | |
57+
|drtmle |1.0.4 | | | |
58+
|FAMoS |0.2.0 | | | |
5459

0 commit comments

Comments
 (0)