Commit f0809e4
Refactoring/fixing zarr-python v3 incompatibilities in xarray datatrees (#10020)
* fixing compatibility with relative paths in open_store function within open_dtree for zarr
* fixing/refactoring test to be compatible with Zarr-python v3
* adding @requires_zarr_v3 decorator to TestZarrDatatreeIO
* replacing 0 with 1 in _create_test_datatree wich will write a chunk
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixing issues with groups
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixing issue with dict creation
* fixing issues with Mypy
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactoring open_store in ZarrStore class to use Zarr.core.group.Group members
* refactoring datree test for zarr ensuring compatibility with zarr-python v3
* importing zarr.core.group only inside open_store function
* documenting changes in what's-nwe.rst file
* Update xarray/backends/zarr.py
Co-authored-by: Joe Hamman <[email protected]>
* keeping grroup creation compatible with zarr v2
* fixing issue with mypy
* adding root_path equal to '/' when opening group in zarr v3 to avoid ValueError: Consolidated metadata requested with 'use_consolidated=True' but not found in 'path'.
* fixing tests accordingly
* removing print statement
* reverting changes made in unaligned test in zarr
* adding requires_zarr_v3 decorator
* changing max_depth=None in Group.members to get all nested groups
* fixing unaligned test in datrees using zarr
* Update xarray/backends/zarr.py
Co-authored-by: Joe Hamman <[email protected]>
* updating whats-new.rst entry
* remove funny-looking line and refactor to ensure reading consolidated metadata
* parametrize over whether or not we write consolidated metadata
* fix consolidated metadata
* ian hcanges
* open_datatree_specific_group consolidated true works
tom changes
* refactoring
* test: add consolidated parametrize to zarr datatree test
* fix: group finding behavior consolidated
* remove more debugging print statements
* revert changes to test fixture
* formatting
* add decorator to parametrize over zarr formats
* ensure both versions of zarr-python and both versions of zarr-python get tested
* change datatree fixture to not produce values that would be fill_values by default in zarr
* refactor test to make expected behaviour clearer
* fix wrongly expected behaviour - should not expect inherited variable to be written to zarr
* make arrays no longer scalars to dodge #10147
* fix bad merge
* parametrize almost every test over zarr_format
* parametrize encoding test over zarr_formats
* use xfail in encoding test
* updated expected behaviour of zarr on-disk in light of #10147
* fully revert change to simple_datatree test fixture by considered zarr's fill_value in assertion
* parametrize unaligned_zarr test fixture over zarr_format
* move parametrize_over_zarr_format decorator to apply to entire test class
* for now explicitly consolidate metadata in test fixture
* correct bug in writing of consolidated metadata
* delete commented-out lines
* merges from main
* Revert "merges from main"
This reverts commit 22ac9b4.
* fix encodings test for zarr_format=3
* tidy up
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* account for different default value of write_empty_chunks between zarr-python 2 vs 3
* fix expected encoding key for compressor in zarr-python v2
* account for exception type changing
* various typing fixes
* remove outdated comment
* bool type
Co-authored-by: Deepak Cherian <[email protected]>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Joe Hamman <[email protected]>
Co-authored-by: Deepak Cherian <[email protected]>
Co-authored-by: Tom Nicholas <[email protected]>
Co-authored-by: Ian Hunt-Isaak <[email protected]>1 parent 45cc2ee commit f0809e4
File tree
5 files changed
+298
-130
lines changed- doc
- xarray
- backends
- core
- tests
5 files changed
+298
-130
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
669 | 673 | | |
670 | | - | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
671 | 682 | | |
672 | | - | |
| 683 | + | |
673 | 684 | | |
674 | 685 | | |
675 | 686 | | |
| |||
680 | 691 | | |
681 | 692 | | |
682 | 693 | | |
683 | | - | |
| 694 | + | |
684 | 695 | | |
| 696 | + | |
685 | 697 | | |
686 | 698 | | |
687 | 699 | | |
| |||
1034 | 1046 | | |
1035 | 1047 | | |
1036 | 1048 | | |
1037 | | - | |
1038 | | - | |
1039 | 1049 | | |
1040 | 1050 | | |
1041 | 1051 | | |
| |||
1662 | 1672 | | |
1663 | 1673 | | |
1664 | 1674 | | |
1665 | | - | |
1666 | | - | |
1667 | 1675 | | |
1668 | 1676 | | |
1669 | 1677 | | |
| |||
1686 | 1694 | | |
1687 | 1695 | | |
1688 | 1696 | | |
1689 | | - | |
1690 | 1697 | | |
1691 | 1698 | | |
1692 | 1699 | | |
| |||
1762 | 1769 | | |
1763 | 1770 | | |
1764 | 1771 | | |
1765 | | - | |
| 1772 | + | |
| 1773 | + | |
1766 | 1774 | | |
1767 | 1775 | | |
1768 | 1776 | | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
1772 | | - | |
1773 | | - | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1774 | 1786 | | |
1775 | | - | |
1776 | | - | |
1777 | | - | |
1778 | | - | |
1779 | | - | |
1780 | | - | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
1788 | | - | |
1789 | | - | |
1790 | | - | |
1791 | | - | |
1792 | | - | |
1793 | | - | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
1797 | 1816 | | |
1798 | 1817 | | |
1799 | 1818 | | |
1800 | 1819 | | |
1801 | 1820 | | |
1802 | 1821 | | |
| 1822 | + | |
1803 | 1823 | | |
1804 | 1824 | | |
1805 | 1825 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
1741 | 1740 | | |
1742 | 1741 | | |
1743 | 1742 | | |
1744 | | - | |
| 1743 | + | |
1745 | 1744 | | |
1746 | 1745 | | |
1747 | 1746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
168 | 183 | | |
169 | 184 | | |
170 | 185 | | |
| |||
0 commit comments