From 4b70a18fd60a9f5e5831ed7b7f4c195c5adddd3d Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Fri, 24 Mar 2023 10:28:53 -0700 Subject: [PATCH 01/11] BUG FIX: Using `.options.future = list(conditions = NULL)` would be ignored as if it would never had been specified. --- NEWS.md | 8 ++++++++ R/doFuture.R | 7 +++++-- R/dofuture_OP.R | 9 +++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 7a8fdb6..b891aaa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,13 @@ # Version (development version) +## Bug Fixes + + * Using `.options.future = list(conditions = NULL)` would be ignored + as if it would never had been specified. + + +# Version 1.0.0 (2023-03-23) + ## New Features * Add `%dofuture%` operator, which can be used like `%dopar%`, but diff --git a/R/doFuture.R b/R/doFuture.R index c597a08..e906d88 100644 --- a/R/doFuture.R +++ b/R/doFuture.R @@ -187,8 +187,11 @@ function(obj, expr, envir, data) { #nolint stdout <- options[["stdout"]] if (is.null(stdout)) stdout <- eval(formals(Future)$stdout) - conditions <- options[["conditions"]] - if (is.null(conditions)) conditions <- eval(formals(Future)$conditions) + if ("conditions" %in% names(options)) { + conditions <- options[["conditions"]] + } else { + conditions <- eval(formals(future)$conditions) + } ## Drop captured standard output and conditions as soon as they have ## been relayed? diff --git a/R/dofuture_OP.R b/R/dofuture_OP.R index 5ada968..6fd1b2c 100644 --- a/R/dofuture_OP.R +++ b/R/dofuture_OP.R @@ -203,7 +203,7 @@ doFuture2 <- function(obj, expr, envir, data) { #nolint ## Support %globals%, %packages%, %seed%, ... opts <- getOption("future.disposable", NULL) for (name in names(opts)) { - options[[name]] <- opts[[name]] + options[name] <- opts[name] } options(future.disposable = NULL) @@ -254,9 +254,10 @@ doFuture2 <- function(obj, expr, envir, data) { #nolint if (is.null(stdout)) { stdout <- eval(formals(future)$stdout) } - - conditions <- options[["conditions"]] - if (is.null(conditions)) { + + if ("conditions" %in% names(options)) { + conditions <- options[["conditions"]] + } else { conditions <- eval(formals(future)$conditions) } From a6e6a5e68ad8cc9061d7723e1c20e2bdd08adc33 Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Fri, 24 Mar 2023 11:28:50 -0700 Subject: [PATCH 02/11] REVDEP: 28 revdep packages [ci skip] --- revdep/README.md | 4 ++-- revdep/problems.md | 32 -------------------------------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/revdep/README.md b/revdep/README.md index 86b992e..51100ee 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -10,7 +10,7 @@ |collate |en_US.UTF-8 | |ctype |en_US.UTF-8 | |tz |America/Los_Angeles | -|date |2023-03-23 | +|date |2023-03-24 | |pandoc |3.0.1 @ /software/c4/cbi/software/pandoc-3.0.1/bin/pandoc | # Dependencies @@ -48,7 +48,7 @@ |LWFBrook90R |0.5.2 | | | | |mikropml |1.5.0 | | | | |[momentuHMM](problems.md#momentuhmm)|1.5.5 | | |1 | -|[mslp](problems.md#mslp)|1.0.1 |1 | | | +|mslp |1.0.2 | | | | |multilevelcoda |1.0.0 | | | | |[oncomsm](problems.md#oncomsm)|0.1.3 | | |3 | |progressr |0.13.0 | | | | diff --git a/revdep/problems.md b/revdep/problems.md index a954b97..2ff63f5 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -189,38 +189,6 @@ Run `revdep_details(, "momentuHMM")` for more info libs 6.6Mb ``` -# mslp - -
- -* Version: 1.0.1 -* GitHub: NA -* Source code: https://github.com/cran/mslp -* Date/Publication: 2022-11-20 -* Number of recursive dependencies: 88 - -Run `revdep_details(, "mslp")` for more info - -
- -## In both - -* checking re-building of vignette outputs ... ERROR - ``` - Error(s) in re-building vignettes: - ... - --- re-building ‘mslp.Rmd’ using rmarkdown - Error: processing vignette 'mslp.Rmd' failed with diagnostics: - there is no package called ‘BiocStyle’ - --- failed re-building ‘mslp.Rmd’ - - SUMMARY: processing the following file failed: - ‘mslp.Rmd’ - - Error: Vignette re-building failed. - Execution halted - ``` - # oncomsm
From eff11011b404d8f8bb5059895e8a6721fafef244 Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Fri, 24 Mar 2023 20:08:55 -0700 Subject: [PATCH 03/11] Bump development version [ci skip] --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index db5b53a..b512c39 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: doFuture -Version: 1.0.0 +Version: 1.0.0-9001 Title: Use Foreach to Parallelize via the Future Framework Depends: foreach (>= 1.5.0), diff --git a/NEWS.md b/NEWS.md index eb819dc..b891aaa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# Version 1.0.0 [2023-03-23] +# Version (development version) ## Bug Fixes From 9bc4f579391bc052b4495260a0bba869ee862778 Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Fri, 19 May 2023 21:13:13 -0700 Subject: [PATCH 04/11] REVDEP: 31 packages w/ R 4.3.0 and Bioc 3.17 [ci skip] --- revdep/README.md | 65 +++++------ revdep/cran.md | 2 +- revdep/problems.md | 264 +++++++++++++++++++++++---------------------- 3 files changed, 171 insertions(+), 160 deletions(-) diff --git a/revdep/README.md b/revdep/README.md index 51100ee..a04e3fc 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -2,7 +2,7 @@ |field |value | |:--------|:---------------------------------------------------------| -|version |R version 4.2.2 (2022-10-31) | +|version |R version 4.3.0 (2023-04-21) | |os |CentOS Linux 7 (Core) | |system |x86_64, linux-gnu | |ui |X11 | @@ -10,56 +10,59 @@ |collate |en_US.UTF-8 | |ctype |en_US.UTF-8 | |tz |America/Los_Angeles | -|date |2023-03-24 | -|pandoc |3.0.1 @ /software/c4/cbi/software/pandoc-3.0.1/bin/pandoc | +|date |2023-05-19 | +|pandoc |3.1.2 @ /software/c4/cbi/software/pandoc-3.1.2/bin/pandoc | # Dependencies -|package |old |new |Δ | -|:------------|:------|:-----------|:--| -|doFuture |0.12.2 |0.12.2-9017 |* | -|codetools |0.2-19 |0.2-19 | | -|digest |0.6.31 |0.6.31 | | -|foreach |1.5.2 |1.5.2 | | -|future |1.32.0 |1.32.0 | | -|future.apply |NA |1.10.0 |* | -|globals |0.16.2 |0.16.2 | | -|iterators |1.0.14 |1.0.14 | | -|listenv |0.9.0 |0.9.0 | | -|parallelly |1.35.0 |1.35.0 | | +|package |old |new |Δ | +|:------------|:------|:----------|:--| +|doFuture |1.0.0 |1.0.0-9001 |* | +|codetools |0.2-19 |0.2-19 | | +|digest |0.6.31 |0.6.31 | | +|foreach |1.5.2 |1.5.2 | | +|future |1.32.0 |1.32.0 | | +|future.apply |1.10.0 |1.10.0 | | +|globals |0.16.2 |0.16.2 | | +|iterators |1.0.14 |1.0.14 | | +|listenv |0.9.0 |0.9.0 | | +|parallelly |1.35.0 |1.35.0 | | # Revdeps -## All (28) +## All (31) |package |version |error |warning |note | |:-----------------|:-------|:-----|:-------|:----| -|antaresEditObject |0.5.0 | | | | +|antaresEditObject |0.5.1 | | | | |bhmbasket |0.9.5 | | | | -|[envi](problems.md#envi)|0.1.17 | |1 | | -|funGp |0.3.1 | | | | +|[envi](problems.md#envi)|0.1.17 | |1 |1 | +|funGp |0.3.2 | | | | |fxTWAPLS |0.1.2 | | | | -|[hwep](problems.md#hwep)|2.0.1 | | |2 | -|[ISAnalytics](problems.md#isanalytics)|1.8.1 |3 | |2 | +|[hwep](problems.md#hwep)|2.0.2 | | |2 | +|[ISAnalytics](problems.md#isanalytics)|1.10.1 | | |1 | |kergp |0.5.5 | | | | -|kernelshap |0.3.4 | | | | +|kernelshap |0.3.7 | | | | |latentcor |2.0.1 | | | | -|ldsr |0.0.2 | | | | +|[ldsr](problems.md#ldsr)|0.0.2 | | |1 | |LWFBrook90R |0.5.2 | | | | -|mikropml |1.5.0 | | | | +|mikropml |1.6.0 | | | | |[momentuHMM](problems.md#momentuhmm)|1.5.5 | | |1 | -|mslp |1.0.2 | | | | +|mslp |1.2.0 | | | | |multilevelcoda |1.0.0 | | | | -|[oncomsm](problems.md#oncomsm)|0.1.3 | | |3 | +|[oncomsm](problems.md#oncomsm)|0.1.4 | | |2 | |progressr |0.13.0 | | | | -|[projpred](problems.md#projpred)|2.4.0 | | |1 | +|[projpred](problems.md#projpred)|2.5.0 | | |1 | |remiod |1.0.2 | | | | |robust2sls |0.2.2 | | | | +|[rpm](problems.md#rpm)|0.7-1 | | |1 | +|semPower |2.0.1 | | | | |[sparrpowR](problems.md#sparrpowr)|0.2.7 | |1 | | -|[sphunif](problems.md#sphunif)|1.0.1 | | |2 | -|[sRACIPE](problems.md#sracipe)|1.14.0 | | |1 | -|[ssdtools](problems.md#ssdtools)|1.0.2 | | |1 | +|[sphunif](problems.md#sphunif)|1.0.1 | | |3 | +|[sRACIPE](problems.md#sracipe)|1.16.0 | | |2 | +|[ssdtools](problems.md#ssdtools)|1.0.4 | | |1 | |tglkmeans |0.3.8 | | | | -|[updog](problems.md#updog)|2.1.3 | | |1 | +|[updog](problems.md#updog)|2.1.3 | | |2 | |[vmeasur](problems.md#vmeasur)|0.1.4 | |1 | | +|[WeightedCluster](problems.md#weightedcluster)|1.6-2 | |1 | | diff --git a/revdep/cran.md b/revdep/cran.md index 2f87173..7e50c2e 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -1,6 +1,6 @@ ## revdepcheck results -We checked 28 reverse dependencies (25 from CRAN + 3 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. +We checked 31 reverse dependencies (28 from CRAN + 3 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. * We saw 0 new problems * We failed to check 0 packages diff --git a/revdep/problems.md b/revdep/problems.md index 2ff63f5..04281bf 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -6,7 +6,7 @@ * GitHub: https://github.com/lance-waller-lab/envi * Source code: https://github.com/cran/envi * Date/Publication: 2023-02-02 00:40:02 UTC -* Number of recursive dependencies: 153 +* Number of recursive dependencies: 121 Run `revdep_details(, "envi")` for more info @@ -21,15 +21,20 @@ Run `revdep_details(, "envi")` for more info See ‘/c4/home/henrik/repositories/doFuture/revdep/checks/envi/new/envi.Rcheck/00install.out’ for details. ``` +* checking package dependencies ... NOTE + ``` + Package suggested but not available for checking: ‘RStoolbox’ + ``` + # hwep
-* Version: 2.0.1 +* Version: 2.0.2 * GitHub: https://github.com/dcgerard/hwep * Source code: https://github.com/cran/hwep -* Date/Publication: 2023-03-15 16:40:05 UTC -* Number of recursive dependencies: 110 +* Date/Publication: 2023-05-16 17:40:02 UTC +* Number of recursive dependencies: 112 Run `revdep_details(, "hwep")` for more info @@ -39,9 +44,9 @@ Run `revdep_details(, "hwep")` for more info * checking installed package size ... NOTE ``` - installed size is 69.0Mb + installed size is 70.9Mb sub-directories of 1Mb or more: - libs 68.5Mb + libs 70.4Mb ``` * checking for GNU extensions in Makefiles ... NOTE @@ -53,11 +58,11 @@ Run `revdep_details(, "hwep")` for more info
-* Version: 1.8.1 +* Version: 1.10.1 * GitHub: https://github.com/calabrialab/ISAnalytics * Source code: https://github.com/cran/ISAnalytics -* Date/Publication: 2022-12-01 -* Number of recursive dependencies: 171 +* Date/Publication: 2023-05-09 +* Number of recursive dependencies: 172 Run `revdep_details(, "ISAnalytics")` for more info @@ -65,103 +70,33 @@ Run `revdep_details(, "ISAnalytics")` for more info ## In both -* checking examples ... ERROR - ``` - Running examples in ‘ISAnalytics-Ex.R’ failed - The error most likely occurred in: - - > ### Name: import_Vispa2_stats - > ### Title: Import Vispa2 stats given the aligned association file. - > ### Aliases: import_Vispa2_stats - > - > ### ** Examples - > - > fs_path <- generate_default_folder_structure(type = "correct") - ... - 2. │ ├─ISAnalytics:::.manage_association_file(...) - 3. │ │ └─ISAnalytics:::.check_file_system_alignment(...) - 4. │ │ └─proj_fold_col %in% colnames(df) - 5. │ └─dplyr::if_else(...) - 6. │ └─dplyr:::vec_case_when(...) - 7. │ └─vctrs::list_check_all_vectors(values, arg = values_arg, call = call) - 8. └─vctrs:::stop_scalar_type(``(NULL), "false", ``) - 9. └─vctrs:::stop_vctrs(...) - 10. └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call) - Execution halted - ``` - -* checking tests ... - ``` - Running ‘testthat.R’ - ERROR - Running the tests in ‘tests/testthat.R’ failed. - Complete output: - > library(testthat) - > library(ISAnalytics) - Loading required package: magrittr - - Attaching package: 'magrittr' - - ... - 13. │ ├─ISAnalytics:::.manage_association_file(...) - 14. │ │ └─ISAnalytics:::.check_file_system_alignment(...) - 15. │ │ └─proj_fold_col %in% colnames(df) - 16. │ └─dplyr::if_else(...) - 17. │ └─dplyr:::vec_case_when(...) - 18. │ └─vctrs::list_check_all_vectors(values, arg = values_arg, call = call) - 19. └─vctrs:::stop_scalar_type(``(NULL), "false", ``) - 20. └─vctrs:::stop_vctrs(...) - 21. └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call) - Execution halted - ``` - -* checking re-building of vignette outputs ... ERROR - ``` - Error(s) in re-building vignettes: - ... - --- re-building ‘ISAnalytics.Rmd’ using rmarkdown - --- finished re-building ‘ISAnalytics.Rmd’ - - --- re-building ‘sharing_analyses.Rmd’ using rmarkdown - --- finished re-building ‘sharing_analyses.Rmd’ - - --- re-building ‘workflow_start.Rmd’ using rmarkdown - Quitting from lines 466-470 (workflow_start.Rmd) - Error: processing vignette 'workflow_start.Rmd' failed with diagnostics: - `false` must be a vector, not `NULL`. - --- failed re-building ‘workflow_start.Rmd’ - - SUMMARY: processing the following file failed: - ‘workflow_start.Rmd’ - - Error: Vignette re-building failed. - Execution halted - ``` - * checking installed package size ... NOTE ``` - installed size is 7.9Mb + installed size is 7.1Mb sub-directories of 1Mb or more: data 1.4Mb - doc 4.4Mb + doc 3.4Mb ``` -* checking R code for possible problems ... NOTE +# ldsr + +
+ +* Version: 0.0.2 +* GitHub: https://github.com/ntthung/ldsr +* Source code: https://github.com/cran/ldsr +* Date/Publication: 2020-05-04 14:40:09 UTC +* Number of recursive dependencies: 79 + +Run `revdep_details(, "ldsr")` for more info + +
+ +## In both + +* checking C++ specification ... NOTE ``` - .sh_row_permut: no visible global function definition for ‘.’ - .sharing_multdf_mult_key: no visible binding for global variable ‘.’ - .sharing_multdf_single_key: no visible binding for global variable ‘.’ - .sharing_singledf_mult_key: no visible binding for global variable ‘.’ - .sharing_singledf_single_key: no visible binding for global variable - ‘.’ - cumulative_is: no visible binding for global variable ‘is’ - gene_frequency_fisher: no visible binding for global variable ‘.’ - Undefined global functions or variables: - . is - Consider adding - importFrom("methods", "is") - to your NAMESPACE file (and ensure that your DESCRIPTION Imports field - contains 'methods'). + Specified C++11: please drop specification unless essential ``` # momentuHMM @@ -172,7 +107,7 @@ Run `revdep_details(, "ISAnalytics")` for more info * GitHub: https://github.com/bmcclintock/momentuHMM * Source code: https://github.com/cran/momentuHMM * Date/Publication: 2022-10-18 20:52:35 UTC -* Number of recursive dependencies: 142 +* Number of recursive dependencies: 145 Run `revdep_details(, "momentuHMM")` for more info @@ -182,22 +117,22 @@ Run `revdep_details(, "momentuHMM")` for more info * checking installed package size ... NOTE ``` - installed size is 10.1Mb + installed size is 10.2Mb sub-directories of 1Mb or more: R 1.2Mb doc 1.7Mb - libs 6.6Mb + libs 6.7Mb ``` # oncomsm
-* Version: 0.1.3 +* Version: 0.1.4 * GitHub: https://github.com/Boehringer-Ingelheim/oncomsm * Source code: https://github.com/cran/oncomsm -* Date/Publication: 2023-03-11 10:20:02 UTC -* Number of recursive dependencies: 123 +* Date/Publication: 2023-04-17 07:00:02 UTC +* Number of recursive dependencies: 124 Run `revdep_details(, "oncomsm")` for more info @@ -207,16 +142,10 @@ Run `revdep_details(, "oncomsm")` for more info * checking installed package size ... NOTE ``` - installed size is 55.7Mb + installed size is 56.6Mb sub-directories of 1Mb or more: doc 1.0Mb - libs 53.6Mb - ``` - -* checking dependencies in R code ... NOTE - ``` - Namespace in Imports field not imported from: ‘rstantools’ - All declared Imports should be used. + libs 54.5Mb ``` * checking for GNU extensions in Makefiles ... NOTE @@ -228,11 +157,11 @@ Run `revdep_details(, "oncomsm")` for more info
-* Version: 2.4.0 +* Version: 2.5.0 * GitHub: https://github.com/stan-dev/projpred * Source code: https://github.com/cran/projpred -* Date/Publication: 2023-02-12 13:30:02 UTC -* Number of recursive dependencies: 149 +* Date/Publication: 2023-04-05 18:50:02 UTC +* Number of recursive dependencies: 151 Run `revdep_details(, "projpred")` for more info @@ -245,6 +174,29 @@ Run `revdep_details(, "projpred")` for more info Package suggested but not available for checking: ‘cmdstanr’ ``` +# rpm + +
+ +* Version: 0.7-1 +* GitHub: https://github.com/handcock/rpm +* Source code: https://github.com/cran/rpm +* Date/Publication: 2023-04-21 23:30:02 UTC +* Number of recursive dependencies: 66 + +Run `revdep_details(, "rpm")` for more info + +
+ +## In both + +* checking installed package size ... NOTE + ``` + installed size is 11.6Mb + sub-directories of 1Mb or more: + libs 11.1Mb + ``` + # sparrpowR
@@ -253,7 +205,7 @@ Run `revdep_details(, "projpred")` for more info * GitHub: https://github.com/machiela-lab/sparrpowR * Source code: https://github.com/cran/sparrpowR * Date/Publication: 2023-02-02 01:00:02 UTC -* Number of recursive dependencies: 133 +* Number of recursive dependencies: 134 Run `revdep_details(, "sparrpowR")` for more info @@ -276,7 +228,7 @@ Run `revdep_details(, "sparrpowR")` for more info * GitHub: https://github.com/egarpor/sphunif * Source code: https://github.com/cran/sphunif * Date/Publication: 2021-09-02 07:40:02 UTC -* Number of recursive dependencies: 74 +* Number of recursive dependencies: 76 Run `revdep_details(, "sphunif")` for more info @@ -284,6 +236,11 @@ Run `revdep_details(, "sphunif")` for more info ## In both +* checking C++ specification ... NOTE + ``` + Specified C++11: please drop specification unless essential + ``` + * checking installed package size ... NOTE ``` installed size is 24.1Mb @@ -300,11 +257,11 @@ Run `revdep_details(, "sphunif")` for more info
-* Version: 1.14.0 +* Version: 1.16.0 * GitHub: https://github.com/vivekkohar/sRACIPE * Source code: https://github.com/cran/sRACIPE -* Date/Publication: 2022-11-01 -* Number of recursive dependencies: 99 +* Date/Publication: 2023-04-25 +* Number of recursive dependencies: 103 Run `revdep_details(, "sRACIPE")` for more info @@ -312,6 +269,11 @@ Run `revdep_details(, "sRACIPE")` for more info ## In both +* checking C++ specification ... NOTE + ``` + Specified C++11: please drop specification unless essential + ``` + * checking R code for possible problems ... NOTE ``` sracipeSimulate: no visible global function definition for @@ -334,11 +296,11 @@ Run `revdep_details(, "sRACIPE")` for more info
-* Version: 1.0.2 +* Version: 1.0.4 * GitHub: https://github.com/bcgov/ssdtools * Source code: https://github.com/cran/ssdtools -* Date/Publication: 2022-05-14 23:50:02 UTC -* Number of recursive dependencies: 147 +* Date/Publication: 2023-05-17 04:40:02 UTC +* Number of recursive dependencies: 119 Run `revdep_details(, "ssdtools")` for more info @@ -348,10 +310,10 @@ Run `revdep_details(, "ssdtools")` for more info * checking installed package size ... NOTE ``` - installed size is 23.0Mb + installed size is 22.9Mb sub-directories of 1Mb or more: doc 1.2Mb - libs 20.6Mb + libs 20.5Mb ``` # updog @@ -362,7 +324,7 @@ Run `revdep_details(, "ssdtools")` for more info * GitHub: https://github.com/dcgerard/updog * Source code: https://github.com/cran/updog * Date/Publication: 2022-10-18 08:00:02 UTC -* Number of recursive dependencies: 146 +* Number of recursive dependencies: 149 Run `revdep_details(, "updog")` for more info @@ -370,6 +332,11 @@ Run `revdep_details(, "updog")` for more info ## In both +* checking C++ specification ... NOTE + ``` + Specified C++11: please drop specification unless essential + ``` + * checking installed package size ... NOTE ``` installed size is 7.8Mb @@ -385,7 +352,7 @@ Run `revdep_details(, "updog")` for more info * GitHub: NA * Source code: https://github.com/cran/vmeasur * Date/Publication: 2021-11-11 19:00:02 UTC -* Number of recursive dependencies: 117 +* Number of recursive dependencies: 118 Run `revdep_details(, "vmeasur")` for more info @@ -400,3 +367,44 @@ Run `revdep_details(, "vmeasur")` for more info See ‘/c4/home/henrik/repositories/doFuture/revdep/checks/vmeasur/new/vmeasur.Rcheck/00install.out’ for details. ``` +# WeightedCluster + +
+ +* Version: 1.6-2 +* GitHub: NA +* Source code: https://github.com/cran/WeightedCluster +* Date/Publication: 2023-05-17 05:40:02 UTC +* Number of recursive dependencies: 42 + +Run `revdep_details(, "WeightedCluster")` for more info + +
+ +## In both + +* checking re-building of vignette outputs ... WARNING + ``` + Error(s) in re-building vignettes: + --- re-building ‘WeightedCluster.Rnw’ using knitr + --- finished re-building ‘WeightedCluster.Rnw’ + + --- re-building ‘WeightedClusterFR.Rnw’ using knitr + --- finished re-building ‘WeightedClusterFR.Rnw’ + + --- re-building ‘WeightedClusterPreview.Rnw’ using knitr + Error: processing vignette 'WeightedClusterPreview.Rnw' failed with diagnostics: + Running 'texi2dvi' on 'WeightedClusterPreview.tex' failed. + ... + l.85 \usepackage + {tikz}^^M + ! ==> Fatal error occurred, no output PDF file produced! + --- failed re-building ‘WeightedClusterPreview.Rnw’ + + SUMMARY: processing the following file failed: + ‘WeightedClusterPreview.Rnw’ + + Error: Vignette re-building failed. + Execution halted + ``` + From ffacf98e7ff32432ae6bd1ab325004052cf4991c Mon Sep 17 00:00:00 2001 From: BHGC Website GHA Workflow Runner Date: Mon, 11 Dec 2023 17:54:02 -0800 Subject: [PATCH 05/11] pkgdown: refresh --- pkgdown/_pkgdown.yml | 12 ++++++++---- pkgdown/_pkgdown.yml.rsp | 8 ++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 3660bb6..d57920a 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -6,7 +6,7 @@ home: href: https://github.com/HenrikBengtsson/doFuture/milestones - text: The Futureverse Project href: https://www.futureverse.org/ - - text: Futureverse User Forum (new!) + - text: Futureverse User Forum href: https://github.com/HenrikBengtsson/future/discussions navbar: @@ -14,13 +14,11 @@ navbar: right: [futureverse, pkgs, cran, github] components: futureverse: - icon: fas fa-fast-backward + icon: fas fa-home href: https://www.futureverse.org/ pkgs: text: Packages menu: - - text: BiocParallel.FutureParam - href: https://BiocParallel.FutureParam.futureverse.org - text: doFuture href: https://doFuture.futureverse.org - text: furrr @@ -43,6 +41,12 @@ navbar: href: https://parallelly.futureverse.org - text: progressr href: https://progressr.futureverse.org + - text: BiocParallel.FutureParam (experimental) + href: https://BiocParallel.FutureParam.futureverse.org + - text: future.tools (experimental) + href: https://future.tools.futureverse.org + - text: future.mirai (experimental) + href: https://future.mirai.futureverse.org - text: future.mapreduce (experimental) href: https://future.mapreduce.futureverse.org - text: marshal (experimental) diff --git a/pkgdown/_pkgdown.yml.rsp b/pkgdown/_pkgdown.yml.rsp index eaf9d08..6d931ca 100644 --- a/pkgdown/_pkgdown.yml.rsp +++ b/pkgdown/_pkgdown.yml.rsp @@ -1,6 +1,6 @@ <% -pkgs <- c("globals", "listenv", "parallelly", "future", "future.apply", "furrr", "future.tests", "future.callr", "future.batchtools", "doFuture", "progressr", "BiocParallel.FutureParam") -pkgs_extra <- c("future.mapreduce", "marshal") +pkgs <- c("globals", "listenv", "parallelly", "future", "future.apply", "furrr", "future.tests", "future.callr", "future.batchtools", "doFuture", "progressr") +pkgs_extra <- c("BiocParallel.FutureParam", "future.tools", "future.mirai", "future.mapreduce", "marshal") pkgs <- c(sort(pkgs), pkgs_extra) urls <- sprintf("https://%s.futureverse.org", pkgs) names(urls) <- pkgs @@ -19,7 +19,7 @@ home: href: https://github.com/HenrikBengtsson/<%= pkg %>/milestones - text: The Futureverse Project href: https://www.futureverse.org/ - - text: Futureverse User Forum (new!) + - text: Futureverse User Forum href: https://github.com/HenrikBengtsson/future/discussions navbar: @@ -27,7 +27,7 @@ navbar: right: [futureverse, pkgs, cran, github] components: futureverse: - icon: fas fa-fast-backward + icon: fas fa-home href: https://www.futureverse.org/ pkgs: text: Packages From 4d5ea93a1bb40712a2e6cbb5958b15c71a5e661a Mon Sep 17 00:00:00 2001 From: BHGC Website GHA Workflow Runner Date: Mon, 11 Dec 2023 17:54:25 -0800 Subject: [PATCH 06/11] DOCS: Recommend %dofuture% over %dopar% (fix #78) --- DESCRIPTION | 2 +- R/doFuture-package.R | 54 ++++++++++---------- README.md | 64 ++++++++++++----------- man/doFuture.Rd | 50 +++++++++--------- vignettes/doFuture-1-overview.md.rsp | 76 ++++++++++++++-------------- 5 files changed, 124 insertions(+), 122 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b512c39..16652e8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: doFuture -Version: 1.0.0-9001 +Version: 1.0.0-9002 Title: Use Foreach to Parallelize via the Future Framework Depends: foreach (>= 1.5.0), diff --git a/R/doFuture-package.R b/R/doFuture-package.R index da9c4bf..f9724c2 100644 --- a/R/doFuture-package.R +++ b/R/doFuture-package.R @@ -7,10 +7,35 @@ #' @section Usage: #' There are two alternative ways to use this package: #' -#' 1. `y <- foreach(...) %dopar% { ... }` with `registerDoFuture()` -#' 2. `y <- foreach(...) %dofuture% { ... }` +#' 1. `y <- foreach(...) %dofuture% { ... }` +#' 2. `y <- foreach(...) %dopar% { ... }` with `registerDoFuture()` #' -#' The _first alternative_ is based on the traditional **foreach** +#' The _first alternative_ (recommended), which uses [`%dofuture%`], avoids +#' having to use `registerDoFuture()`. The [`%dofuture%`] operator provides +#' a more consistent behavior than `%dopar%`, e.g. there is a unique set of +#' foreach arguments instead of one per possible adapter. Identification +#' of globals, random number generation (RNG), and error handling is +#' handled by the future ecosystem, just like with other map-reduce +#' solutions such as **[future.apply]** and **[furrr]**. +#' An example is: +#' +#' ```r +#' library(doFuture) +#' plan(multisession) +#' +#' y <- foreach(x = 1:4, y = 1:10) %dofuture% { +#' z <- x + y +#' slow_sqrt(z) +#' } +#' ``` +#' +#' This alternative is the recommended way to let `foreach()` parallelize +#' via the future framework if you start out from scratch. +#' +#' See [`%dofuture%`] for more details and examples on this approach. +#' +#' +#' The _second alternative_ is based on the traditional **foreach** #' approach where one registers a foreach adapter to be used by `%dopar%`. #' A popular adapter is `doParallel::registerDoParallel()`, which #' parallelizes on the local machine using the **parallel** package. @@ -42,29 +67,6 @@ #' #' See [registerDoFuture()] for more details and examples on this approach. #' -#' The _second alternative_, which uses [`%dofuture%`], avoids having to use -#' `registerDoFuture()`. The [`%dofuture%`] operator provides a more -#' consistent behavior than `%dopar%`, e.g. there is a unique set of -#' foreach arguments instead of one per possible adapter. Identification -#' of globals, random number generation (RNG), and error handling is -#' handled by the future ecosystem, just like with other map-reduce -#' solutions such as **[future.apply]** and **[furrr]**. -#' An example is: -#' -#' ```r -#' library(doFuture) -#' plan(multisession) -#' -#' y <- foreach(x = 1:4, y = 1:10) %dofuture% { -#' z <- x + y -#' slow_sqrt(z) -#' } -#' ``` -#' -#' This alternative is the recommended way to let `foreach()` parallelize -#' via the future framework if you start out from scratch. -#' -#' See [`%dofuture%`] for more details and examples on this approach. #' #' [future.apply]: https://cran.r-project.org/package=future.apply #' [furrr]: https://cran.r-project.org/package=furrr diff --git a/README.md b/README.md index af6154c..e59b823 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ - -
CRAN check status R CMD check status Coverage Status
@@ -31,14 +29,42 @@ in parallel. The **[doFuture]** package provides two alternatives for using futures with **foreach**: + 1. `y <- foreach(...) %dofuture% { ... }` + 1. `registerDoFuture()` + `y <- foreach(...) %dopar% { ... }`. - 2. `y <- foreach(...) %dofuture% { ... }` + +### Alternative 1: `%dofuture%` + +The _first alternative_ (recommended), which uses `%dofuture%`, avoids +having to use `registerDoFuture()`. The `%dofuture%` operator +provides a more consistent behavior than `%dopar%`, e.g. there is a +unique set of foreach arguments instead of one per possible adapter. +Identification of globals, random number generation (RNG), and error +handling is handled by the future ecosystem, just like with other +map-reduce solutions such as **[future.apply]** and **[furrr]**. An +example is: + +```r +library(doFuture) +plan(multisession) + +y <- foreach(x = 1:4, y = 1:10) %dofuture% { + z <- x + y + slow_sqrt(z) +} +``` + +This alternative is the recommended way to let `foreach()` parallelize +via the future framework, especially if you start out from scratch. + +See `help("%dofuture%", package = "doFuture")` for more details and +examples on this approach. -### Alternative 1: `registerDoFuture()` + `%dopar%` +### Alternative 2: `registerDoFuture()` + `%dopar%` -The _first alternative_ is based on the traditional **foreach** +The _second alternative_ is based on the traditional **foreach** approach where one registers a foreach adapter to be used by `%dopar%`. A popular adapter is `doParallel::registerDoParallel()`, which parallelizes on the local machine using the **parallel** package. @@ -73,33 +99,6 @@ See `help("registerDoFuture", package = "doFuture")` for more details and examples on this approach. -### Alternative 2: `%dofuture%` - -The _second alternative_, which uses `%dofuture%`, avoids having to use -`registerDoFuture()`. The `%dofuture%` operator provides a more -consistent behavior than `%dopar%`, e.g. there is a unique set of -foreach arguments instead of one per possible adapter. Identification -of globals, random number generation (RNG), and error handling is -handled by the future ecosystem, just like with other map-reduce -solutions such as **[future.apply]** and **[furrr]**. -An example is: - -```r -library(doFuture) -plan(multisession) - -y <- foreach(x = 1:4, y = 1:10) %dofuture% { - z <- x + y - slow_sqrt(z) -} -``` - -This alternative is the recommended way to let `foreach()` parallelize -via the future framework if you start out from scratch. - -See `help("%dofuture%", package = "doFuture")` for more details and -examples on this approach. - [doFuture]: https://doFuture.futureverse.org [future]: https://future.futureverse.org @@ -135,4 +134,3 @@ This will install the package from source. ## Contributing To contribute to this package, please see [CONTRIBUTING.md](CONTRIBUTING.md). - diff --git a/man/doFuture.Rd b/man/doFuture.Rd index 1aad172..65ddaec 100644 --- a/man/doFuture.Rd +++ b/man/doFuture.Rd @@ -14,11 +14,34 @@ such that \code{foreach()} parallelizes via \emph{any} future backend. There are two alternative ways to use this package: \enumerate{ -\item \code{y <- foreach(...) \%dopar\% { ... }} with \code{registerDoFuture()} \item \code{y <- foreach(...) \%dofuture\% { ... }} +\item \code{y <- foreach(...) \%dopar\% { ... }} with \code{registerDoFuture()} } -The \emph{first alternative} is based on the traditional \strong{foreach} +The \emph{first alternative} (recommended), which uses \code{\link{\%dofuture\%}}, avoids +having to use \code{registerDoFuture()}. The \code{\link{\%dofuture\%}} operator provides +a more consistent behavior than \verb{\%dopar\%}, e.g. there is a unique set of +foreach arguments instead of one per possible adapter. Identification +of globals, random number generation (RNG), and error handling is +handled by the future ecosystem, just like with other map-reduce +solutions such as \strong{\href{https://cran.r-project.org/package=future.apply}{future.apply}} and \strong{\href{https://cran.r-project.org/package=furrr}{furrr}}. +An example is: + +\if{html}{\out{
}}\preformatted{library(doFuture) +plan(multisession) + +y <- foreach(x = 1:4, y = 1:10) \%dofuture\% \{ + z <- x + y + slow_sqrt(z) +\} +}\if{html}{\out{
}} + +This alternative is the recommended way to let \code{foreach()} parallelize +via the future framework if you start out from scratch. + +See \code{\link{\%dofuture\%}} for more details and examples on this approach. + +The \emph{second alternative} is based on the traditional \strong{foreach} approach where one registers a foreach adapter to be used by \verb{\%dopar\%}. A popular adapter is \code{doParallel::registerDoParallel()}, which parallelizes on the local machine using the \strong{parallel} package. @@ -48,28 +71,5 @@ and any package that rely on it, to parallelize via the future framework. See \code{\link[=registerDoFuture]{registerDoFuture()}} for more details and examples on this approach. - -The \emph{second alternative}, which uses \code{\link{\%dofuture\%}}, avoids having to use -\code{registerDoFuture()}. The \code{\link{\%dofuture\%}} operator provides a more -consistent behavior than \verb{\%dopar\%}, e.g. there is a unique set of -foreach arguments instead of one per possible adapter. Identification -of globals, random number generation (RNG), and error handling is -handled by the future ecosystem, just like with other map-reduce -solutions such as \strong{\href{https://cran.r-project.org/package=future.apply}{future.apply}} and \strong{\href{https://cran.r-project.org/package=furrr}{furrr}}. -An example is: - -\if{html}{\out{
}}\preformatted{library(doFuture) -plan(multisession) - -y <- foreach(x = 1:4, y = 1:10) \%dofuture\% \{ - z <- x + y - slow_sqrt(z) -\} -}\if{html}{\out{
}} - -This alternative is the recommended way to let \code{foreach()} parallelize -via the future framework if you start out from scratch. - -See \code{\link{\%dofuture\%}} for more details and examples on this approach. } diff --git a/vignettes/doFuture-1-overview.md.rsp b/vignettes/doFuture-1-overview.md.rsp index 60ce710..e4a5a35 100644 --- a/vignettes/doFuture-1-overview.md.rsp +++ b/vignettes/doFuture-1-overview.md.rsp @@ -47,20 +47,49 @@ in parallel. The **[doFuture]** package provides two alternatives for using futures with **foreach**: - 1. `registerDoFuture()` + `y <- foreach(...) %dopar% { ... }`. + 1. `y <- foreach(...) %dofuture% { ... }` + + 2. `registerDoFuture()` + `y <- foreach(...) %dopar% { ... }`. - 2. `y <- foreach(...) %dofuture% { ... }` -### Alternative 1: `registerDoFuture()` + `%dopar%` +### Alternative 1: `%dofuture%` + +The _first alternative_ (recommended), which uses `%dofuture%`, avoids +having to use `registerDoFuture()`. The `%dofuture%` operator +provides a more consistent behavior than `%dopar%`, e.g. there is a +unique set of foreach arguments instead of one per possible adapter. +Identification of globals, random number generation (RNG), and error +handling is handled by the future ecosystem, just like with other +map-reduce solutions such as **[future.apply]** and **[furrr]**. An +example is: + +```r +library(doFuture) +plan(multisession) + +y <- foreach(x = 1:4, y = 1:10) %dofuture% { + z <- x + y + slow_sqrt(z) +} +``` + +This alternative is the recommended way to let `foreach()` parallelize +via the future framework, especially if you start out from scratch. + +See `help("%dofuture%", package = "doFuture")` for more details and +examples on this approach. + + +### Alternative 2: `registerDoFuture()` + `%dopar%` -The _first alternative_ is based on the traditional **foreach** -approach where one registers a foreach adapter to be used by `%dopar%`. -A popular adapter is `doParallel::registerDoParallel()`, which -parallelizes on the local machine using the **parallel** package. -This package provides `registerDoFuture()`, which parallelizes using -the **future** package, meaning any future-compliant parallel backend -can be used. +The _second alternative_ is based on the traditional **foreach** +approach where one registers a foreach adapter to be used by +`%dopar%`. A popular adapter is `doParallel::registerDoParallel()`, +which parallelizes on the local machine using the **parallel** +package. This package provides `registerDoFuture()`, which +parallelizes using the **future** package, meaning any +future-compliant parallel backend can be used. An example is: @@ -89,33 +118,6 @@ See `help("registerDoFuture", package = "doFuture")` for more details and examples on this approach. -### Alternative 2: `%dofuture%` - -The _second alternative_, which uses `%dofuture%`, avoids having to use -`registerDoFuture()`. The `%dofuture%` operator provides a more -consistent behavior than `%dopar%`, e.g. there is a unique set of -foreach arguments instead of one per possible adapter. Identification -of globals, random number generation (RNG), and error handling is -handled by the future ecosystem, just like with other map-reduce -solutions such as **[future.apply]** and **[furrr]**. -An example is: - -```r -library(doFuture) -plan(multisession) - -y <- foreach(x = 1:4, y = 1:10) %dofuture% { - z <- x + y - slow_sqrt(z) -} -``` - -This alternative is the recommended way to let `foreach()` parallelize -via the future framework if you start out from scratch. - -See `help("%dofuture%", package = "doFuture")` for more details and -examples on this approach. - [doFuture]: https://doFuture.futureverse.org [future]: https://future.futureverse.org From 88e46f81dcda42e4c983762dcb564494424fed78 Mon Sep 17 00:00:00 2001 From: BHGC Website GHA Workflow Runner Date: Mon, 11 Dec 2023 18:12:27 -0800 Subject: [PATCH 07/11] HELP: Add section on 'Reporting on progress' [#77] --- DESCRIPTION | 2 +- R/dofuture_OP.R | 21 +++++++++++++++++++++ R/registerDoFuture.R | 21 +++++++++++++++++++++ man/grapes-dofuture-grapes.Rd | 23 +++++++++++++++++++++++ man/registerDoFuture.Rd | 23 +++++++++++++++++++++++ 5 files changed, 89 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 16652e8..45e8973 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: doFuture -Version: 1.0.0-9002 +Version: 1.0.0-9003 Title: Use Foreach to Parallelize via the Future Framework Depends: foreach (>= 1.5.0), diff --git a/R/dofuture_OP.R b/R/dofuture_OP.R index 6fd1b2c..274f426 100644 --- a/R/dofuture_OP.R +++ b/R/dofuture_OP.R @@ -139,6 +139,27 @@ #' For further details and instructions, see #' [future.apply::future_lapply()]. #' +#' @section Reporting on progress: +#' How to report on progress is a frequently asked question, especially +#' in long-running tasks and parallel processing. The **foreach** +#' framework does _not_ have a built-in mechanism for progress +#' reporting(*). +#' +#' When using **doFuture**, and the Futureverse in general, for +#' processing, the **progressr** package can be used to signal progress +#' updates in a near-live fashion. There is special argument related to +#' `foreach()` or **doFuture** to achieve this. Instead, one calls a +#' a, so called, "progressor" function within each iteration. See +#' the [**progressr**](https://cran.r-project.org/package=progressr) +#' package and its `vignette(package = "progressr")` for examples. +#' +#' (*) The legacy **doSNOW** package uses a special `foreach()` argument +#' `.options.doSNOW$progress` that can be used to make a progress update +#' each time results from a parallel workers is returned. This approach +#' is limited by how chunking works, requires the developer to set that +#' argument, and the code becomes incompatible with foreach adaptors +#' registered by other **doNnn** packages. +#' #' #' @example incl/dofuture_OP.R #' diff --git a/R/registerDoFuture.R b/R/registerDoFuture.R index e204b70..f79ea0e 100644 --- a/R/registerDoFuture.R +++ b/R/registerDoFuture.R @@ -157,6 +157,27 @@ #' also rely on the foreach framework, so it is important to avoid stepping on #' others' toes._ #' +#' @section Reporting on progress: +#' How to report on progress is a frequently asked question, especially +#' in long-running tasks and parallel processing. The **foreach** +#' framework does _not_ have a built-in mechanism for progress +#' reporting(*). +#' +#' When using **doFuture**, and the Futureverse in general, for +#' processing, the **progressr** package can be used to signal progress +#' updates in a near-live fashion. There is special argument related to +#' `foreach()` or **doFuture** to achieve this. Instead, one calls a +#' a, so called, "progressor" function within each iteration. See +#' the [**progressr**](https://cran.r-project.org/package=progressr) +#' package and its `vignette(package = "progressr")` for examples. +#' +#' (*) The legacy **doSNOW** package uses a special `foreach()` argument +#' `.options.doSNOW$progress` that can be used to make a progress update +#' each time results from a parallel workers is returned. This approach +#' is limited by how chunking works, requires the developer to set that +#' argument, and the code becomes incompatible with foreach adaptors +#' registered by other **doNnn** packages. +#' #' @return #' `registerDoFuture()` returns, invisibly, the previously registered #' foreach `%dopar%` backend. diff --git a/man/grapes-dofuture-grapes.Rd b/man/grapes-dofuture-grapes.Rd index 880464f..60e4fe7 100644 --- a/man/grapes-dofuture-grapes.Rd +++ b/man/grapes-dofuture-grapes.Rd @@ -153,6 +153,29 @@ For further details and instructions, see \code{\link[future.apply:future_lapply]{future.apply::future_lapply()}}. } +\section{Reporting on progress}{ + +How to report on progress is a frequently asked question, especially +in long-running tasks and parallel processing. The \strong{foreach} +framework does \emph{not} have a built-in mechanism for progress +reporting(*). + +When using \strong{doFuture}, and the Futureverse in general, for +processing, the \strong{progressr} package can be used to signal progress +updates in a near-live fashion. There is special argument related to +\code{foreach()} or \strong{doFuture} to achieve this. Instead, one calls a +a, so called, "progressor" function within each iteration. See +the \href{https://cran.r-project.org/package=progressr}{\strong{progressr}} +package and its \code{vignette(package = "progressr")} for examples. + +(*) The legacy \strong{doSNOW} package uses a special \code{foreach()} argument +\code{.options.doSNOW$progress} that can be used to make a progress update +each time results from a parallel workers is returned. This approach +is limited by how chunking works, requires the developer to set that +argument, and the code becomes incompatible with foreach adaptors +registered by other \strong{doNnn} packages. +} + \examples{ \donttest{ plan(multisession) # parallelize futures on the local machine diff --git a/man/registerDoFuture.Rd b/man/registerDoFuture.Rd index 7487832..01491dd 100644 --- a/man/registerDoFuture.Rd +++ b/man/registerDoFuture.Rd @@ -175,6 +175,29 @@ also rely on the foreach framework, so it is important to avoid stepping on others' toes.} } +\section{Reporting on progress}{ + +How to report on progress is a frequently asked question, especially +in long-running tasks and parallel processing. The \strong{foreach} +framework does \emph{not} have a built-in mechanism for progress +reporting(*). + +When using \strong{doFuture}, and the Futureverse in general, for +processing, the \strong{progressr} package can be used to signal progress +updates in a near-live fashion. There is special argument related to +\code{foreach()} or \strong{doFuture} to achieve this. Instead, one calls a +a, so called, "progressor" function within each iteration. See +the \href{https://cran.r-project.org/package=progressr}{\strong{progressr}} +package and its \code{vignette(package = "progressr")} for examples. + +(*) The legacy \strong{doSNOW} package uses a special \code{foreach()} argument +\code{.options.doSNOW$progress} that can be used to make a progress update +each time results from a parallel workers is returned. This approach +is limited by how chunking works, requires the developer to set that +argument, and the code becomes incompatible with foreach adaptors +registered by other \strong{doNnn} packages. +} + \examples{ \donttest{ library(iterators) # iter() From f93c19c46941128e71696a59d4073e52035657be Mon Sep 17 00:00:00 2001 From: BHGC Website GHA Workflow Runner Date: Mon, 11 Dec 2023 18:13:53 -0800 Subject: [PATCH 08/11] GA: modernize --- .github/workflows/R-CMD-check.yaml | 18 +++++++++--------- .github/workflows/covr.yaml | 6 +++--- .github/workflows/doFuture.tests.extra.yaml | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d61d663..30983e3 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -22,14 +22,14 @@ jobs: - {os: macOS-latest, r: 'devel' } - {os: macOS-latest, r: 'release' } - {os: macOS-latest, r: 'oldrel' } -# - {os: ubuntu-20.04, r: 'devel' } - - {os: ubuntu-20.04, r: 'release' } - - {os: ubuntu-20.04, r: 'oldrel' } - - {os: ubuntu-20.04, r: 'oldrel-1' } - - {os: ubuntu-20.04, r: 'oldrel-2' } - - {os: ubuntu-20.04, r: '3.4' } - - {os: ubuntu-20.04, r: 'release' , plan: multicore, label: 'w/ multicore' } - - {os: ubuntu-20.04, r: 'release' , plan: multisession, label: 'w/ multisession' } +# - {os: ubuntu-latest, r: 'devel' } + - {os: ubuntu-latest, r: 'release' } + - {os: ubuntu-latest, r: 'oldrel' } + - {os: ubuntu-latest, r: 'oldrel-1' } + - {os: ubuntu-latest, r: 'oldrel-2' } + - {os: ubuntu-latest, r: '3.6' } + - {os: ubuntu-latest, r: 'release' , plan: multicore, label: 'w/ multicore' } + - {os: ubuntu-latest, r: 'release' , plan: multisession, label: 'w/ multisession' } env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -51,7 +51,7 @@ jobs: R_FUTURE_GLOBALS_ONREFERENCE: "warning" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 diff --git a/.github/workflows/covr.yaml b/.github/workflows/covr.yaml index 6c2c73d..959f622 100644 --- a/.github/workflows/covr.yaml +++ b/.github/workflows/covr.yaml @@ -8,7 +8,7 @@ jobs: timeout-minutes: 15 - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: covr @@ -17,7 +17,7 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest + RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest R_REMOTES_NO_ERRORS_FROM_WARNINGS: true ## R CMD check _R_CHECK_LENGTH_1_CONDITION_: true @@ -26,7 +26,7 @@ jobs: _R_CHECK_CRAN_INCOMING_: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 diff --git a/.github/workflows/doFuture.tests.extra.yaml b/.github/workflows/doFuture.tests.extra.yaml index 6d214fe..d8b46f9 100644 --- a/.github/workflows/doFuture.tests.extra.yaml +++ b/.github/workflows/doFuture.tests.extra.yaml @@ -8,7 +8,7 @@ jobs: timeout-minutes: 30 - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: ${{ matrix.config.r }} (${{ matrix.config.strategies }}) @@ -24,7 +24,7 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest + RSPM: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest R_REMOTES_NO_ERRORS_FROM_WARNINGS: true ## R CMD check _R_CHECK_LENGTH_1_CONDITION_: true @@ -38,7 +38,7 @@ jobs: _R_CHECK_FUTURE_STRATEGIES_: ${{ matrix.config.strategies }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 From 8cec43ec0686133f2b330553de6a4affce63785d Mon Sep 17 00:00:00 2001 From: BHGC Website GHA Workflow Runner Date: Wed, 13 Dec 2023 07:34:01 -0800 Subject: [PATCH 09/11] ROBUSTNESS: Add unit test asserting that option future.globals.maxSize is carried forward in nested parallelization (fix #81) --- DESCRIPTION | 2 +- tests/incl/start,load-only.R | 11 +++++++++ tests/options,nested.R | 46 ++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 tests/options,nested.R diff --git a/DESCRIPTION b/DESCRIPTION index 45e8973..7dc1e7c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: doFuture -Version: 1.0.0-9003 +Version: 1.0.0-9004 Title: Use Foreach to Parallelize via the Future Framework Depends: foreach (>= 1.5.0), diff --git a/tests/incl/start,load-only.R b/tests/incl/start,load-only.R index ba0ac7c..e6f719a 100644 --- a/tests/incl/start,load-only.R +++ b/tests/incl/start,load-only.R @@ -25,4 +25,15 @@ plyr <- "plyr" #nolint BiocParallel <- "BiocParallel" #nolint NMF <- "NMF" #nolint +supportedStrategies <- function(cores = 1L, excl = c("cluster"), ...) { + strategies <- future:::supportedStrategies(...) + strategies <- setdiff(strategies, excl) + if (cores > 1) { + strategies <- setdiff(strategies, c("sequential", "uniprocess")) + } + strategies +} + +availCores <- min(2L, future::availableCores()) + print(sessionInfo()) diff --git a/tests/options,nested.R b/tests/options,nested.R new file mode 100644 index 0000000..4b5ffd3 --- /dev/null +++ b/tests/options,nested.R @@ -0,0 +1,46 @@ +source("incl/start.R") + +message("*** Options in nested parallelization ...") + +options(future.debug = FALSE) +options(future.apply.debug = FALSE) +options(future.globals.maxSize = 1234000) + +for (cores in 1:availCores) { + message(sprintf("Testing with %d cores ...", cores)) + options(mc.cores = cores) + strategies <- supportedStrategies(cores) + + for (strategy1 in strategies) { + for (strategy2 in strategies) { + message(sprintf("- plan('%s') ...", strategy2)) + plan(list(outer = tweak(strategy1), inner = strategy2)) + + v <- foreach(x = 1:2) %dofuture% { + outer <- data.frame( + label = "outer", + idx = x, + pid = Sys.getpid(), + maxSize = getOption("future.globals.maxSize", NA_real_) + ) + + inner <- foreach(x = 3:4) %dofuture% { + data.frame( + label = "inner", + idx = x, + pid = Sys.getpid(), + maxSize = getOption("future.globals.maxSize", NA_real_)) + } + inner <- do.call(rbind, inner) + rbind(outer, inner) + } + v <- do.call(rbind, v) + print(v) + stopifnot(!anyNA(v$maxSize)) + } ## for (strategy2 ...) + } ## for (strategy1 ...) +} ## for (cores in ...) + +message("*** Options in nested parallelization ... done") + +source("incl/end.R") From aec9c9b316654c151f6e0f4f71eeda26eff070a0 Mon Sep 17 00:00:00 2001 From: BHGC Website GHA Workflow Runner Date: Wed, 13 Dec 2023 11:48:08 -0800 Subject: [PATCH 10/11] CLEANUP: Remove no-longer needed, legacy code in unit tests [ci skip] --- DESCRIPTION | 2 +- tests/incl/start,load-only.R | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7dc1e7c..873c38e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: doFuture -Version: 1.0.0-9004 +Version: 1.0.0-9005 Title: Use Foreach to Parallelize via the Future Framework Depends: foreach (>= 1.5.0), diff --git a/tests/incl/start,load-only.R b/tests/incl/start,load-only.R index e6f719a..af18874 100644 --- a/tests/incl/start,load-only.R +++ b/tests/incl/start,load-only.R @@ -18,13 +18,6 @@ mdebug <- doFuture:::mdebug mprint <- doFuture:::mprint mstr <- doFuture:::mstr -## To please R CMD check when using require(). -future.batchtools <- "future.batchtools" #nolint -caret <- "caret" #nolint -plyr <- "plyr" #nolint -BiocParallel <- "BiocParallel" #nolint -NMF <- "NMF" #nolint - supportedStrategies <- function(cores = 1L, excl = c("cluster"), ...) { strategies <- future:::supportedStrategies(...) strategies <- setdiff(strategies, excl) From 7a97c8f6c5bf0439a5a19408446ebcdd16079be0 Mon Sep 17 00:00:00 2001 From: BHGC Website GHA Workflow Runner Date: Tue, 19 Dec 2023 22:42:22 -0800 Subject: [PATCH 11/11] doFuture 1.0.1 --- DESCRIPTION | 10 +++--- NEWS.md | 2 +- cran-comments.md | 84 ++++++++++++++++++------------------------------ 3 files changed, 39 insertions(+), 57 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 873c38e..b877bd2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: doFuture -Version: 1.0.0-9005 +Version: 1.0.1 Title: Use Foreach to Parallelize via the Future Framework Depends: foreach (>= 1.5.0), @@ -16,9 +16,11 @@ Suggests: R.rsp VignetteBuilder: R.rsp -Authors@R: c(person("Henrik", "Bengtsson", role=c("aut", "cre", "cph"), - email = "henrikb@braju.com")) -Description: The 'future' package provides a unifying parallelization framework for R that supports many parallel and distributed backends. The 'foreach' package provides a powerful API for iterating over an R expression in parallel. The 'doFuture' package brings the best of the two together. There are two alternative ways to use this package. The first is the traditional 'foreach' approach by registering the 'foreach' adapter 'registerDoFuture()' and so that 'y <- foreach(...) %dopar% { ... }' runs in parallelizes with the 'future' framework. The other alternative is to use 'y <- foreach(...) %dofuture% { ... }', which does not require using 'registerDoFuture()' and has many advantages over '%dopar%'. +Authors@R: c(person("Henrik", "Bengtsson", + role = c("aut", "cre", "cph"), + email = "henrikb@braju.com", + comment = c(ORCID = "0000-0002-7579-5165"))) +Description: The 'future' package provides a unifying parallelization framework for R that supports many parallel and distributed backends. The 'foreach' package provides a powerful API for iterating over an R expression in parallel. The 'doFuture' package brings the best of the two together. There are two alternative ways to use this package. The recommended approach is to use 'y <- foreach(...) %dofuture% { ... }', which does not require using 'registerDoFuture()' and has many advantages over '%dopar%'. The alternative is the traditional 'foreach' approach by registering the 'foreach' adapter 'registerDoFuture()' and so that 'y <- foreach(...) %dopar% { ... }' runs in parallelizes with the 'future' framework. License: LGPL (>= 2.1) LazyLoad: TRUE URL: https://doFuture.futureverse.org, https://github.com/HenrikBengtsson/doFuture diff --git a/NEWS.md b/NEWS.md index b891aaa..a21818a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# Version (development version) +# Version 1.0.1 (2023-12-19) ## Bug Fixes diff --git a/cran-comments.md b/cran-comments.md index 078d974..e0631cf 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,9 +1,9 @@ -# CRAN submission doFuture 1.0.0 +# CRAN submission doFuture 1.0.1 -on 2023-03-23 +on 2023-12-19 -I've verified this submission has no negative impact on any of the 28 -reverse package dependencies available on CRAN (n = 25) and +I've verified this submission has no negative impact on any of the 31 +reverse package dependencies available on CRAN (n = 28) and Bioconductor (n = 3). Thanks in advance @@ -15,13 +15,13 @@ Thanks in advance The package has been verified using `R CMD check --as-cran` on: -| R version | GitHub | R-hub | mac/win-builder | -| ------------- | ------ | -------- | --------------- | -| 3.4.x | L | | | -| 4.0.x | L | | | -| 4.1.x | L M W | | | -| 4.2.x | L M W | L M M1 W | M1 W | -| devel | M W | L W | M1 W | +| R version | GitHub | R-hub | mac/win-builder | +| ------------- | ------ | ----- | --------------- | +| 3.6.x | L | | | +| 4.1.x | L | | | +| 4.2.x | L M W | | | +| 4.3.x | L M W | L W | M1 w | +| devel | M W | L W | w | *Legend: OS: L = Linux, M = macOS, M1 = macOS M1, W = Windows* @@ -33,7 +33,6 @@ res <- rhub::check(platforms = c( "debian-clang-devel", "fedora-gcc-devel", "debian-gcc-patched", - "macos-highsierra-release-cran", "windows-x86_64-release", "windows-x86_64-devel" )) @@ -43,67 +42,48 @@ print(res) gives ``` -── doFuture 1.0.0: OK +── doFuture 1.0.1: OK - Build ID: doFuture_1.0.0.tar.gz-add7c87b36474032b5ee8037779b2528 + Build ID: doFuture_1.0.1.tar.gz-d2d1c0e8e92f4336897ad9ecfaea5898 Platform: Debian Linux, R-devel, clang, ISO-8859-15 locale - Submitted: 34m 26.7s ago - Build time: 29m 55.4s + Submitted: 3h 22m 50.1s ago + Build time: 43m 23.9s 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ -── doFuture 1.0.0: OK +── doFuture 1.0.1: OK - Build ID: doFuture_1.0.0.tar.gz-b042f14934fa455c802e26f658d47ef8 + Build ID: doFuture_1.0.1.tar.gz-0faa99fcb4d3451899de07650b564871 Platform: Fedora Linux, R-devel, GCC - Submitted: 34m 26.8s ago - Build time: 19m 39.5s + Submitted: 3h 22m 50.1s ago + Build time: 27m 51.4s 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ -── doFuture 1.0.0: OK +── doFuture 1.0.1: OK - Build ID: doFuture_1.0.0.tar.gz-643e2ee8ce954e27ba6b7458cb1d8fd7 + Build ID: doFuture_1.0.1.tar.gz-3248c60109994678b5ded376a7a6110e Platform: Debian Linux, R-patched, GCC - Submitted: 34m 26.8s ago - Build time: 28m 37.4s + Submitted: 3h 22m 50.1s ago + Build time: 40m 30.1s 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ -── doFuture 1.0.0: WARNING +── doFuture 1.0.1: OK - Build ID: doFuture_1.0.0.tar.gz-9f9e303dfde04c1f8aec8f15c286504d - Platform: macOS 10.13.6 High Sierra, R-release, CRAN's setup - Submitted: 34m 26.8s ago - Build time: 4m 33.8s - -❯ checking whether package ‘doFuture’ can be installed ... WARNING - Found the following significant warnings: - Warning: package ‘foreach’ was built under R version 4.1.2 - Warning: package ‘future’ was built under R version 4.1.2 - -0 errors ✔ | 1 warning ✖ | 0 notes ✔ - -── doFuture 1.0.0: WARNING - - Build ID: doFuture_1.0.0.tar.gz-c3471cb849c04f629c13a7207da4b191 + Build ID: doFuture_1.0.1.tar.gz-6d21ce57affe4093bf8fd2279a274aa5 Platform: Windows Server 2022, R-release, 32/64 bit - Submitted: 34m 26.8s ago - Build time: 4m 13.8s + Submitted: 3h 22m 50.1s ago + Build time: 6m 59.5s -❯ checking whether package 'doFuture' can be installed ... WARNING - Found the following significant warnings: - Warning: package 'foreach' was built under R version 4.2.3 - Warning: package 'future' was built under R version 4.2.3 - -0 errors ✔ | 1 warning ✖ | 0 notes ✔ +0 errors ✔ | 0 warnings ✔ | 0 notes ✔ -── doFuture 1.0.0: OK +── doFuture 1.0.1: OK - Build ID: doFuture_1.0.0.tar.gz-8760d1742ea6455b9079a5c3fe6d632c + Build ID: doFuture_1.0.1.tar.gz-694e54c649bc4622aac18ad3fb720bc2 Platform: Windows Server 2022, R-devel, 64 bit - Submitted: 5m 28.7s ago - Build time: 4m 8.8s + Submitted: 3h 22m 50.1s ago + Build time: 6m 3.1s 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ ```