Skip to content

Commit

Permalink
build: remove pandas as dev dep
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperHG90 committed Oct 19, 2024
1 parent 9b6066c commit 599b8cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 62 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dev-dependencies = [
"pre-commit>=3.8.0",
"ipykernel>=6.29.5",
"pytest>=8.3.2",
"pandas>=2.2.2",
"pyright>=1.1.385",
]

Expand Down
20 changes: 10 additions & 10 deletions tests/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,26 +155,26 @@ def test_partitioned_table_reader(
catalog: SqlCatalog, partitioned_table_slice: TableSlice
):
table_ = handler._table_reader(partitioned_table_slice, catalog)
df = table_.to_pandas()
assert df["timestamp"].min() >= dt.datetime(2023, 1, 1, 0)
assert df["timestamp"].max() < dt.datetime(2023, 1, 1, 1)
assert df["category"].unique().tolist() == ["A"]
data_ = table_.to_arrow().to_pydict()
assert min(data_["timestamp"]) >= dt.datetime(2023, 1, 1, 0)
assert max(data_["timestamp"]) < dt.datetime(2023, 1, 1, 1)
assert list(set(data_["category"])) == ["A"]


def test_table_reader(catalog: SqlCatalog, table_slice: TableSlice):
table_ = handler._table_reader(table_slice, catalog)
df = table_.to_pandas()
assert df.shape[0] == 1440
data_ = table_.to_arrow().to_pydict()
assert len(data_["timestamp"]) == 1440


def test_table_reader_with_selected_columns(
catalog: SqlCatalog, table_slice_with_selected_columns: TableSlice
):
table_ = handler._table_reader(table_slice_with_selected_columns, catalog)
df = table_.to_pandas()
assert df.shape[0] == 1440
assert df.shape[1] == 1
assert df.columns == ["value"]
data_ = table_.to_arrow().to_pydict()
assert len(data_["value"]) == 1440
assert len(data_) == 1
assert list(data_.keys()) == ["value"]


@pytest.mark.parametrize(
Expand Down
51 changes: 0 additions & 51 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 599b8cb

Please sign in to comment.