Skip to content

Commit bbec474

Browse files
REVDEP: Revdep 3 packages [ci skip]
1 parent 25785e4 commit bbec474

File tree

3 files changed

+113
-105
lines changed

3 files changed

+113
-105
lines changed

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

revdep/problems.md

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1 @@
1-
# batchtools
2-
3-
<details>
4-
5-
* Version: 0.9.11
6-
* Source code: https://github.com/cran/batchtools
7-
* URL: https://github.com/mllg/batchtools
8-
* BugReports: https://github.com/mllg/batchtools/issues
9-
* Date/Publication: 2018-08-16 11:40:03 UTC
10-
* Number of recursive dependencies: 63
11-
12-
Run `revdep_details(,"batchtools")` for more info
13-
14-
</details>
15-
16-
## In both
17-
18-
* checking whether package ‘batchtools’ can be installed ... NOTE
19-
```
20-
Found the following notes/warnings:
21-
Non-staged installation was used
22-
See ‘/home/hb/repositories/future.batchtools/revdep/checks/batchtools/new/batchtools.Rcheck/00install.out’ for details.
23-
```
24-
25-
# drtmle
26-
27-
<details>
28-
29-
* Version: 1.0.4
30-
* Source code: https://github.com/cran/drtmle
31-
* URL: https://github.com/benkeser/drtmle
32-
* BugReports: https://github.com/benkeser/drtmle/issues
33-
* Date/Publication: 2018-12-18 22:30:03 UTC
34-
* Number of recursive dependencies: 74
35-
36-
Run `revdep_details(,"drtmle")` for more info
37-
38-
</details>
39-
40-
## In both
41-
42-
* checking whether package ‘drtmle’ can be installed ... NOTE
43-
```
44-
Found the following notes/warnings:
45-
Non-staged installation was used
46-
See ‘/home/hb/repositories/future.batchtools/revdep/checks/drtmle/new/drtmle.Rcheck/00install.out’ for details.
47-
```
48-
49-
# FAMoS
50-
51-
<details>
52-
53-
* Version: 0.1.0
54-
* Source code: https://github.com/cran/FAMoS
55-
* Date/Publication: 2018-12-03 19:50:16 UTC
56-
* Number of recursive dependencies: 43
57-
58-
Run `revdep_details(,"FAMoS")` for more info
59-
60-
</details>
61-
62-
## In both
63-
64-
* checking whether package ‘FAMoS’ can be installed ... NOTE
65-
```
66-
Found the following notes/warnings:
67-
Non-staged installation was used
68-
See ‘/home/hb/repositories/future.batchtools/revdep/checks/FAMoS/new/FAMoS.Rcheck/00install.out’ for details.
69-
```
70-
1+
*Wow, no problems at all. :)*

revdep/run.R

Lines changed: 81 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ check <- function() {
2828
cat(sprintf("R CMD check will use env vars from %s\n", sQuote(p)))
2929
cat(sprintf("To disable, set 'R_CHECK_ENVIRON=false' (a fake pathname)\n"))
3030
}
31-
32-
envs <- grep("^_R_CHECK_", names(Sys.getenv()), value = TRUE)
31+
32+
envs <- Sys.getenv()
33+
envs <- envs[grep("^_?R_CHECK_", names(envs))]
3334
if (length(envs) > 0L) {
34-
cat(sprintf("Detected _R_CHECK_* env vars that will affect R CMD check: %s\n",
35-
paste(sQuote(envs), collapse = ", ")))
35+
envs <- sprintf(" %02d. %s=%s", seq_along(envs), names(envs), envs)
36+
envs <- paste(envs, collapse="\n")
37+
cat(sprintf("Detected R-specific env vars that may affect R CMD check:\n%s\n", envs))
3638
}
3739

3840
precheck()
3941
revdep_check(bioc = TRUE, num_workers = available_cores(),
40-
timeout = as.difftime(20, units = "mins"), quiet = FALSE)
42+
timeout = as.difftime(30, units = "mins"), quiet = FALSE)
4143
}
4244

4345

@@ -72,10 +74,18 @@ revdep_todo_reset <- function() {
7274
DBI::dbWriteTable(db, "todo", df, overwrite = TRUE, append = FALSE)
7375
}
7476

