Add helper to test if an array is open#421
Conversation
| ##' @return A boolean indicating whether the TileDB Array object is open | ||
| ##' @export | ||
| tiledb_array_is_open <- function(arr) { | ||
| stopifnot(`The 'arr' argument must be a tiledb_array object` = is(arr, "tiledb_array") || is(arr, "tiledb_sparse") || is(arr, "tiledb_dense")) |
There was a problem hiding this comment.
Maybe
stopifnot("The 'arr' argument must be a tiledb_array object" = .isArray(arr))as I am sloooowly changing to use double-quotes for named first argument, and we (for a long time) had that handy helper (which I also sometimes forget to use). Just a nit, almost not worth a commit.
There was a problem hiding this comment.
Totally worth a commit! I was thinking a utility would be helpful for such a common pattern. As of b9df9c1 it's used everywhere in Array.R. Thanks for the hint!
|
Nice addition. I guess this was overlooked as an export-to-R when the library function was wrapped. |
|
Some additional tests blew up over line 993 in inst/tinytest/test_tiledbarray.R which has an accidental upper-case T: expect_True(tiledb_array_is_open(arr)I'll clean that up when I do 2.9.3 tomorrow. |
|
Ah dangit, sorry about that! Why didn't CI choke? |
|
I am not sure. Most likely that the remainder of that test file got skipped because a data package was not there. I have an auxiliary repo I use for CI against all other 2.* release, dev, and some more -- and they all went belly-up. It happens to me at times too. A little tedious when it happens but it keeps the day-to-day, commit-to-commit CI a little quicker so I am happy to pay the price. I fixed it in that repo with a one char commit. |
Adds the array-based complement to the helpful
tiledb_group_is_open()function.