Skip to content

Commit b9d9d26

Browse files
committed
clean up
1 parent d0d8e00 commit b9d9d26

1 file changed

Lines changed: 29 additions & 29 deletions

File tree

src/valor_lite/cache.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -225,35 +225,6 @@ def __init__(
225225
self._buffer = []
226226
self._count = 0
227227

228-
@property
229-
def schema(self) -> pa.Schema:
230-
"""Cache schema."""
231-
return self._schema
232-
233-
@property
234-
def dataset(self) -> ds.Dataset:
235-
"""Cache dataset."""
236-
return ds.dataset(
237-
self._path,
238-
format="parquet",
239-
schema=self.schema,
240-
)
241-
242-
@property
243-
def batch_size(self) -> int:
244-
"""Batch size for writes."""
245-
return self._batch_size
246-
247-
@property
248-
def rows_per_file(self) -> int:
249-
"""Target number of rows per file."""
250-
return self._rows_per_file
251-
252-
@property
253-
def compression(self) -> str:
254-
"""File compression method."""
255-
return self._compression
256-
257228
@classmethod
258229
def create(
259230
cls,
@@ -349,6 +320,35 @@ def delete(cls, path: str | Path):
349320
# delete empty cache directory
350321
path.rmdir()
351322

323+
@property
324+
def dataset(self) -> ds.Dataset:
325+
"""Cache dataset."""
326+
return ds.dataset(
327+
self._path,
328+
format="parquet",
329+
schema=self.schema,
330+
)
331+
332+
@property
333+
def schema(self) -> pa.Schema:
334+
"""Cache schema."""
335+
return self._schema
336+
337+
@property
338+
def batch_size(self) -> int:
339+
"""Batch size for writes."""
340+
return self._batch_size
341+
342+
@property
343+
def rows_per_file(self) -> int:
344+
"""Target number of rows per file."""
345+
return self._rows_per_file
346+
347+
@property
348+
def compression(self) -> str:
349+
"""File compression method."""
350+
return self._compression
351+
352352
def write_rows(
353353
self,
354354
rows: list[dict[str, Any]],

0 commit comments

Comments
 (0)