FlowerPower 0.11.3__py3-none-any.whl → 0.11.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -276,7 +276,7 @@ class BaseFileReader(BaseFileIO, gc=False):
276
276
  return df
277
277
 
278
278
  def iter_pandas(
279
- self, batch_size: int = 1, reload: bool = False, **kwargs
279
+ self, reload: bool = False, **kwargs
280
280
  ) -> Generator[pd.DataFrame, None, None]:
281
281
  """Iterate over Pandas DataFrames.
282
282
 
@@ -287,7 +287,10 @@ class BaseFileReader(BaseFileIO, gc=False):
287
287
  Returns:
288
288
  Generator[pd.DataFrame, None, None]: Generator of Pandas DataFrames.
289
289
  """
290
- self._load(batch_size=batch_size, reload=reload, **kwargs)
290
+ if self.batch_size is None and "batch_size" not in kwargs:
291
+ self.batch_size = 1
292
+
293
+ self._load(reload=reload, **kwargs)
291
294
  if isinstance(self._data, list | Generator):
292
295
  for df in self._data:
293
296
  yield df if isinstance(df, pd.DataFrame) else df.to_pandas()
@@ -324,14 +327,17 @@ class BaseFileReader(BaseFileIO, gc=False):
324
327
  return df
325
328
 
326
329
  def _iter_polars_dataframe(
327
- self, batch_size: int = 1, reload: bool = False, **kwargs
330
+ self, reload: bool = False, **kwargs
328
331
  ) -> Generator[pl.DataFrame, None, None]:
329
332
  """Iterate over Polars DataFrames.
330
333
 
331
334
  Returns:
332
335
  Generator[pl.DataFrame, None, None]: Generator of Polars DataFrames.
333
336
  """
334
- self._load(batch_size=batch_size, reload=reload, **kwargs)
337
+ if self.batch_size is None and "batch_size" not in kwargs:
338
+ self.batch_size = 1
339
+
340
+ self._load(reload=reload, **kwargs)
335
341
  if isinstance(self._data, list | Generator):
336
342
  for df in self._data:
337
343
  yield df if isinstance(df, pl.DataFrame) else pl.from_arrow(df)
@@ -361,7 +367,7 @@ class BaseFileReader(BaseFileIO, gc=False):
361
367
  return df
362
368
 
363
369
  def _iter_polars_lazyframe(
364
- self, batch_size: int = 1, reload: bool = False, **kwargs
370
+ self, reload: bool = False, **kwargs
365
371
  ) -> Generator[pl.LazyFrame, None, None]:
366
372
  """Iterate over Polars LazyFrames.
367
373
 
@@ -372,7 +378,9 @@ class BaseFileReader(BaseFileIO, gc=False):
372
378
  Returns:
373
379
  Generator[pl.LazyFrame, None, None]: Generator of Polars LazyFrames.
374
380
  """
375
- self._load(batch_size=batch_size, reload=reload, **kwargs)
381
+ if self.batch_size is None and "batch_size" not in kwargs:
382
+ self.batch_size = 1
383
+ self._load(reload=reload, **kwargs)
376
384
  if isinstance(self._data, list | Generator):
377
385
  for df in self._data:
