From fab6e40b303ea3690199f2794209862454b59ddc Mon Sep 17 00:00:00 2001 From: Philipp Schauberger Date: Mon, 5 Jul 2021 19:59:54 +0200 Subject: [PATCH] Revert "resolves #215" --- NEWS.md | 4 -- R/openxlsx.R | 2 +- revdep/README.md | 6 +-- revdep/cran.md | 2 +- revdep/failures.md | 98 +---------------------------------- tests/testthat/test-options.R | 24 ++------- 6 files changed, 9 insertions(+), 127 deletions(-) diff --git a/NEWS.md b/NEWS.md index cebe398d..ba6e3b9a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,9 +1,5 @@ # openxlsx (development version) -## Fixes - -* `openxlsx_setOp()` now works with named list ([#215](https://github.com/ycphs/openxlsx/issues/215)) - # openxlsx 4.2.4 ## Fixes diff --git a/R/openxlsx.R b/R/openxlsx.R index 260ebac7..5a6878fa 100644 --- a/R/openxlsx.R +++ b/R/openxlsx.R @@ -137,7 +137,7 @@ openxlsx_setOp <- function(x, value) { stop("x cannot be an unnamed list", call. = FALSE) } - return(invisible(mapply(openxlsx_setOp, x = names(x), value = x))) + mapply(openxlsx_setOp, x = names(x), value = x) } value <- as.list(value) diff --git a/revdep/README.md b/revdep/README.md index cc9b3578..3bca6c37 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -10,7 +10,7 @@ |collate |C.UTF-8 | |ctype |C.UTF-8 | |tz |UTC | -|date |2021-07-02 | +|date |2021-06-30 | # Dependencies @@ -23,7 +23,7 @@ # Revdeps -## Failed to check (26) +## Failed to check (24) |package |version |error |warning |note | |:--------------|:-------|:-----|:-------|:----| @@ -42,10 +42,8 @@ |MatrixQCvis |? | | | | |MicroSEC |? | | | | |nanotatoR |? | | | | -|openPrimeR |? | | | | |PloGO2 |? | | | | |rbiom |? | | | | -|RIPAT |? | | | | |sangeranalyseR |1.2.0 |1 |1 |2 | |SEtools |? | | | | |stplanr |? | | | | diff --git a/revdep/cran.md b/revdep/cran.md index e3b2e1be..3a02aad6 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -1,6 +1,6 @@ ## revdepcheck results -We checked 117 reverse dependencies (0 from CRAN + 117 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. +We checked 117 reverse dependencies (1 from CRAN + 116 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/failures.md b/revdep/failures.md index e836d999..ea802fcf 100644 --- a/revdep/failures.md +++ b/revdep/failures.md @@ -17,21 +17,7 @@ -Error in download.file(url, destfile, method, mode = "wb", ...) : - download from 'https://bioconductor.org/packages/3.13/data/annotation/src/contrib/MafDb.1Kgenomes.phase3.hs37d5_3.10.0.tar.gz' failed -In addition: Warning messages: -1: In download.file(url, destfile, method, mode = "wb", ...) : - downloaded length 1217592432 != reported length 1623464748 -2: In download.file(url, destfile, method, mode = "wb", ...) : - downloaded length 1217592432 != reported length 1623464748 -3: In download.file(url, destfile, method, mode = "wb", ...) : - URL 'https://bioconductor.org/packages/3.13/data/annotation/src/contrib/MafDb.1Kgenomes.phase3.hs37d5_3.10.0.tar.gz': Timeout of 60 seconds was reached -4: In download.file(url, destfile, method, mode = "wb", ...) : - URL 'https://bioconductor.org/packages/3.13/data/annotation/src/contrib/MafDb.1Kgenomes.phase3.hs37d5_3.10.0.tar.gz': Timeout of 60 seconds was reached -Warning in download.packages(pkgs, destdir = tmpd, available = available, : - download of package ‘MafDb.1Kgenomes.phase3.hs37d5’ failed -Warning in download.packages(pkgs, destdir = tmpd, available = available, : - download of package ‘MafDb.1Kgenomes.phase3.hs37d5’ failed + ``` @@ -41,21 +27,7 @@ Warning in download.packages(pkgs, destdir = tmpd, available = available, : -Error in download.file(url, destfile, method, mode = "wb", ...) : - download from 'https://bioconductor.org/packages/3.13/data/annotation/src/contrib/MafDb.1Kgenomes.phase3.hs37d5_3.10.0.tar.gz' failed -In addition: Warning messages: -1: In download.file(url, destfile, method, mode = "wb", ...) : - downloaded length 1217592432 != reported length 1623464748 -2: In download.file(url, destfile, method, mode = "wb", ...) : - downloaded length 1217592432 != reported length 1623464748 -3: In download.file(url, destfile, method, mode = "wb", ...) : - URL 'https://bioconductor.org/packages/3.13/data/annotation/src/contrib/MafDb.1Kgenomes.phase3.hs37d5_3.10.0.tar.gz': Timeout of 60 seconds was reached -4: In download.file(url, destfile, method, mode = "wb", ...) : - URL 'https://bioconductor.org/packages/3.13/data/annotation/src/contrib/MafDb.1Kgenomes.phase3.hs37d5_3.10.0.tar.gz': Timeout of 60 seconds was reached -Warning in download.packages(pkgs, destdir = tmpd, available = available, : - download of package ‘MafDb.1Kgenomes.phase3.hs37d5’ failed -Warning in download.packages(pkgs, destdir = tmpd, available = available, : - download of package ‘MafDb.1Kgenomes.phase3.hs37d5’ failed + ``` @@ -547,39 +519,6 @@ ERROR: lazy loading failed for package ‘hypeR’ -``` -# openPrimeR - -
- -* Version: -* GitHub: https://github.com/ycphs/openxlsx -* Source code: NA -* Number of recursive dependencies: 0 - -
- -## Error before installation - -### Devel - -``` - - - - - - -``` -### CRAN - -``` - - - - - - ``` # PloGO2 @@ -646,39 +585,6 @@ ERROR: lazy loading failed for package ‘hypeR’ -``` -# RIPAT - -
- -* Version: -* GitHub: https://github.com/ycphs/openxlsx -* Source code: NA -* Number of recursive dependencies: 0 - -
- -## Error before installation - -### Devel - -``` - - - - - - -``` -### CRAN - -``` - - - - - - ``` # sangeranalyseR diff --git a/tests/testthat/test-options.R b/tests/testthat/test-options.R index d4907289..d5546e01 100644 --- a/tests/testthat/test-options.R +++ b/tests/testthat/test-options.R @@ -5,27 +5,17 @@ test_that("option names are appropriate", { test_that("changing options", { op <- options() + on.exit(options(op), add = TRUE) # Set via options() - options(openxlsx.borders = "whatever") + options(openxlsx.border = "whatever") expect_equal(openxlsx_getOp("borders"), getOption("openxlsx.borders")) - expect_equal(openxlsx_getOp("borders"), "whatever") - - # Set via openxlsx_setOp() - openxlsx_setOp("borders", "new_whatever") - expect_equal(openxlsx_getOp("borders"), getOption("openxlsx.borders")) - expect_equal(openxlsx_getOp("borders"), "new_whatever") - - # with openxlsx. prefix - openxlsx_setOp("openxlsx.borders", "new_new_whatever") - expect_equal(openxlsx_getOp("openxlsx.borders"), getOption("openxlsx.borders")) - expect_equal(openxlsx_getOp("openxlsx.borders"), "new_new_whatever") options(openxlsx.tableStyle = "Cool format") expect_equal(openxlsx_getOp("tableStyle"), openxlsx_getOp("openxlsx.tableStyle")) # Setting to NULL will return default - options(openxlsx.borders = NULL) + options(openxlsx.border = NULL) expect_equal(openxlsx_getOp("borders"), op.openxlsx[["openxlsx.borders"]]) # Bad options names will trigger warning but still be produced @@ -37,12 +27,4 @@ test_that("changing options", { # Multiple Ops returns error expect_error(openxlsx_getOp(c("withFilter", "borders")), "length 1") - - options(op) -}) - -test_that("openxlsx_setOp() works with list [#215]", { - op <- options() - expect_error(openxlsx_setOp(list(withFilter = TRUE, keepNA = TRUE)), NA) - options(op) })