FlowerPower 0.11.5__py3-none-any.whl → 0.11.5.2__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.
flowerpower/fs/base.py CHANGED
@@ -597,15 +597,24 @@ def get_filesystem(
597
597
  ... )
598
598
  """
599
599
  if fs is not None:
600
+ if dirfs:
601
+ base_path = path.split("://")[1]
602
+ if fs.protocol == "dir":
603
+ if base_path != fs.path:
604
+ fs = DirFileSystem(
605
+ path=posixpath.join(
606
+ fs.path, base_path.replace(fs.path, "").lstrip("/")
607
+ ),
608
+ fs=fs.fs,
609
+ )
610
+ else:
611
+ fs = DirFileSystem(path=base_path, fs=fs)
600
612
  if cached:
601
613
  if fs.is_cache_fs:
602
614
  return fs
603
- return MonitoredSimpleCacheFileSystem(fs=fs, cache_storage=cache_storage)
615
+ fs = MonitoredSimpleCacheFileSystem(fs=fs, cache_storage=cache_storage)
604
616
 
605
- if dirfs:
606
- if fs.protocol == "dir":
607
- return fs
608
- return DirFileSystem(path=path, fs=fs)
617
+ return fs
609
618
 
610
619
  pp = infer_storage_options(str(path) if isinstance(path, Path) else path)
611
620
  protocol = (
@@ -630,6 +639,8 @@ def get_filesystem(
630
639
  path = pp.get("path", "").lstrip("/")
631
640
  if len(host) and host not in path:
632
641
  path = posixpath.join(host, path)
642
+ if "." in path:
643
+ path = posixpath.dirname(path)
633
644
 
634
645
  if isinstance(storage_options, dict):
635
646
  storage_options = storage_options_from_dict(protocol, storage_options)
@@ -15,7 +15,6 @@ import pandas as pd
15
15
  import pyarrow as pa
16
16
  import pyarrow.dataset as pds
17
17
  from fsspec import AbstractFileSystem
18
- from fsspec.utils import get_protocol
19
18
  from msgspec import field
20
19
  from pydala.dataset import ParquetDataset
21
20
  from sqlalchemy import create_engine, text
@@ -93,6 +92,7 @@ class BaseFileIO(msgspec.Struct, gc=False):
93
92
  fs=self.fs,
94
93
  dirfs=True,
95
94
  )
95
+
96
96
  self.storage_options = (
97
97
  self.storage_options or self.fs.storage_options
98
98
  if self.protocol != "dir"
@@ -120,11 +120,9 @@ class BaseFileIO(msgspec.Struct, gc=False):
120
120
  @property
121
121
  def _base_path(self) -> str:
122
122
  """Get the base path for the filesystem."""
123
-
124
- path = (
123
+ return (
125
124
  self.path if isinstance(self.path, str) else os.path.commonpath(self.path)
126
125
  )
127
- return path
128
126
 
129
127
  @property
130
128
  def _path(self) -> str | list[str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: FlowerPower
3
- Version: 0.11.5
3
+ Version: 0.11.5.2
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
@@ -17,7 +17,7 @@ flowerpower/cli/mqtt.py,sha256=GM5d6bzG01THZd7SwXFAC3j0cait642eXT50P3R22vk,6281
17
17
  flowerpower/cli/pipeline.py,sha256=60P6u_QOSgp0jJXEMxazEEo5Sh7-SWFo-Kkuaz21YuI,37845
18
18
  flowerpower/cli/utils.py,sha256=nDSSj_1nlYlMmj252kRZeohhFqHv9yvdgDEduQCyWOc,5152
19
19
  flowerpower/fs/__init__.py,sha256=uZaPXErEfQqQRbKRIjkB9yiygd45X5_psYn9-VVrBTQ,910
20
- flowerpower/fs/base.py,sha256=bWfY_xPPZ9DhSpSGMC2SV6OdbYp5XyDrjxLYhTjJlqo,22352
20
+ flowerpower/fs/base.py,sha256=KR0SCNe1hLgibkXZuwlvbYr0K_i947B8kNVCTsUXpXg,22760
21
21
  flowerpower/fs/ext.py,sha256=gsCJ87VxVdy22oVtNRaN4M-SLO8WORVf5JRyDeQjjEs,63834
22
22
  flowerpower/fs/storage_options.py,sha256=msq5TpxAU8tcE_Bxjw6SyxaFa75UjdYnR4-O9U2wmbk,48034
23
23
  flowerpower/job_queue/__init__.py,sha256=a25hIqv2xoFKb4JZlyUukS0ppZ9-2sJKH3XAvbk3rlk,10788
@@ -44,7 +44,7 @@ flowerpower/pipeline/manager.py,sha256=KVpOclUEUAETUNJamJJGuKt3oxCaLitQgxWxkE1q0
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=Plr0v2y0MMf3azxqz7rIc2wk6CXFzpPczW6p5Qb9jiI,79464
47
+ flowerpower/plugins/io/base.py,sha256=wKTHR4qR3iLAlgcj2zorIf8pAQtFD2L0xBi9BO_S99U,79406
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.5.dist-info/licenses/LICENSE,sha256=9AkLexxrmr0aBgSHiqxpJk9wgazpP1CTJyiDyr56J9k,1063
97
- flowerpower-0.11.5.dist-info/METADATA,sha256=Cmyl1IhcjYUTdIrKw_VSGtjclhFUHzIcWlM7yknDL3I,21610
98
- flowerpower-0.11.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
99
- flowerpower-0.11.5.dist-info/entry_points.txt,sha256=61X11i5a2IwC9LBiP20XCDl5zMOigGCjMCx17B7bDbQ,52
100
- flowerpower-0.11.5.dist-info/top_level.txt,sha256=VraH4WtEUfSxs5L-rXwDQhzQb9eLHTUtgvmFZ2dAYnA,12
101
- flowerpower-0.11.5.dist-info/RECORD,,
96
+ flowerpower-0.11.5.2.dist-info/licenses/LICENSE,sha256=9AkLexxrmr0aBgSHiqxpJk9wgazpP1CTJyiDyr56J9k,1063
97
+ flowerpower-0.11.5.2.dist-info/METADATA,sha256=9O2rh6Vp0FxRnGRjArwhESKWxLVo4DeBPBchlb9GlV0,21612
98
+ flowerpower-0.11.5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
99
+ flowerpower-0.11.5.2.dist-info/entry_points.txt,sha256=61X11i5a2IwC9LBiP20XCDl5zMOigGCjMCx17B7bDbQ,52
100
+ flowerpower-0.11.5.2.dist-info/top_level.txt,sha256=VraH4WtEUfSxs5L-rXwDQhzQb9eLHTUtgvmFZ2dAYnA,12
101
+ flowerpower-0.11.5.2.dist-info/RECORD,,