Skip to content

Commit

Permalink
dependency groups for polars and pyarrow
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidcarbon authored Nov 12, 2024
1 parent 94a4e6b commit 22073f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ dependencies = [
dev = [
"pytest>=8",
]
polars = [
"polars>=1",
]
pyarrow = [
"pyarrow>=17",
]

[tool.hatch.build]
include = [
Expand Down
4 changes: 2 additions & 2 deletions test_affinity.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ class aDataset(af.Dataset):
assert (data_a_sql_df.values == data_a.df.values).all()


@pytest.mark.skipif(NO_POLARS, reason="polars is not installed")
def test_sql_join():
class aDataset(af.Dataset):
v1 = af.VectorI8("")
Expand All @@ -307,7 +306,7 @@ class bDataset(af.Dataset):
v3 = af.VectorObject("")

data_b = bDataset(v1=[1, 3], v3=["foo", "moo"])
joined = data_a.sql("FROM df JOIN dfb USING (v1)", dfb=data_b.pl)
joined = data_a.sql("FROM df JOIN dfb USING (v1)", dfb=data_b.df)
assert joined.fetchone() == (1, True, "foo")


Expand All @@ -320,6 +319,7 @@ class cDataset(af.Dataset):
cDataset().sql("SELECT v2 FROM df") # "df" != last test's data_a.df


@pytest.mark.skipif(NO_POLARS, reason="polars is not installed")
@pytest.mark.skipif(NO_PYARROW, reason="pyarrow is not installed")
def test_to_parquet_with_metadata():
class aDataset(af.Dataset):
Expand Down

0 comments on commit 22073f3

Please sign in to comment.