77+
revdep_this_package <- local({
78+
pkg <- NULL
79+
function() {
80+
if (is.null(pkg)) pkg <<- desc::desc(file = "DESCRIPTION")$get("Package")
81+
pkg
82+
}
83+
})
84+
7585
revdep_children <- local({
7686
cache <- list()
7787
function(pkg = NULL) {
78-
if (is.null(pkg)) pkg <- desc::desc(file = "DESCRIPTION")$get("Package")
88+
if (is.null(pkg)) pkg <- revdep_this_package()
7989
pkgs <- cache[[pkg]]
8090
if (is.null(pkgs)) {
8191
pkgs <- revdepcheck:::cran_revdeps(pkg)
@@ -86,6 +96,37 @@ revdep_children <- local({
8696
}
8797
})
8898

99+
revdep_pkgs_with_status <- function(status = "error") {
100+
status <- match.arg(status)
101+
res <- revdepcheck::revdep_summary()
102+
field <- switch(status, error = "errors")
103+
has_status <- vapply(res, FUN = function(x) {
104+
z <- x[["new"]][[field]]
105+
is.character(z) && any(nchar(z) > 0)
106+
}, FUN.VALUE = NA, USE.NAMES = TRUE)
107+
has_status <- !is.na(has_status) & has_status
108+
names(has_status)[has_status]
109+
}
110+
111+
revdep_preinstall <- function(pkgs) {
112+
pkgs <- unique(pkgs)
113+
lib_paths_org <- lib_paths <- .libPaths()
114+
on.exit(.libPaths(lib_paths_org))
115+
lib_paths[1] <- sprintf("%s-revdepcheck", lib_paths[1])
116+
dir.create(lib_paths[1], recursive = TRUE, showWarnings = FALSE)
117+
.libPaths(lib_paths)
118+
message(sprintf("Triggering crancache builds by pre-installing %d packages: %s", length(pkgs), paste(sQuote(pkgs), collapse = ", ")))
119+
message(".libPaths():")
120+
message(paste(paste0(" - ", .libPaths()), collapse = "\n"))
121+
## Install one-by-one to update cache sooner
122+
for (kk in seq_along(pkgs)) {
123+
pkg <- pkgs[kk]
124+
message(sprintf("Pre-installing package %d of %d: %s",
125+
kk, length(pkgs), pkg))
126+
crancache::install_packages(pkg)
127+
}
128+
}
129+
89130
args <- base::commandArgs()
90131
if ("--reset" %in% args) {
91132
revdep_reset()
@@ -125,10 +166,41 @@ if ("--reset" %in% args) {
125166
pkgs <- unique(pkgs)
126167
revdep_add(packages = pkgs)
127168
todo()
128-
} else if ("--install" %in% args) {
129-
pos <- which("--install" == args)
169+
} else if ("--show-check" %in% args) {
170+
pos <- which("--show-check" == args)
171+
pkgs <- parse_pkgs(args[seq(from = pos + 1L, to = length(args))])
172+
for (pkg in pkgs) {
173+
for (dir in c("old", "new")) {
174+
path <- file.path("revdep", "checks", pkg, dir, sprintf("%s.Rcheck", pkg))
175+
if (!utils::file_test("-d", path)) next
176+
pathname <- file.path(path, "00check.log")
177+
cat("-----------------------------------------------\n")
178+
cat(sprintf("%s (%s):\n", pkg, dir))
179+
cat("-----------------------------------------------\n")
180+
bfr <- readLines(pathname, warn = FALSE)
181+
tail <- tail(bfr, n = 20L)
182+
writeLines(tail)
183+
}
184+
}
185+
} else if ("--list-children" %in% args) {
186+
pkg <- revdep_this_package()
187+
pkgs <- revdepcheck:::cran_revdeps(pkg)
188+
cat(sprintf("[n=%d] %s\n", length(pkgs), paste(pkgs, collapse = " ")))
189+
} else if ("--list-error" %in% args) {
190+
cat(paste(revdep_pkgs_with_status("error"), collapse = " "), "\n", sep="")
191+
} else if ("--add-error" %in% args) {
192+
revdepcheck::revdep_add(packages = revdep_pkgs_with_status("error"))
193+
} else if ("--preinstall-children" %in% args) {
194+
pkg <- revdep_this_package()
195+
pkgs <- revdepcheck:::cran_revdeps(pkg)
196+
revdep_preinstall(pkgs)
197+
} else if ("--preinstall-error" %in% args) {
198+
res <- revdepcheck::revdep_summary()
199+
revdep_preinstall(revdep_pkgs_with_status("error"))
200+
} else if ("--preinstall" %in% args) {
201+
pos <- which("--preinstall" == args)
130202
pkgs <- parse_pkgs(args[seq(from = pos + 1L, to = length(args))])
131-
crancache::install_packages(pkgs)
203+
revdep_preinstall(pkgs)
132204
} else {
133205
check()
134206
revdep_report(all = TRUE)

0 commit comments

Comments
 (0)