-
Notifications
You must be signed in to change notification settings - Fork 24
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
add support for symbols as keys #130
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 7008504781
💛 - Coveralls |
Doc errors appear unrelated to this PR |
Thanks a lot for preparing this. I just looked at it and really like the idea to make the interface more DataFrame-like. I got carried away a bit and implemented dot syntax for subsetting as well so that you can use Could you have a look if this works for you? |
Pull Request Test Coverage Report for Build 7043631258
💛 - Coveralls |
Pull Request Test Coverage Report for Build 7113230225
💛 - Coveralls |
in the depths of AGU prep right now but will review this asap |
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.
This is fantastic!!! I took the changes for a quick spin and everything was intuitive and worked as expected. I see use of "z.metadata" which I think now needs to be removed and a "metadata()" function likely needs to be added.
@@ -84,18 +84,18 @@ nobytes(z::ZArray{<:String}) = "unknown" | |||
zinfo(z::ZArray) = zinfo(stdout,z) | |||
function zinfo(io::IO,z::ZArray) | |||
ninit = sum(chunkindices(z)) do i | |||
isinitialized(z.storage,z.path,i) | |||
isinitialized(storage(z),path(z),i) | |||
end | |||
allinfos = [ | |||
"Type" => "ZArray", | |||
"Data type" => eltype(z), | |||
"Shape" => size(z), | |||
"Chunk Shape" => z.metadata.chunks, |
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.
does z.metadata.chunks need to be updated now that we have .
inexing
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.
I don't think so. It is only ZGroups that have the new . indexing where we need to be careful, ZArrays would still behave the same
@@ -84,18 +84,18 @@ nobytes(z::ZArray{<:String}) = "unknown" | |||
zinfo(z::ZArray) = zinfo(stdout,z) | |||
function zinfo(io::IO,z::ZArray) | |||
ninit = sum(chunkindices(z)) do i | |||
isinitialized(z.storage,z.path,i) | |||
isinitialized(storage(z),path(z),i) | |||
end | |||
allinfos = [ | |||
"Type" => "ZArray", | |||
"Data type" => eltype(z), | |||
"Shape" => size(z), | |||
"Chunk Shape" => z.metadata.chunks, | |||
"Order" => z.metadata.order, |
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.
does z.metadata.order need to be updated now that we have . inexing
end | ||
allinfos = [ | ||
"Type" => "ZArray", | ||
"Data type" => eltype(z), | ||
"Shape" => size(z), | ||
"Chunk Shape" => z.metadata.chunks, | ||
"Order" => z.metadata.order, | ||
"Read-Only" => !z.writeable, | ||
"Read-Only" => !iswriteable(z), | ||
"Compressor" => z.metadata.compressor, |
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.
same comment for all occurrences ofz.metadata
Adding a The simplest solution would be to replace all |
This adds support for symbol indexing into a ZGroup