Skip to content

Commit

Permalink
Merge branch 'develop' into feature/refactor-streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
sandorkertesz committed May 13, 2024
2 parents a3d3f84 + e873e96 commit da2c30e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/earthkit/data/readers/grib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _is_default(magic, content_type):

def reader(source, path, *, magic=None, deeper_check=False, parts=None, **kwargs):
if _match_magic(magic, deeper_check):
from .reader import GRIBReader
from .file import GRIBReader

return GRIBReader(source, path, parts=parts)

Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions tests/readers/test_csv_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_csv_1():

ds = s.to_xarray()
assert len(ds) == 3
assert list(ds.variables) == ["index", "a", "b", "c"]
assert set(ds.variables) == set(["index", "a", "b", "c"])


def test_csv_2():
Expand All @@ -51,7 +51,7 @@ def test_csv_2():

df = s.to_pandas()
assert len(df) == 3
assert list(df.columns) == ["a", "b", "c"]
assert set(df.columns) == set(["a", "b", "c"])


def test_csv_3():
Expand All @@ -68,7 +68,7 @@ def test_csv_3():

df = s.to_pandas()
assert len(df) == 3
assert list(df.columns) == ["a", "b", "c"]
assert set(df.columns) == set(["a", "b", "c"])


def test_csv_4():
Expand All @@ -86,7 +86,7 @@ def test_csv_4():

df = s.to_pandas()
assert len(df) == 3
assert list(df.columns) == ["a", "b", "c"]
assert set(df.columns) == set(["a", "b", "c"])


def test_csv_5():
Expand Down Expand Up @@ -141,7 +141,7 @@ def test_csv_text_file():

df = s.to_pandas()
assert len(df) == 3
assert list(df.columns) == ["a", "b", "c"]
assert set(df.columns) == set(["a", "b", "c"])


def test_csv_with_comment():
Expand All @@ -160,11 +160,11 @@ def test_csv_with_comment():

df = s.to_pandas()
assert len(df) == 3
assert list(df.columns) == ["a", "b", "c"]
assert set(df.columns) == set(["a", "b", "c"])

ds = s.to_xarray()
assert len(ds) == 3
assert list(ds.variables) == ["index", "a", "b", "c"]
assert set(ds.variables) == set(["index", "a", "b", "c"])


def test_csv_mimetypes():
Expand Down
3 changes: 2 additions & 1 deletion tests/sources/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@


def test_file_source_grib():
from earthkit.data.readers.grib.file import GRIBReader

s = from_source("file", earthkit_examples_file("test.grib"))
from earthkit.data.readers.grib.reader import GRIBReader

assert isinstance(s, GRIBReader), s
assert len(s) == 2
Expand Down

0 comments on commit da2c30e

Please sign in to comment.