xedocs 0.2.38__py3-none-any.whl → 0.2.40__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.
- xedocs/__init__.py +1 -1
- xedocs/utils.py +25 -7
- {xedocs-0.2.38.dist-info → xedocs-0.2.40.dist-info}/METADATA +1 -1
- {xedocs-0.2.38.dist-info → xedocs-0.2.40.dist-info}/RECORD +7 -7
- {xedocs-0.2.38.dist-info → xedocs-0.2.40.dist-info}/AUTHORS.rst +0 -0
- {xedocs-0.2.38.dist-info → xedocs-0.2.40.dist-info}/WHEEL +0 -0
- {xedocs-0.2.38.dist-info → xedocs-0.2.40.dist-info}/entry_points.txt +0 -0
xedocs/__init__.py
CHANGED
xedocs/utils.py
CHANGED
@@ -135,20 +135,37 @@ class LazyFileAccessor(DataAccessor):
|
|
135
135
|
for path in self.urlpaths:
|
136
136
|
glob_patttern = self.format_to_glob(path)
|
137
137
|
fs, _, fpaths = fsspec.get_fs_token_paths(glob_patttern, storage_options=self.storage_options)
|
138
|
-
|
139
|
-
|
140
|
-
|
138
|
+
|
139
|
+
# Always define original_protocol
|
140
|
+
original_protocol = fs.protocol if fs.protocol else 'file'
|
141
|
+
if isinstance(original_protocol, tuple):
|
142
|
+
original_protocol = original_protocol[0]
|
143
|
+
else:
|
144
|
+
original_protocol = original_protocol
|
145
|
+
|
146
|
+
# Debug prints
|
147
|
+
# print(f"\n[DEBUG]")
|
148
|
+
# print(f"Processing path: {path}")
|
149
|
+
# print(f"fs.protocol: {fs.protocol}")
|
150
|
+
# print(f"Original protocol: {original_protocol}")
|
151
|
+
# print(f"Glob pattern: {glob_patttern}")
|
152
|
+
# print(f"File paths: {fpaths}")
|
153
|
+
|
154
|
+
pattern = path.replace(f"{original_protocol}://", "")
|
141
155
|
pattern = parse.compile(self.glob_to_format(pattern))
|
156
|
+
|
157
|
+
# More debug prints
|
158
|
+
# print(f"Parse pattern: {pattern}")
|
159
|
+
|
142
160
|
loaded = set(ignore_paths)
|
143
|
-
|
161
|
+
|
144
162
|
for fpath in fpaths:
|
145
163
|
if fpath in loaded:
|
146
164
|
continue
|
147
165
|
r = pattern.parse(fpath)
|
148
166
|
if r is None:
|
149
167
|
continue
|
150
|
-
for k,vs in labels.items():
|
151
|
-
|
168
|
+
for k, vs in labels.items():
|
152
169
|
if vs is None:
|
153
170
|
continue
|
154
171
|
if not isinstance(vs, list):
|
@@ -165,10 +182,11 @@ class LazyFileAccessor(DataAccessor):
|
|
165
182
|
if label not in vs:
|
166
183
|
break
|
167
184
|
else:
|
168
|
-
records = read_files(fpath, protocol=
|
185
|
+
records = read_files(fpath, protocol=original_protocol, **fs.storage_options)
|
169
186
|
yield fpath, records
|
170
187
|
self.loaded.add(fpath)
|
171
188
|
|
189
|
+
|
172
190
|
def load_files(self, **labels):
|
173
191
|
index_fields = list(self.schema.get_index_fields())
|
174
192
|
if len(index_fields) == 1:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
xedocs/__init__.py,sha256=
|
1
|
+
xedocs/__init__.py,sha256=HDkUXIoZjRx_ewsKLZj4S9ahhAndgS36xXZBkKNr-MI,1054
|
2
2
|
xedocs/_settings.py,sha256=_Fjj5XJBHBrN6N1Dqs_JzovbEcF6--5BGnAggK1ksck,4199
|
3
3
|
xedocs/_straxen_plugin.py,sha256=bxKWkVDNCS0Mah_GGNEvE8TCk-ibrY8xJbO0UMvfajM,1904
|
4
4
|
xedocs/cli.py,sha256=1oZXa4Iqs-ANRTABZP8K6e3oSIatKnJNhQ1DZ4rsNrc,3493
|
@@ -78,12 +78,12 @@ xedocs/schemas/pmt_data/pmt_installs.py,sha256=zVz04RbVvS9DpnM6kp8Ql14g1aOtRsqWA
|
|
78
78
|
xedocs/schemas/pmt_data/pmts.py,sha256=VTDpDPz0HdTlfkPypN6CFjmuxEUNJj0-cC6uqRRuXZs,271
|
79
79
|
xedocs/schemas/pmt_data/voltage_changes.py,sha256=ieTNCSoE4A3VHrWZ3Hk5HN_q5Nrwu04jwqji7bgbJto,428
|
80
80
|
xedocs/schemas/pmt_data/voltage_settings.py,sha256=L2cScDQNviWgAlWvMRjnIEgsP0urVg0gYWAxK3FrFPc,428
|
81
|
-
xedocs/utils.py,sha256=
|
81
|
+
xedocs/utils.py,sha256=e0Y57LrjbQ7qbWChyQgX2QV5TJZ276u8Ne7Clzg7Hl4,9063
|
82
82
|
xedocs/widgets.py,sha256=l2pgQaWqycZQF5pF6eEeLuHdqjVBkJ8OB-o-mcivMl4,28810
|
83
83
|
xedocs/xedocs.py,sha256=Dk-ld5X6qB6hrp40svDkJX_9K0MKkZTxal-fLVQpIz8,6949
|
84
84
|
xedocs/xenon_config.py,sha256=QQlg2icofZWq_UAh5kDSuViai0uP_3ClozNNv6mpx3s,2674
|
85
|
-
xedocs-0.2.
|
86
|
-
xedocs-0.2.
|
87
|
-
xedocs-0.2.
|
88
|
-
xedocs-0.2.
|
89
|
-
xedocs-0.2.
|
85
|
+
xedocs-0.2.40.dist-info/AUTHORS.rst,sha256=7XNtvXT_irnC5nzau-Al_VVmmhk8EgW811pPs8OXgBo,164
|
86
|
+
xedocs-0.2.40.dist-info/METADATA,sha256=SHSsonvUHfrRJqoiv7xsDuvQnAqaqaRYeD2cpbOGFPI,5827
|
87
|
+
xedocs-0.2.40.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
88
|
+
xedocs-0.2.40.dist-info/entry_points.txt,sha256=AfKuejqaCB-nA4rYbuWtMcR0d-t4nNzrM3s8V_e7YSk,92
|
89
|
+
xedocs-0.2.40.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|