Skip to content

Commit

Permalink
Change xarray requirements
Browse files Browse the repository at this point in the history
xarray==0.20.0 does not recognize backend. See also pydata/xarray#5930
  • Loading branch information
ashwinvis committed Nov 3, 2021
1 parent c3fd328 commit 6260131
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers =
python_requires = >= 3.7
packages = find:
install_requires =
xarray >= 0.15
xarray >= 0.19.0, != 0.20.0
pydantic >= 1.8.1

setup_requires =
Expand Down
8 changes: 7 additions & 1 deletion tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ def test_nek_ext_regex():
assert pattern.match("case0.f12345")


def test_xarray_backend(test_data_dir):
def test_xarray_plugin_entrypoint():
plugins = xr.backends.plugins
assert "pymech" in plugins.list_engines()
assert plugins.get_backend("pymech")


def test_xarray_open_dataset(test_data_dir):
# With engine explicitly mentioned
xr.open_dataset(f"{test_data_dir}/nek/channel3D_0.f00001", engine="pymech")

Expand Down

0 comments on commit 6260131

Please sign in to comment.