Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies = [
"natsort>=5.5.0",
"matplotlib>=3.1.1,!=3.3.0,!=3.3.1,!=3.3.2",
"animatplot-ng>=0.4.2",
"netcdf4>=1.4.0",
"h5netcdf",
"Pillow>=6.1.0",
]

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dask[array]>=2.10.0
natsort>=5.5.0
matplotlib>=3.1.1,!=3.3.0,!=3.3.1,!=3.3.2
animatplot>=0.4.2
netcdf4>=1.4.0
h5netcdf
Pillow>=6.1.0

# Not required for Python>=3.8, but included because conda does not support
Expand Down
2 changes: 1 addition & 1 deletion xbout/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def create_example_grid_file_fci(tmp_path_factory):

# Save
filepath = save_dir.joinpath("fci.nc")
grid.to_netcdf(filepath, engine="netcdf4")
grid.to_netcdf(filepath, engine="h5netcdf")

return filepath

Expand Down
4 changes: 2 additions & 2 deletions xbout/tests/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create_example_grid_file(tmp_path_factory):

# Save
filepath = save_dir.joinpath("grid.nc")
grid.to_netcdf(filepath, engine="netcdf4")
grid.to_netcdf(filepath, engine="h5netcdf")

return filepath

Expand All @@ -52,7 +52,7 @@ def test_open_grid_extra_dims(self, create_example_grid_file, tmp_path_factory):

dodgy_grid_directory = tmp_path_factory.mktemp("dodgy_grid")
dodgy_grid_path = dodgy_grid_directory.joinpath("dodgy_grid.nc")
merge([example_grid, new_var]).to_netcdf(dodgy_grid_path, engine="netcdf4")
merge([example_grid, new_var]).to_netcdf(dodgy_grid_path, engine="h5netcdf")

with pytest.warns(
UserWarning, match="drop all variables containing " "the dimensions 'w'"
Expand Down
2 changes: 1 addition & 1 deletion xbout/tests/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_check_extensions(tmp_path):
example_nc_file.write_text("content_nc")

filetype = _check_filetype(example_nc_file)
assert filetype == "netcdf4"
assert filetype == "h5netcdf"

example_hdf5_file = files_dir.joinpath("example.h5netcdf")
example_hdf5_file.write_text("content_hdf5")
Expand Down
2 changes: 1 addition & 1 deletion xbout/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _add_attrs_to_var(ds, varname, copy=False):

def _check_filetype(path):
if path.suffix == ".nc":
filetype = "netcdf4"
filetype = "h5netcdf"
elif path.suffix == ".h5netcdf":
filetype = "h5netcdf"
elif path.suffix == ".bp":
Expand Down
4 changes: 2 additions & 2 deletions xbout/xarraybackend.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""License:
Distributed under the OSI-approved Apache License, Version 2.0. See
accompanying file Copyright.txt for details.
Distributed under the OSI-approved Apache License, Version 2.0. See
accompanying file Copyright.txt for details.
"""

from __future__ import annotations
Expand Down
Loading