Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Sep 20, 2024
1 parent 7074c69 commit 85a51d8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ibis/backends/pyspark/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def set_pyspark_database(con, database):


class BaseSparkTestConf(abc.ABC):

Check warning on line 32 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L32

Added line #L32 was not covered by tests
deps = ("pyspark",)

@property
@abc.abstractmethod
def parquet_dir(self) -> str:
Expand Down Expand Up @@ -232,11 +230,12 @@ def _load_data(self, **_: Any) -> None:
if IS_SPARK_REMOTE:

class TestConf(BaseSparkTestConf, ServiceBackendTest):
deps = ("pyspark",)
data_volume = "/data"
service_name = "spark-connect"

Check warning on line 235 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L232-L235

Added lines #L232 - L235 were not covered by tests

@property

Check warning on line 237 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L237

Added line #L237 was not covered by tests
def parquet_dir(self) -> Path:
def parquet_dir(self) -> str:
return self.data_volume

Check warning on line 239 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L239

Added line #L239 was not covered by tests

@property

Check warning on line 241 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L241

Added line #L241 was not covered by tests
Expand All @@ -263,9 +262,11 @@ def write_to_memory(self, expr, table_name):
raise NotImplementedError
else:

class TestConf(BackendTest):
class TestConf(BaseSparkTestConf, BackendTest):
deps = ("pyspark",)

Check warning on line 266 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L265-L266

Added lines #L265 - L266 were not covered by tests

@property

Check warning on line 268 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L268

Added line #L268 was not covered by tests
def parquet_dir(self) -> Path:
def parquet_dir(self) -> str:
return str(self.data_dir / "parquet")

Check warning on line 270 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L270

Added line #L270 was not covered by tests

@staticmethod

Check warning on line 272 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L272

Added line #L272 was not covered by tests
Expand Down Expand Up @@ -305,7 +306,7 @@ def _load_data(self, **_: Any) -> None:
watermark_cols = {"functional_alltypes": "timestamp_col"}

Check warning on line 306 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L306

Added line #L306 was not covered by tests

for name, schema in TEST_TABLES.items():
path = self.data_dir / "parquet" / f"{name}.parquet"
path = str(self.data_dir / "parquet" / f"{name}.parquet")
t = (

Check warning on line 310 in ibis/backends/pyspark/tests/conftest.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/pyspark/tests/conftest.py#L309-L310

Added lines #L309 - L310 were not covered by tests
s.readStream.schema(PySparkSchema.from_ibis(schema))
.parquet(path)
Expand Down

0 comments on commit 85a51d8

Please sign in to comment.