Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolves #215 #216

Merged
merged 2 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# openxlsx (development version)

## Fixes

* `openxlsx_setOp()` now works with named list ([#215](https://github.com/ycphs/openxlsx/issues/215))

# openxlsx 4.2.4

## Fixes
Expand Down
2 changes: 1 addition & 1 deletion R/openxlsx.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ openxlsx_setOp <- function(x, value) {
stop("x cannot be an unnamed list", call. = FALSE)
}

mapply(openxlsx_setOp, x = names(x), value = x)
return(invisible(mapply(openxlsx_setOp, x = names(x), value = x)))
}

value <- as.list(value)
Expand Down
6 changes: 4 additions & 2 deletions revdep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
|collate |C.UTF-8 |
|ctype |C.UTF-8 |
|tz |UTC |
|date |2021-06-30 |
|date |2021-07-02 |

# Dependencies

Expand All @@ -23,7 +23,7 @@

# Revdeps

## Failed to check (24)
## Failed to check (26)

|package |version |error |warning |note |
|:--------------|:-------|:-----|:-------|:----|
Expand All @@ -42,8 +42,10 @@
|MatrixQCvis |? | | | |
|MicroSEC |? | | | |
|nanotatoR |? | | | |
|openPrimeR |? | | | |
|PloGO2 |? | | | |
|rbiom |? | | | |
|RIPAT |? | | | |
|sangeranalyseR |1.2.0 |1 |1 |2 |
|SEtools |? | | | |
|stplanr |? | | | |
Expand Down
2 changes: 1 addition & 1 deletion revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## revdepcheck results

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 checked 117 reverse dependencies (0 from CRAN + 117 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
Expand Down
98 changes: 96 additions & 2 deletions revdep/failures.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,21 @@




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


```
Expand All @@ -27,7 +41,21 @@




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


```
Expand Down Expand Up @@ -519,6 +547,39 @@ ERROR: lazy loading failed for package ‘hypeR’



```
# openPrimeR

<details>

* Version:
* GitHub: https://github.com/ycphs/openxlsx
* Source code: NA
* Number of recursive dependencies: 0

</details>

## Error before installation

### Devel

```






```
### CRAN

```






```
# PloGO2

Expand Down Expand Up @@ -585,6 +646,39 @@ ERROR: lazy loading failed for package ‘hypeR’



```
# RIPAT

<details>

* Version:
* GitHub: https://github.com/ycphs/openxlsx
* Source code: NA
* Number of recursive dependencies: 0

</details>

## Error before installation

### Devel

```






```
### CRAN

```






```
# sangeranalyseR

Expand Down
24 changes: 21 additions & 3 deletions tests/testthat/test-options.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,27 @@ test_that("option names are appropriate", {

test_that("changing options", {
op <- options()
on.exit(options(op), add = TRUE)

# Set via options()
options(openxlsx.border = "whatever")
options(openxlsx.borders = "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.border = NULL)
options(openxlsx.borders = NULL)
expect_equal(openxlsx_getOp("borders"), op.openxlsx[["openxlsx.borders"]])

# Bad options names will trigger warning but still be produced
Expand All @@ -27,4 +37,12 @@ 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)
})