-
Notifications
You must be signed in to change notification settings - Fork 19
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
Set/get chunk property test EAR-1189 #34
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
prop_compose! { | ||
pub fn metadata_and_indices()(metadata in zarr_array_metadata()) |
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 feels silly but I couldn't think of a better way. I miss the hypothesis data.draw
construct.
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.
You could write an ArrayIndices strategy that takes a ZarrArrayMetadata strategy as argument
dataset.add_array(path.clone(), metadata.clone()).await.unwrap(); | ||
|
||
dataset | ||
.set_chunk_ref(path.clone(), indices.clone(), Some(payload1.clone())) |
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.
These days you can do set_chunk
with bytes, instead of set_chunk_ref
. Better because it will handle inline/materialized for you.
} | ||
|
||
prop_compose! { | ||
pub fn metadata_and_indices()(metadata in zarr_array_metadata()) |
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.
You could write an ArrayIndices strategy that takes a ZarrArrayMetadata strategy as argument
3edc666
to
2ec3abd
Compare
One more commit from my testing spike last week. I didn't complete the stateful test bit but this could be useful with our new caching storage?