synapse-sdk 1.0.0b5__py3-none-any.whl → 1.0.0b6__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.
Potentially problematic release.
This version of synapse-sdk might be problematic. Click here for more details.
- synapse_sdk/plugins/categories/export/actions/export.py +7 -3
- {synapse_sdk-1.0.0b5.dist-info → synapse_sdk-1.0.0b6.dist-info}/METADATA +1 -1
- {synapse_sdk-1.0.0b5.dist-info → synapse_sdk-1.0.0b6.dist-info}/RECORD +7 -7
- {synapse_sdk-1.0.0b5.dist-info → synapse_sdk-1.0.0b6.dist-info}/WHEEL +0 -0
- {synapse_sdk-1.0.0b5.dist-info → synapse_sdk-1.0.0b6.dist-info}/entry_points.txt +0 -0
- {synapse_sdk-1.0.0b5.dist-info → synapse_sdk-1.0.0b6.dist-info}/licenses/LICENSE +0 -0
- {synapse_sdk-1.0.0b5.dist-info → synapse_sdk-1.0.0b6.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
from abc import ABC, abstractmethod
|
|
3
3
|
from datetime import datetime
|
|
4
|
+
from itertools import tee
|
|
4
5
|
from typing import Annotated, Any, Literal
|
|
5
6
|
|
|
6
7
|
from pydantic import AfterValidator, BaseModel, field_validator
|
|
@@ -324,16 +325,18 @@ class ExportAction(Action):
|
|
|
324
325
|
handler = TargetHandlerFactory.get_handler(target)
|
|
325
326
|
|
|
326
327
|
self.params['results'], self.params['count'] = self.get_filtered_results(filters, handler)
|
|
327
|
-
export_items = handler.get_export_item(self.params['results'])
|
|
328
328
|
|
|
329
329
|
# For the 'ground_truth' target, retrieve project information from the first result and add configuration
|
|
330
330
|
if target == 'ground_truth':
|
|
331
331
|
try:
|
|
332
|
-
|
|
332
|
+
# Split generator into two using tee()
|
|
333
|
+
peek_iter, main_iter = tee(self.params['results'])
|
|
334
|
+
first_result = next(peek_iter) # Peek first value only
|
|
333
335
|
project_pk = first_result['project']
|
|
334
336
|
project_info = self.client.get_project(project_pk)
|
|
335
337
|
self.params['configuration'] = project_info.get('configuration', {})
|
|
336
|
-
|
|
338
|
+
self.params['results'] = main_iter # Keep original generator intact
|
|
339
|
+
except (StopIteration, KeyError):
|
|
337
340
|
self.params['configuration'] = {}
|
|
338
341
|
# For the 'assignment' and 'task' targets, retrieve the project from the filter as before
|
|
339
342
|
elif target in ['assignment', 'task'] and 'project' in self.params['filter']:
|
|
@@ -341,6 +344,7 @@ class ExportAction(Action):
|
|
|
341
344
|
project_info = self.client.get_project(project_pk)
|
|
342
345
|
self.params['configuration'] = project_info.get('configuration', {})
|
|
343
346
|
|
|
347
|
+
export_items = handler.get_export_item(self.params['results'])
|
|
344
348
|
storage = self.client.get_storage(self.params['storage'])
|
|
345
349
|
pathlib_cwd = get_pathlib(storage, self.params['path'])
|
|
346
350
|
return self.entrypoint(self.run, export_items, pathlib_cwd, **self.params)
|
|
@@ -113,7 +113,7 @@ synapse_sdk/plugins/categories/data_validation/templates/plugin/validation.py,sh
|
|
|
113
113
|
synapse_sdk/plugins/categories/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
114
|
synapse_sdk/plugins/categories/export/enums.py,sha256=gtyngvQ1DKkos9iKGcbecwTVQQ6sDwbrBPSGPNb5Am0,127
|
|
115
115
|
synapse_sdk/plugins/categories/export/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
116
|
-
synapse_sdk/plugins/categories/export/actions/export.py,sha256=
|
|
116
|
+
synapse_sdk/plugins/categories/export/actions/export.py,sha256=XxhFIebt9tGTNcj0N6guVhAPP4d2YZ5Lvsx22-va72Y,12263
|
|
117
117
|
synapse_sdk/plugins/categories/export/templates/config.yaml,sha256=N7YmnFROb3s3M35SA9nmabyzoSb5O2t2TRPicwFNN2o,56
|
|
118
118
|
synapse_sdk/plugins/categories/export/templates/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
119
119
|
synapse_sdk/plugins/categories/export/templates/plugin/export.py,sha256=GDb6Ucodsr5aBPMU4alr68-DyFoLR5TyhC_MCaJrkF0,6411
|
|
@@ -211,9 +211,9 @@ synapse_sdk/utils/storage/providers/gcp.py,sha256=i2BQCu1Kej1If9SuNr2_lEyTcr5M_n
|
|
|
211
211
|
synapse_sdk/utils/storage/providers/http.py,sha256=2DhIulND47JOnS5ZY7MZUex7Su3peAPksGo1Wwg07L4,5828
|
|
212
212
|
synapse_sdk/utils/storage/providers/s3.py,sha256=ZmqekAvIgcQBdRU-QVJYv1Rlp6VHfXwtbtjTSphua94,2573
|
|
213
213
|
synapse_sdk/utils/storage/providers/sftp.py,sha256=_8s9hf0JXIO21gvm-JVS00FbLsbtvly4c-ETLRax68A,1426
|
|
214
|
-
synapse_sdk-1.0.
|
|
215
|
-
synapse_sdk-1.0.
|
|
216
|
-
synapse_sdk-1.0.
|
|
217
|
-
synapse_sdk-1.0.
|
|
218
|
-
synapse_sdk-1.0.
|
|
219
|
-
synapse_sdk-1.0.
|
|
214
|
+
synapse_sdk-1.0.0b6.dist-info/licenses/LICENSE,sha256=bKzmC5YAg4V1Fhl8OO_tqY8j62hgdncAkN7VrdjmrGk,1101
|
|
215
|
+
synapse_sdk-1.0.0b6.dist-info/METADATA,sha256=mU8-WwXY45NYGlXdk_mS1P9P8Ip21Q_9RqLZ9joe9hc,3718
|
|
216
|
+
synapse_sdk-1.0.0b6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
217
|
+
synapse_sdk-1.0.0b6.dist-info/entry_points.txt,sha256=VNptJoGoNJI8yLXfBmhgUefMsmGI0m3-0YoMvrOgbxo,48
|
|
218
|
+
synapse_sdk-1.0.0b6.dist-info/top_level.txt,sha256=ytgJMRK1slVOKUpgcw3LEyHHP7S34J6n_gJzdkcSsw8,12
|
|
219
|
+
synapse_sdk-1.0.0b6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|