-
Notifications
You must be signed in to change notification settings - Fork 3
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
Compatibility with xarray for #18 and R CMD check cleanup #85
Conversation
Here's a social media sized logo to add to the repository in settings @keller-mark |
Been doing a whole bunch of testing and investigation of the array and nested array internals. I uncovered a handful of bugs in the process.
Open questions in test-nested-array.R:
# Should this be the case?!?
expect_error(a[1:10, 1:20]$set("...", new_vals),
"selection must be a list of slices") a[1:10, 1:20]$set(list(slice(1,10), slice(1,20)), new_vals)
# it does not update the original array -- should it?
expect_equal(a[1:10, 1:20]$as.array(),
vals) |
This latest commit gets the tests passing, but the handling of is_scalar vs is_integer is maybe not 100% -- very much worth a review on those details. |
With my latest commits, I see no errors, no warnings, and one note in check. The note is the dog.ome.zarr size issue noted in #87. |
Good point, this could get confusing, especially when using the bracket access notation on the ZarrArray since it may be less obvious that what you get back is a NestedArray. We could check how the analogous pattern in Python behaves and then follow that. Alternatively, maybe we need a mechanism for the user to opt-in or opt-out of updating the parent (might be useful/needed in cases where the Store is read-only). Another option may be to try to get away from the |
Good point, these and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these changes / improved docs / tests are awesome
|
||
d <- g$get_item("volcano")$get_item(list(s, s))$data | ||
|
||
expect_equal(dim(d), c(11, 11)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test that checks equality of the contents as well?
@@ -4,3 +4,23 @@ setup({ | |||
teardown({ | |||
|
|||
}) | |||
|
|||
zarr_volcano <- function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Co-authored-by: Mark Keller <7525285+keller-mark@users.noreply.github.com>
Likely some other checks, I'll comment in #18 with what I checked so far.