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

Add zarr read/write - #30

Merged
TomNicholas merged 7 commits into
xarray-contrib:mainfrom
jhamman:io/zarr-read-write
Aug 30, 2021
Merged

Add zarr read/write#30
TomNicholas merged 7 commits into
xarray-contrib:mainfrom
jhamman:io/zarr-read-write

Conversation

@jhamman

Copy link
Copy Markdown

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.

@TomNicholasTomNicholas left a comment

Copy link
Copy Markdown
Member

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.

Comment threaddatatree/io.py Outdated
Comment threaddatatree/tests/test_datatree.py Outdated
Comment threaddatatree/datatree.py Outdated
Comment threaddatatree/datatree.py Outdated
Comment threaddatatree/io.py Outdated
Comment threaddatatree/io.py Outdated
Joe Hammanand 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
Copy Markdown
Author

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

@TomNicholasTomNicholas left a comment

Copy link
Copy Markdown
Member

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:mainAug 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 freeto 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

@jhamman@TomNicholas