Skip to content

Commit

Permalink
Revert "Vendor kerchunk netCDF3 reader (#397)"
Browse files Browse the repository at this point in the history
This reverts commit 95fce11.
  • Loading branch information
maxrjones committed Jan 30, 2025
1 parent 81a76f0 commit f9eb470
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 456 deletions.
2 changes: 0 additions & 2 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ Documentation
Internal Changes
~~~~~~~~~~~~~~~~

- Vendor netCDF3 reader from kerchunk. (:pull:`397`) By `Tom Nicholas <https://github.com/TomNicholas>`_.

.. _v1.2.0:

v1.2.0 (5th Dec 2024)
Expand Down
5 changes: 1 addition & 4 deletions virtualizarr/readers/netcdf3.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def open_virtual_dataset(
virtual_backend_kwargs: Optional[dict] = None,
reader_options: Optional[dict] = None,
) -> Dataset:
from virtualizarr.vendor.kerchunk.netCDF3 import NetCDF3ToZarr
from kerchunk.netCDF3 import NetCDF3ToZarr

if virtual_backend_kwargs:
raise NotImplementedError(
Expand All @@ -38,9 +38,6 @@ def open_virtual_dataset(
loadable_variables,
)

if reader_options is None:
reader_options = {}

refs = NetCDF3ToZarr(filepath, inline_threshold=0, **reader_options).translate()

# both group=None and group='' mean to read root group
Expand Down
11 changes: 0 additions & 11 deletions virtualizarr/tests/test_readers/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pathlib
import warnings

import h5py # type: ignore
Expand Down Expand Up @@ -323,13 +322,3 @@ def root_coordinates_hdf5_file(tmpdir, np_uncompressed_int16):
f.create_dataset(name="lon", data=data)
f.attrs.create(name="coordinates", data="lat lon")
return filepath


@pytest.fixture
def netcdf3_file(tmp_path: pathlib.Path) -> pathlib.Path:
ds = xr.Dataset({"foo": ("x", np.array([1, 2, 3]))})

filepath = tmp_path / "file.nc"
ds.to_netcdf(filepath, format="NETCDF3_CLASSIC")

return filepath
30 changes: 0 additions & 30 deletions virtualizarr/tests/test_readers/test_netcdf3.py

This file was deleted.

21 changes: 0 additions & 21 deletions virtualizarr/vendor/kerchunk/LICENSE.txt

This file was deleted.

Empty file.
Loading

0 comments on commit f9eb470

Please sign in to comment.