Skip to content

Commit

Permalink
Prepare for CRAN v0.2.4 Release
Browse files Browse the repository at this point in the history
* Addressed ERROR on R-devel CRAN environments by setting `parallelly.makeNodePSOCK.setup_strategy = sequential` for all CRAN tests as suggested by the maintainer for the `future` and `parallelly` packages who is actively working on a solution <HenrikBengtsson/parallelly#65>
  • Loading branch information
Ian Buller, PhD, MA committed Aug 2, 2021
1 parent 03730a7 commit bdf7050
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 20 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: sparrpowR
Title: Power Analysis to Detect Spatial Relative Risk Clusters
Version: 0.2.3
Date: 2021-07-15
Version: 0.2.4
Date: 2021-08-02
Authors@R:
c(person(given = "Ian D.",
family = "Buller",
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# sparrpowR (development version)

# sparrpowR 0.2.4
* Addressed ERROR on R-devel CRAN environments by setting `parallelly.makeNodePSOCK.setup_strategy = sequential` for all CRAN tests as suggested by the maintainer for the `future` and `parallelly` packages who is actively working on a solution <https://github.com/HenrikBengtsson/parallelly/issues/65>

# sparrpowR 0.2.3
* Following advice from `future` package maintainer, now `spatial_power()` and `jitter_power()` functions reset future strategy when exiting
* Addressed ERROR in MacOS CRAN environments by setting the `parallelly.makeNodePSOCK.setup_strategy = sequential` for MacOS environments running `tcltk` until `parallelly` (>=1.26.1-9002) is on CRAN. This workaround was suggested by the `parallelly` maintainer <https://github.com/HenrikBengtsson/parallelly/issues/62#issuecomment-880665390>
Expand Down
5 changes: 2 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
## This is the seventh resubmission
## This is the eigth resubmission

* Actions taken since previous submission:
* Following advice from `future` package maintainer, now `spatial_power()` and `jitter_power()` functions reset future strategy when exiting
* Addressed ERROR in MacOS CRAN environments by setting the `parallelly.makeNodePSOCK.setup_strategy = sequential` for MacOS environments running `tcltk` until `parallelly` (>=1.26.1-9002) is on CRAN. This workaround was suggested by the `parallelly` maintainer <https://github.com/HenrikBengtsson/parallelly/issues/62#issuecomment-880665390>
* Addressed ERROR on R-devel CRAN environments by setting `parallelly.makeNodePSOCK.setup_strategy = sequential` for all CRAN tests as suggested by the maintainer for the `future` and `parallelly` packages who is actively working on a solution <https://github.com/HenrikBengtsson/parallelly/issues/65>

* Documentation for `pval_correct()` references a doi <https://doi.org/10.2307/2283989> that throws a NOTE but is a valid URL

Expand Down
5 changes: 5 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
library(testthat)
library(sparrpowR)

## WORKAROUND: Avoid R bug 18119 [1] that is trigger when for instance the
## 'tcltk' package is loaded on macOS, or when running in the RStudio Console
## [1] https://bugs.r-project.org/bugzilla/show_bug.cgi?id=18119
options(parallelly.makeNodePSOCK.setup_strategy = "sequential")

test_check("sparrpowR")
7 changes: 0 additions & 7 deletions tests/testthat/test-jitter_power.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ test_that("jitter_power works", {
}
)

## WORKAROUND: Avoid R bug 18119 [1] that is trigger when for instance the
## 'tcltk' package is loaded on macOS, or when running in the RStudio Console
## [1] https://bugs.r-project.org/bugzilla/show_bug.cgi?id=18119
if (getRversion() >= "4.0.0" && getRversion() <= "4.1.0") {
options(parallelly.makeNodePSOCK.setup_strategy = "sequential")
}

test_that("parallel processing with future package functions properly", {
expect_named(jitter_power(obs_data = unique(chorley),
sim_total = 2,
Expand Down
8 changes: 0 additions & 8 deletions tests/testthat/test-test-spatial_power.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,6 @@ test_that("spatial_power works", {
}
)

## WORKAROUND: Avoid R bug 18119 [1] that is trigger when for instance the
## 'tcltk' package is loaded on macOS, or when running in the RStudio Console
## [1] https://bugs.r-project.org/bugzilla/show_bug.cgi?id=18119
if (getRversion() >= "4.0.0" && getRversion() <= "4.1.0") {
options(parallelly.makeNodePSOCK.setup_strategy = "sequential")
}

test_that("parallel processing with future package functions properly", {
expect_named(spatial_power(x_case = c(0.25),
x_control = c(0.25),
Expand All @@ -225,4 +218,3 @@ test_that("parallel processing with future package functions properly", {
)
}
)

0 comments on commit bdf7050

Please sign in to comment.