Skip to content

Commit 5cc1024

Browse files
TEST: Testing more common use cases
1 parent 32048a7 commit 5cc1024

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed

DESCRIPTION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Suggests:
1616
pbmcapply,
1717
plyr,
1818
progress,
19+
foreach,
20+
purrr,
1921
future (>= 1.15.1),
2022
doFuture,
2123
future.apply,

OVERVIEW.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,11 @@ To debug progress updates, use:
302302
[progressr]: https://github.com/HenrikBengtsson/progressr/
303303
[beepr]: https://cran.r-project.org/package=beepr
304304
[progress]: https://cran.r-project.org/package=progress
305+
[purrr]: https://cran.r-project.org/package=purrr
305306
[future]: https://cran.r-project.org/package=future
307+
[foreach]: https://cran.r-project.org/package=foreach
306308
[future.apply]: https://cran.r-project.org/package=future.apply
309+
[doParallel]: https://cran.r-project.org/package=doParallel
307310
[doFuture]: https://cran.r-project.org/package=doFuture
308311
[foreach]: https://cran.r-project.org/package=foreach
309312
[furrr]: https://cran.r-project.org/package=furrr

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ build_script:
3434
- echo Current directory=%CD%
3535
- travis-tool.sh install_r digest
3636
- travis-tool.sh install_r beepr pbmcapply plyr progress
37+
- travis-tool.sh install_r foreach purrr
3738
- travis-tool.sh install_r future doFuture future.apply furrr
3839
- travis-tool.sh install_r shiny
3940
- travis-tool.sh install_github gaborcsardi/notifier@d92b1b6

tests/zzz,foreach_do.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
source("incl/start.R")
2+
3+
if (requireNamespace("foreach", quietly = TRUE)) {
4+
library("doFuture", character.only = TRUE)
5+
with_progress({
6+
p <- progressor(4)
7+
y <- foreach(n = 3:6) %do% {
8+
p()
9+
slow_sum(1:n, stdout=TRUE, message=TRUE)
10+
}
11+
})
12+
}
13+
14+
source("incl/end.R")

tests/zzz,purrr.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
source("incl/start.R")
2+
3+
if (requireNamespace("purrr", quietly = TRUE)) {
4+
future::plan("multiprocess")
5+
with_progress({
6+
p <- progressor(4)
7+
y <- purrr::map(3:6, function(n) {
8+
p()
9+
slow_sum(1:n, stdout=TRUE, message=TRUE)
10+
})
11+
})
12+
}
13+
14+
source("incl/end.R")

0 commit comments

Comments
 (0)