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

Make Group.arrays, groups compatible with v2 #2213

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

TomAugspurger
Copy link
Contributor

Defines a set of array / group iterators.

  • .groups / .arrays: over (name, value) pairs
  • .group_keys / .array_keys: over keys
  • .group_values / .array_values: over values

Closes #2212

Defines a set of array / group iterators.

- .groups / .arrays: over (name, value) pairs
- .group_keys / .array_keys: over keys
- .group_values / .array_values: over values
"""
Test the behavior of `Group` methods for accessing subgroups, namely `Group.group_keys` and `Group.groups`
"""
def test_group_child_iterators(store: Store, zarr_format: ZarrFormat):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to combine these tests since the setup is the same. And the test benefits from having both groups and arrays in the Group being accessed, since the code needs to filter to just child Groups / Arrays.

@jhamman jhamman merged commit c878da2 into zarr-developers:v3 Sep 20, 2024
26 checks passed
dcherian added a commit to dcherian/zarr-python that referenced this pull request Sep 24, 2024
* v3:
  chore: update pre-commit hooks (zarr-developers#2222)
  fix: validate v3 dtypes when loading/creating v3 metadata (zarr-developers#2209)
  fix typo in store integration test (zarr-developers#2223)
  Basic Zarr-python 2.x compatibility changes (zarr-developers#2098)
  Make Group.arrays, groups compatible with v2 (zarr-developers#2213)
  Typing fixes to test_indexing (zarr-developers#2193)
  Default to RemoteStore for fsspec URIs (zarr-developers#2198)
  Make MemoryStore serialiazable (zarr-developers#2204)
  [v3] Implement Group methods for empty, full, ones, and zeros (zarr-developers#2210)
  implement `store.list_prefix` and `store._set_many` (zarr-developers#2064)
  Fixed codec for v2 data with no fill value (zarr-developers#2207)
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.

Make Group.arrays return tuples of (key, array) for v2 compatibility
2 participants