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

fix: remove unnecessary pyarrow import in testutils #365

Merged
Merged
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
5 changes: 0 additions & 5 deletions src/dask_awkward/lib/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import awkward as ak
import numpy as np
import pyarrow as pa
from dask.base import is_dask_collection
from packaging.version import Version

Expand All @@ -22,10 +21,6 @@
AK_LTE_2_2_3 = Version(ak.__version__) <= Version("2.2.3")
BAD_NP_AK_MIXIN_VERSIONING = NP_GTE_1_25_0 and AK_LTE_2_2_3

AK_LTE_2_3_3 = Version(ak.__version__) <= Version("2.3.3")
PA_GTE_3_0_0 = Version(pa.__version__) >= Version("13.0.0")
BAD_PA_AK_PARQUET_VERSIONING = AK_LTE_2_3_3 and PA_GTE_3_0_0


def assert_eq(
a: Any,
Expand Down
7 changes: 1 addition & 6 deletions tests/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import dask_awkward as dak
from dask_awkward.lib.io.parquet import _metadata_file_from_data_files, to_parquet
from dask_awkward.lib.testutils import BAD_PA_AK_PARQUET_VERSIONING, assert_eq
from dask_awkward.lib.testutils import assert_eq

data = [[1, 2, 3], [4, None], None]
arr = pa.array(data)
Expand Down Expand Up @@ -74,7 +74,6 @@ def test_remote_double(ignore_metadata, scan_files, split_row_groups):
)


@pytest.mark.xfail(BAD_PA_AK_PARQUET_VERSIONING, reason="parquet item vs element")
@pytest.mark.parametrize("ignore_metadata", [True, False])
@pytest.mark.parametrize("scan_files", [True, False])
def test_dir_of_one_file(tmpdir, ignore_metadata, scan_files):
Expand All @@ -85,7 +84,6 @@ def test_dir_of_one_file(tmpdir, ignore_metadata, scan_files):
assert arr["arr"].compute().to_list() == data


@pytest.mark.xfail(BAD_PA_AK_PARQUET_VERSIONING, reason="parquet item vs element")
@pytest.mark.parametrize("ignore_metadata", [True, False])
@pytest.mark.parametrize("scan_files", [True, False])
def test_dir_of_one_file_metadata(tmpdir, ignore_metadata, scan_files):
Expand All @@ -100,7 +98,6 @@ def test_dir_of_one_file_metadata(tmpdir, ignore_metadata, scan_files):
assert arr["arr"].compute().to_list() == data


@pytest.mark.xfail(BAD_PA_AK_PARQUET_VERSIONING, reason="parquet item vs element")
@pytest.mark.parametrize("ignore_metadata", [True, False])
@pytest.mark.parametrize("scan_files", [True, False])
def test_dir_of_two_files(tmpdir, ignore_metadata, scan_files):
Expand All @@ -114,7 +111,6 @@ def test_dir_of_two_files(tmpdir, ignore_metadata, scan_files):
assert arr["arr"].compute().to_list() == data * 2


@pytest.mark.xfail(BAD_PA_AK_PARQUET_VERSIONING, reason="parquet item vs element")
@pytest.mark.parametrize("ignore_metadata", [True, False])
@pytest.mark.parametrize("scan_files", [True, False])
def test_dir_of_two_files_metadata(tmpdir, ignore_metadata, scan_files):
Expand All @@ -130,7 +126,6 @@ def test_dir_of_two_files_metadata(tmpdir, ignore_metadata, scan_files):
assert arr["arr"].compute().to_list() == data * 2


@pytest.mark.xfail(BAD_PA_AK_PARQUET_VERSIONING, reason="parquet item vs element")
def test_columns(tmpdir):
tmpdir = str(tmpdir)
pad.write_dataset(ds_deep, tmpdir, format="parquet")
Expand Down