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

Adding open_groups to BackendEntryPointEngine, NetCDF4BackendEntrypoint, and H5netcdfBackendEntrypoint #9243

Merged
merged 33 commits into from
Aug 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
33ee4a9
sandbox open groups
eni-awowale Jul 13, 2024
8186d86
rough implementation of open_groups
eni-awowale Jul 13, 2024
6b63704
removed unused imports
eni-awowale Jul 13, 2024
ef01edc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 13, 2024
08e230a
oops deleted optional
eni-awowale Jul 13, 2024
e01b0fb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 13, 2024
9e1984c
commit to test from main
eni-awowale Jul 26, 2024
33a71ac
added tests and small sample file
eni-awowale Jul 30, 2024
b10fa10
merge main into open_groups
eni-awowale Jul 30, 2024
565ffb1
updated what is new
eni-awowale Jul 30, 2024
ce607e6
updated: open_groups to include fullpath of group, improved test to c…
eni-awowale Jul 30, 2024
eaba908
update float_ to float64 for numpy 2.0
eni-awowale Jul 30, 2024
b4b9822
added pr suggestions and mypy changes
eni-awowale Aug 2, 2024
9b9c1e7
merge conflict plugins.py
eni-awowale Aug 6, 2024
225489d
Merge branch 'main' into open_groups
eni-awowale Aug 6, 2024
5fe8e96
added mutable mapping
eni-awowale Aug 6, 2024
3b9c418
added mutable mapping to api
eni-awowale Aug 6, 2024
222279c
lets see if this passes mypy
eni-awowale Aug 7, 2024
4c65b0a
mypy take 2
eni-awowale Aug 7, 2024
8c81a87
mypy
eni-awowale Aug 7, 2024
d2c74d6
updated open_groups_dict
eni-awowale Aug 8, 2024
f206408
changed return type for DataTree.from_dict
eni-awowale Aug 8, 2024
5d34920
Merge branch 'main' into open_groups
eni-awowale Aug 8, 2024
f72f3d2
fix test failures
eni-awowale Aug 8, 2024
2f92b5c
update iter_nc_ to yield parent
eni-awowale Aug 8, 2024
175e287
Merge branch 'main' into open_groups
eni-awowale Aug 13, 2024
6319678
mypy suggestions
eni-awowale Aug 13, 2024
1466147
adding casting
eni-awowale Aug 13, 2024
0e3c946
explicitly convert to dict
eni-awowale Aug 13, 2024
1ffeae5
Merge branch 'main' into open_groups
dcherian Aug 14, 2024
abd4981
Merge branch 'main' into open_groups
eni-awowale Aug 14, 2024
d44bf98
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 14, 2024
b2cf9b4
updated to add d_cast for remaining functions
eni-awowale Aug 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update float_ to float64 for numpy 2.0
  • Loading branch information
eni-awowale committed Jul 30, 2024
commit eaba90851b6a5d04a415a4959ee3873bddb5fa79
18 changes: 9 additions & 9 deletions xarray/tests/test_backends_datatree.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ def test_open_datatree(self, tmpdir):

root_group.createDimension("lat", 1)
root_group.createDimension("lon", 2)
root_group.createVariable("root_variable", np.float_, ("lat", "lon"))
root_group.createVariable("root_variable", np.float64, ("lat", "lon"))

group_1_var = group_1.createVariable(
"group_1_var", np.float_, ("lat", "lon")
"group_1_var", np.float64, ("lat", "lon")
)
group_1_var[:] = np.array([[0.1, 0.2]])
group_1_var.units = "K"
Expand All @@ -106,7 +106,7 @@ def test_open_datatree(self, tmpdir):
subgroup_1.createDimension("lat", 2)

subgroup1_var = subgroup_1.createVariable(
"subgroup1_var", np.float_, ("lat", "lon")
"subgroup1_var", np.float64, ("lat", "lon")
)
subgroup1_var[:] = np.array([[0.1, 0.2]])
with pytest.raises(ValueError):
Expand Down Expand Up @@ -137,10 +137,10 @@ def test_open_groups(self, tmpdir):

root_group.createDimension("lat", 1)
root_group.createDimension("lon", 2)
root_group.createVariable("root_variable", np.float_, ("lat", "lon"))
root_group.createVariable("root_variable", np.float64, ("lat", "lon"))

group_1_var = group_1.createVariable(
"group_1_var", np.float_, ("lat", "lon")
"group_1_var", np.float64, ("lat", "lon")
)
group_1_var[:] = np.array([[0.1, 0.2]])
group_1_var.units = "K"
Expand All @@ -149,7 +149,7 @@ def test_open_groups(self, tmpdir):
subgroup_1.createDimension("lat", 2)

subgroup1_var = subgroup_1.createVariable(
"subgroup1_var", np.float_, ("lat", "lon")
"subgroup1_var", np.float64, ("lat", "lon")
)
subgroup1_var[:] = np.array([[0.1, 0.2]])

Expand Down Expand Up @@ -195,17 +195,17 @@ def test_open_groups_to_dict(self, tmpdir):

root_group.createDimension("lat", 1)
root_group.createDimension("lon", 2)
root_group.createVariable("root_variable", np.float_, ("lat", "lon"))
root_group.createVariable("root_variable", np.float64, ("lat", "lon"))

group_1_var = group_1.createVariable(
"group_1_var", np.float_, ("lat", "lon")
"group_1_var", np.float64, ("lat", "lon")
)
group_1_var[:] = np.array([[0.1, 0.2]])
group_1_var.units = "K"
group_1_var.long_name = "air_temperature"

subgroup1_var = subgroup_1.createVariable(
"subgroup1_var", np.float_, ("lat", "lon")
"subgroup1_var", np.float64, ("lat", "lon")
)
subgroup1_var[:] = np.array([[0.1, 0.2]])

Expand Down
Loading