Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Add zarr read/write #30

Merged
merged 7 commits into from
Aug 30, 2021
Merged

Add zarr read/write #30

merged 7 commits into from
Aug 30, 2021

Conversation

jhamman
Copy link

@jhamman jhamman commented Aug 26, 2021

Closes #28

This PR adds read and write support for Zarr.

It also refactors the open_datatree function to avoid calling a recursive loader. Instead, we use an iterator over group keys.

Copy link
Member

@TomNicholas TomNicholas left a comment

Choose a reason for hiding this comment

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

Thanks again @jhamman , this looks nice! There are just a couple of ways that the code could be simplified.

datatree/io.py Outdated Show resolved Hide resolved
datatree/tests/test_datatree.py Outdated Show resolved Hide resolved
datatree/datatree.py Outdated Show resolved Hide resolved
datatree/datatree.py Outdated Show resolved Hide resolved
datatree/io.py Outdated Show resolved Hide resolved
datatree/io.py Outdated Show resolved Hide resolved
Joe Hamman and others added 2 commits August 30, 2021 08:17
Co-authored-by: Tom Nicholas <35968931+TomNicholas@users.noreply.github.com>
 * use assert_tree_equal
 * iterate over subtree
 * use pathlib
@jhamman
Copy link
Author

jhamman commented Aug 30, 2021

@TomNicholas - I think I've resolved all your comments.

Copy link
Member

@TomNicholas TomNicholas left a comment

Choose a reason for hiding this comment

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

Thanks @jhamman ! That's great.

@TomNicholas TomNicholas merged commit 3f68eea into xarray-contrib:main Aug 30, 2021
flamingbear pushed a commit to flamingbear/rewritten-datatree that referenced this pull request Jan 19, 2024
* add test for roundtrip and support empty nodes

* update roundtrip test, improves empty node handling in IO

* add zarr read/write support

* support netcdf4 or h5netcdf

* netcdf is optional, zarr too!

* Apply suggestions from code review

Co-authored-by: Tom Nicholas <35968931+TomNicholas@users.noreply.github.com>

Co-authored-by: Tom Nicholas <35968931+TomNicholas@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add to/from zarr support
2 participants