synapse-sdk 1.0.0a95__py3-none-any.whl → 1.0.0a96__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/upload/actions/upload.py +16 -1
- {synapse_sdk-1.0.0a95.dist-info → synapse_sdk-1.0.0a96.dist-info}/METADATA +1 -1
- {synapse_sdk-1.0.0a95.dist-info → synapse_sdk-1.0.0a96.dist-info}/RECORD +7 -7
- {synapse_sdk-1.0.0a95.dist-info → synapse_sdk-1.0.0a96.dist-info}/WHEEL +0 -0
- {synapse_sdk-1.0.0a95.dist-info → synapse_sdk-1.0.0a96.dist-info}/entry_points.txt +0 -0
- {synapse_sdk-1.0.0a95.dist-info → synapse_sdk-1.0.0a96.dist-info}/licenses/LICENSE +0 -0
- {synapse_sdk-1.0.0a95.dist-info → synapse_sdk-1.0.0a96.dist-info}/top_level.txt +0 -0
|
@@ -24,6 +24,20 @@ from synapse_sdk.utils.pydantic.validators import non_blank
|
|
|
24
24
|
from synapse_sdk.utils.storage import get_pathlib
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
class PathAwareJSONEncoder(json.JSONEncoder):
|
|
28
|
+
"""Custom JSON encoder that handles Path-like objects."""
|
|
29
|
+
|
|
30
|
+
def default(self, obj):
|
|
31
|
+
if hasattr(obj, '__fspath__') or hasattr(obj, 'as_posix'):
|
|
32
|
+
# Handle Path-like objects (including UPath, SFTPPath, pathlib.Path, etc.)
|
|
33
|
+
return str(obj)
|
|
34
|
+
elif hasattr(obj, 'isoformat'):
|
|
35
|
+
# Handle datetime objects
|
|
36
|
+
return obj.isoformat()
|
|
37
|
+
# Let the base class handle other types
|
|
38
|
+
return super().default(obj)
|
|
39
|
+
|
|
40
|
+
|
|
27
41
|
class UploadStatus(str, Enum):
|
|
28
42
|
SUCCESS = 'success'
|
|
29
43
|
FAILED = 'failed'
|
|
@@ -67,7 +81,8 @@ class UploadRun(Run):
|
|
|
67
81
|
status (UploadStatus): The status of the data file.
|
|
68
82
|
"""
|
|
69
83
|
now = datetime.now().isoformat()
|
|
70
|
-
|
|
84
|
+
# Use custom JSON encoder to handle Path-like objects
|
|
85
|
+
data_file_info_str = json.dumps(data_file_info, ensure_ascii=False, cls=PathAwareJSONEncoder)
|
|
71
86
|
self.log(
|
|
72
87
|
'upload_data_file',
|
|
73
88
|
self.DataFileLog(data_file_info=data_file_info_str, status=status.value, created=now).model_dump(),
|
|
@@ -165,7 +165,7 @@ synapse_sdk/plugins/categories/smart_tool/templates/plugin/__init__.py,sha256=47
|
|
|
165
165
|
synapse_sdk/plugins/categories/smart_tool/templates/plugin/auto_label.py,sha256=eevNg0nOcYFR4z_L_R-sCvVOYoLWSAH1jwDkAf3YCjY,320
|
|
166
166
|
synapse_sdk/plugins/categories/upload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
167
|
synapse_sdk/plugins/categories/upload/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
168
|
-
synapse_sdk/plugins/categories/upload/actions/upload.py,sha256=
|
|
168
|
+
synapse_sdk/plugins/categories/upload/actions/upload.py,sha256=YATMn9ud8cqWKw4Pq14XhuCPvn5NTq_7RyfZv5hG75w,38279
|
|
169
169
|
synapse_sdk/plugins/categories/upload/templates/config.yaml,sha256=6_dRa0_J2aS8NSUfO4MKbPxZcdPS2FpJzzp51edYAZc,281
|
|
170
170
|
synapse_sdk/plugins/categories/upload/templates/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
171
171
|
synapse_sdk/plugins/categories/upload/templates/plugin/upload.py,sha256=IZU4sdSMSLKPCtlNqF7DP2howTdYR6hr74HCUZsGdPk,1559
|
|
@@ -221,9 +221,9 @@ synapse_sdk/utils/storage/providers/gcp.py,sha256=i2BQCu1Kej1If9SuNr2_lEyTcr5M_n
|
|
|
221
221
|
synapse_sdk/utils/storage/providers/http.py,sha256=2DhIulND47JOnS5ZY7MZUex7Su3peAPksGo1Wwg07L4,5828
|
|
222
222
|
synapse_sdk/utils/storage/providers/s3.py,sha256=ZmqekAvIgcQBdRU-QVJYv1Rlp6VHfXwtbtjTSphua94,2573
|
|
223
223
|
synapse_sdk/utils/storage/providers/sftp.py,sha256=_8s9hf0JXIO21gvm-JVS00FbLsbtvly4c-ETLRax68A,1426
|
|
224
|
-
synapse_sdk-1.0.
|
|
225
|
-
synapse_sdk-1.0.
|
|
226
|
-
synapse_sdk-1.0.
|
|
227
|
-
synapse_sdk-1.0.
|
|
228
|
-
synapse_sdk-1.0.
|
|
229
|
-
synapse_sdk-1.0.
|
|
224
|
+
synapse_sdk-1.0.0a96.dist-info/licenses/LICENSE,sha256=bKzmC5YAg4V1Fhl8OO_tqY8j62hgdncAkN7VrdjmrGk,1101
|
|
225
|
+
synapse_sdk-1.0.0a96.dist-info/METADATA,sha256=5UeC7skKojVvQZpdH1wkcoHm384G3GYNs0t5O-TvKe8,3837
|
|
226
|
+
synapse_sdk-1.0.0a96.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
227
|
+
synapse_sdk-1.0.0a96.dist-info/entry_points.txt,sha256=VNptJoGoNJI8yLXfBmhgUefMsmGI0m3-0YoMvrOgbxo,48
|
|
228
|
+
synapse_sdk-1.0.0a96.dist-info/top_level.txt,sha256=ytgJMRK1slVOKUpgcw3LEyHHP7S34J6n_gJzdkcSsw8,12
|
|
229
|
+
synapse_sdk-1.0.0a96.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|