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

Set/get chunk property test EAR-1189 #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

dcherian
Copy link
Contributor

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?

@dcherian dcherian requested a review from paraseba August 26, 2024 19:10
}

prop_compose! {
pub fn metadata_and_indices()(metadata in zarr_array_metadata())
Copy link
Contributor Author

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.

Copy link
Contributor

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

@dcherian dcherian changed the title Set/get chunk property test Set/get chunk property test EAR-1189 Aug 26, 2024
Copy link

linear bot commented Aug 26, 2024

dataset.add_array(path.clone(), metadata.clone()).await.unwrap();

dataset
.set_chunk_ref(path.clone(), indices.clone(), Some(payload1.clone()))
Copy link
Contributor

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.

src/strategies.rs Show resolved Hide resolved
}

prop_compose! {
pub fn metadata_and_indices()(metadata in zarr_array_metadata())
Copy link
Contributor

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

@dcherian dcherian force-pushed the more-property-tests branch from 3edc666 to 2ec3abd Compare August 26, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants