Skip to content

Commit

Permalink
chore: clean
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperHG90 committed Oct 19, 2024
1 parent f2fdcd6 commit 004d8a5
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions tests/dagster_pyiceberg_pandas/conftest.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,7 @@
import datetime as dt
import random

import pyarrow as pa
import pytest

# from pyiceberg import table as iceberg_table
# from pyiceberg import transforms as T
# from pyiceberg.catalog.sql import SqlCatalog


@pytest.fixture(scope="session", autouse=True)
def warehouse_path(tmp_path_factory) -> str:
dir_ = tmp_path_factory.mktemp("warehouse")
return str(dir_.resolve())


@pytest.fixture(scope="session")
def data() -> pa.Table:
random.seed(876)
N = 1440
d = {
"timestamp": pa.array(
[
dt.datetime(2023, 1, 1, 0, 0, 0) + dt.timedelta(minutes=i)
for i in range(N)
]
),
"category": pa.array([random.choice(["A", "B", "C"]) for _ in range(N)]),
"value": pa.array(random.uniform(0, 1) for _ in range(N)),
}
return pa.Table.from_pydict(d)


@pytest.fixture(scope="session")
def schema(data: pa.Table) -> pa.Schema:
return data.schema

0 comments on commit 004d8a5

Please sign in to comment.