378
386
  yield (
@@ -420,12 +428,11 @@ class BaseFileReader(BaseFileIO, gc=False):
420
428
  def iter_polars(
421
429
  self,
422
430
  lazy: bool = False,
423
- batch_size: int = 1,
424
431
  **kwargs,
425
432
  ) -> Generator[pl.DataFrame | pl.LazyFrame, None, None]:
426
433
  if lazy:
427
- yield from self._iter_polars_lazyframe(batch_size=batch_size, **kwargs)
428
- yield from self._iter_polars_dataframe(batch_size=batch_size, **kwargs)
434
+ yield from self._iter_polars_lazyframe(**kwargs)
435
+ yield from self._iter_polars_dataframe(**kwargs)
429
436
 
430
437
  def to_pyarrow_table(
431
438
  self, metadata: bool = False, reload: bool = False, **kwargs
@@ -459,14 +466,17 @@ class BaseFileReader(BaseFileIO, gc=False):
459
466
  return df
460
467
 
461
468
  def iter_pyarrow_table(
462
- self, batch_size: int = 1, reload: bool = False, **kwargs
469
+ self, reload: bool = False, **kwargs
463
470
  ) -> Generator[pa.Table, None, None]:
464
471
  """Iterate over PyArrow Tables.
465
472
 
466
473
  Returns:
467
474
  Generator[pa.Table, None, None]: Generator of PyArrow Tables.
468
475
  """
469
- self._load(batch_size=batch_size, reload=reload, **kwargs)
476
+ if self.batch_size is None and "batch_size" not in kwargs:
477
+ self.batch_size = 1
478
+
479
+ self._load(reload=reload, **kwargs)
470
480
  if isinstance(self._data, list | Generator):
471
481
  for df in self._data:
472
482
  yield df.to_arrow(**kwargs) if isinstance(df, pl.DataFrame) else df
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FlowerPower
3
- Version: 0.11.3
3
+ Version: 0.11.4
4
4
  Summary: A simple workflow framework. Hamilton + APScheduler = FlowerPower
5
5
  Author-email: "Volker L." <ligno.blades@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/legout/flowerpower
@@ -44,7 +44,7 @@ flowerpower/pipeline/manager.py,sha256=OMVznuQ0fSI4Jnw7fw0XTYdqYRqioJRC2B2kTxbml
44
44
  flowerpower/pipeline/registry.py,sha256=WWQoaxtgnlntFEIPQzYM1gk0zUXwrH2PmDLGbTzhrZs,18991
45
45
  flowerpower/pipeline/runner.py,sha256=dsSVYixFXqlxFk8EJfT4wV_7IwgkXq0ErwH_yf_NGS8,25654
46
46
  flowerpower/pipeline/visualizer.py,sha256=amjMrl5NetErE198HzZBPWVZBi_t5jj9ydxWpuNLoTI,5013
47
- flowerpower/plugins/io/base.py,sha256=l9bYYtXBYlD1e-eUI11EtoPlfNN-mdHLx4yf2wvgi4Y,78974
47
+ flowerpower/plugins/io/base.py,sha256=GXhJO7jPOGaKHpk_--W-p4ZlVYWBBDQywOtCdakhPuk,79122
48
48
  flowerpower/plugins/io/metadata.py,sha256=31FoVyRz6zdWMWda0f1GHq0xMokVB3SVYrLT2TejOH8,7271
49
49
  flowerpower/plugins/io/helpers/datetime.py,sha256=1WBUg2ywcsodJQwoF6JiIGc9yhVobvE2IErWp4i95m4,10649
50
50
  flowerpower/plugins/io/helpers/polars.py,sha256=VuksokWrsKk57-s5JkpsmzWCkaOIEiI4ONeAIO9LAdw,18071
@@ -93,9 +93,9 @@ flowerpower/utils/monkey.py,sha256=VPl3yimoWhwD9kI05BFsjNvtyQiDyLfY4Q85Bb6Ma0w,2
93
93
  flowerpower/utils/open_telemetry.py,sha256=fQWJWbIQFtKIxMBjAWeF12NGnqT0isO3A3j-DSOv_vE,949
94
94
  flowerpower/utils/scheduler.py,sha256=2zJ_xmLXpvXUQNF1XS2Gqm3Ogo907ctZ50GtvQB_rhE,9354
95
95
  flowerpower/utils/templates.py,sha256=ouyEeSDqa9PjW8c32fGpcINlpC0WToawRFZkMPtwsLE,1591
96
- flowerpower-0.11.3.dist-info/licenses/LICENSE,sha256=9AkLexxrmr0aBgSHiqxpJk9wgazpP1CTJyiDyr56J9k,1063
97
- flowerpower-0.11.3.dist-info/METADATA,sha256=JadCL-DzJIPNeZW39RYIuAZs8Ujm7AEdtEOarv-kF34,21610
98
- flowerpower-0.11.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
99
- flowerpower-0.11.3.dist-info/entry_points.txt,sha256=61X11i5a2IwC9LBiP20XCDl5zMOigGCjMCx17B7bDbQ,52
100
- flowerpower-0.11.3.dist-info/top_level.txt,sha256=VraH4WtEUfSxs5L-rXwDQhzQb9eLHTUtgvmFZ2dAYnA,12
101
- flowerpower-0.11.3.dist-info/RECORD,,
96
+ flowerpower-0.11.4.dist-info/licenses/LICENSE,sha256=9AkLexxrmr0aBgSHiqxpJk9wgazpP1CTJyiDyr56J9k,1063
97
+ flowerpower-0.11.4.dist-info/METADATA,sha256=Cf8dxvh4OWmQM8TmuuaQmlk7re4n1fCZTPeIf-NnS5Y,21610
98
+ flowerpower-0.11.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
99
+ flowerpower-0.11.4.dist-info/entry_points.txt,sha256=61X11i5a2IwC9LBiP20XCDl5zMOigGCjMCx17B7bDbQ,52
100
+ flowerpower-0.11.4.dist-info/top_level.txt,sha256=VraH4WtEUfSxs5L-rXwDQhzQb9eLHTUtgvmFZ2dAYnA,12
101
+ flowerpower-0.11.4.dist-info/RECORD,,