tracdap-runtime 0.7.0__py3-none-any.whl → 0.7.1__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.
- tracdap/rt/_exec/dev_mode.py +14 -9
- tracdap/rt/_impl/config_parser.py +26 -18
- tracdap/rt/_impl/static_api.py +1 -1
- tracdap/rt/_impl/type_system.py +73 -33
- tracdap/rt/_plugins/storage_sql.py +12 -5
- tracdap/rt/_version.py +1 -1
- tracdap/rt/metadata/__init__.py +15 -15
- {tracdap_runtime-0.7.0.dist-info → tracdap_runtime-0.7.1.dist-info}/METADATA +15 -15
- {tracdap_runtime-0.7.0.dist-info → tracdap_runtime-0.7.1.dist-info}/RECORD +12 -12
- {tracdap_runtime-0.7.0.dist-info → tracdap_runtime-0.7.1.dist-info}/WHEEL +1 -1
- {tracdap_runtime-0.7.0.dist-info → tracdap_runtime-0.7.1.dist-info}/LICENSE +0 -0
- {tracdap_runtime-0.7.0.dist-info → tracdap_runtime-0.7.1.dist-info}/top_level.txt +0 -0
tracdap/rt/_exec/dev_mode.py
CHANGED
@@ -37,12 +37,12 @@ DEV_MODE_JOB_CONFIG = [
|
|
37
37
|
re.compile(r"job\.\w+\.model"),
|
38
38
|
re.compile(r"job\.\w+\.flow"),
|
39
39
|
|
40
|
-
re.compile(r".*\.jobs\.\
|
41
|
-
re.compile(r".*\.jobs\.\
|
42
|
-
re.compile(r".*\.jobs\.\
|
43
|
-
re.compile(r".*\.jobs\.\
|
44
|
-
re.compile(r".*\.jobs\.\
|
45
|
-
re.compile(r".*\.jobs\.\
|
40
|
+
re.compile(r".*\.jobs\[\d+]\.\w+\.parameters\.\w+"),
|
41
|
+
re.compile(r".*\.jobs\[\d+]\.\w+\.inputs\.\w+"),
|
42
|
+
re.compile(r".*\.jobs\[\d+]\.\w+\.outputs\.\w+"),
|
43
|
+
re.compile(r".*\.jobs\[\d+]\.\w+\.models\.\w+"),
|
44
|
+
re.compile(r".*\.jobs\[\d+]\.\w+\.model"),
|
45
|
+
re.compile(r".*\.jobs\[\d+]\.\w+\.flow")
|
46
46
|
]
|
47
47
|
|
48
48
|
DEV_MODE_SYS_CONFIG = []
|
@@ -764,10 +764,15 @@ class DevModeTranslator:
|
|
764
764
|
else:
|
765
765
|
p_spec = param_specs[p_name]
|
766
766
|
|
767
|
-
|
767
|
+
try:
|
768
|
+
cls._log.info(f"Encoding parameter [{p_name}] as {p_spec.paramType.basicType}")
|
769
|
+
encoded_value = _types.MetadataCodec.convert_value(p_value, p_spec.paramType)
|
770
|
+
encoded_values[p_name] = encoded_value
|
768
771
|
|
769
|
-
|
770
|
-
|
772
|
+
except Exception as e:
|
773
|
+
msg = f"Failed to encode parameter [{p_name}]: {str(e)}"
|
774
|
+
cls._log.error(msg)
|
775
|
+
raise _ex.EConfigParse(msg) from e
|
771
776
|
|
772
777
|
return encoded_values
|
773
778
|
|
@@ -321,6 +321,23 @@ class ConfigParser(tp.Generic[_T]):
|
|
321
321
|
|
322
322
|
def _parse_value(self, location: str, raw_value: tp.Any, annotation: type):
|
323
323
|
|
324
|
+
if self._is_dev_mode_location(location):
|
325
|
+
|
326
|
+
if type(raw_value) in ConfigParser.__primitive_types:
|
327
|
+
return self._parse_primitive(location, raw_value, type(raw_value))
|
328
|
+
|
329
|
+
if isinstance(raw_value, list):
|
330
|
+
if len(raw_value) == 0:
|
331
|
+
return []
|
332
|
+
items = iter((self._child_location(location, i), x) for i, x in enumerate(raw_value))
|
333
|
+
return list(self._parse_value(loc, x, tp.Any) for loc, x in items)
|
334
|
+
|
335
|
+
if isinstance(raw_value, dict):
|
336
|
+
if len(raw_value) == 0:
|
337
|
+
return {}
|
338
|
+
items = iter((self._child_location(location, k), k, v) for k, v in raw_value.items())
|
339
|
+
return dict((k, self._parse_value(loc, v, tp.Any)) for loc, k, v in items)
|
340
|
+
|
324
341
|
if raw_value is None:
|
325
342
|
return None
|
326
343
|
|
@@ -339,24 +356,13 @@ class ConfigParser(tp.Generic[_T]):
|
|
339
356
|
return self._parse_enum(location, raw_value, annotation)
|
340
357
|
|
341
358
|
if _dc.is_dataclass(annotation):
|
342
|
-
|
343
|
-
if isinstance(raw_value, tp.Dict):
|
344
|
-
return self._parse_simple_class(location, raw_value, annotation)
|
345
|
-
|
346
|
-
if self._is_dev_mode_location(location):
|
347
|
-
if type(raw_value) in ConfigParser.__primitive_types:
|
348
|
-
return self._parse_primitive(location, raw_value, type(raw_value))
|
349
|
-
if isinstance(raw_value, list):
|
350
|
-
if len(raw_value) == 0:
|
351
|
-
return []
|
352
|
-
list_type = type(raw_value[0])
|
353
|
-
return list(map(lambda x: self._parse_primitive(location, x, list_type), raw_value))
|
354
|
-
|
355
|
-
return self._error(location, f"Expected type {annotation.__name__}, got '{str(raw_value)}'")
|
359
|
+
return self._parse_simple_class(location, raw_value, annotation)
|
356
360
|
|
357
361
|
if isinstance(annotation, self.__generic_metaclass):
|
358
362
|
return self._parse_generic_class(location, raw_value, annotation) # noqa
|
359
363
|
|
364
|
+
return self._error(location, f"Cannot parse value of type {annotation.__name__}")
|
365
|
+
|
360
366
|
def _is_dev_mode_location(self, location):
|
361
367
|
|
362
368
|
return any(map(lambda pattern: re.match(pattern, location), self._dev_mode_locations))
|
@@ -416,7 +422,7 @@ class ConfigParser(tp.Generic[_T]):
|
|
416
422
|
def _parse_simple_class(self, location: str, raw_dict: tp.Any, metaclass: type) -> object:
|
417
423
|
|
418
424
|
if raw_dict is not None and not isinstance(raw_dict, dict):
|
419
|
-
|
425
|
+
return self._error(location, f"Expected type {metaclass.__name__}, got '{str(raw_dict)}'")
|
420
426
|
|
421
427
|
obj = metaclass.__new__(metaclass, object()) # noqa
|
422
428
|
|
@@ -510,7 +516,7 @@ class ConfigParser(tp.Generic[_T]):
|
|
510
516
|
return self._error(location, f"Expected a list, got {type(raw_value)}")
|
511
517
|
|
512
518
|
return [
|
513
|
-
self._parse_value(self._child_location(location,
|
519
|
+
self._parse_value(self._child_location(location, idx), item, list_type)
|
514
520
|
for (idx, item) in enumerate(raw_value)]
|
515
521
|
|
516
522
|
if origin == tp.Dict or origin == dict:
|
@@ -541,12 +547,14 @@ class ConfigParser(tp.Generic[_T]):
|
|
541
547
|
return None
|
542
548
|
|
543
549
|
@staticmethod
|
544
|
-
def _child_location(parent_location: str, item: str):
|
550
|
+
def _child_location(parent_location: str, item: tp.Union[str, int]):
|
545
551
|
|
546
552
|
if parent_location is None or parent_location == "":
|
547
553
|
return item
|
554
|
+
elif isinstance(item, int):
|
555
|
+
return f"{parent_location}[{item}]"
|
548
556
|
else:
|
549
|
-
return parent_location
|
557
|
+
return f"{parent_location}.{item}"
|
550
558
|
|
551
559
|
|
552
560
|
class ConfigQuoter:
|
tracdap/rt/_impl/static_api.py
CHANGED
@@ -55,7 +55,7 @@ class StaticApiImpl(_StaticApiHook):
|
|
55
55
|
if not _val.is_primitive_type(entry_type):
|
56
56
|
raise _ex.EModelValidation(f"Maps can only contain primitive types, [{entry_type}] is not primitive")
|
57
57
|
|
58
|
-
return _meta.TypeDescriptor(_meta.BasicType.MAP,
|
58
|
+
return _meta.TypeDescriptor(_meta.BasicType.MAP, mapType=_meta.TypeDescriptor(entry_type))
|
59
59
|
|
60
60
|
def define_attribute(
|
61
61
|
self, attr_name: str, attr_value: _tp.Any,
|
tracdap/rt/_impl/type_system.py
CHANGED
@@ -133,9 +133,13 @@ class MetadataCodec:
|
|
133
133
|
|
134
134
|
if basic_type == _meta.BasicType.ARRAY:
|
135
135
|
items = value.arrayValue.items
|
136
|
-
return list(
|
136
|
+
return list(MetadataCodec._decode_value_for_type(x, type_desc.arrayType) for x in items)
|
137
137
|
|
138
|
-
|
138
|
+
if basic_type == _meta.BasicType.MAP:
|
139
|
+
items = value.mapValue.entries.items()
|
140
|
+
return dict((k, MetadataCodec._decode_value_for_type(v, type_desc.mapType)) for k, v in items)
|
141
|
+
|
142
|
+
raise _ex.ETracInternal(f"Cannot decode value of type [{basic_type}]")
|
139
143
|
|
140
144
|
@classmethod
|
141
145
|
def encode_value(cls, value: tp.Any) -> _meta.Value:
|
@@ -183,19 +187,36 @@ class MetadataCodec:
|
|
183
187
|
if any(map(lambda x: type(x) != array_raw_type, value)):
|
184
188
|
raise _ex.ETracInternal("Cannot encode a list with values of different types")
|
185
189
|
|
186
|
-
encoded_items = list(map(lambda x: cls.convert_value(x, array_trac_type), value))
|
190
|
+
encoded_items = list(map(lambda x: cls.convert_value(x, array_trac_type, True), value))
|
187
191
|
|
188
192
|
return _meta.Value(
|
189
193
|
_meta.TypeDescriptor(_meta.BasicType.ARRAY, arrayType=array_trac_type),
|
190
194
|
arrayValue=_meta.ArrayValue(encoded_items))
|
191
195
|
|
192
|
-
|
196
|
+
if isinstance(value, dict):
|
197
|
+
|
198
|
+
if len(value) == 0:
|
199
|
+
raise _ex.ETracInternal("Cannot encode an empty dict")
|
200
|
+
|
201
|
+
map_raw_type = type(next(iter(value.values())))
|
202
|
+
map_trac_type = TypeMapping.python_to_trac(map_raw_type)
|
203
|
+
|
204
|
+
if any(map(lambda x: type(x) != array_raw_type, value.values())):
|
205
|
+
raise _ex.ETracInternal("Cannot encode a dict with values of different types")
|
206
|
+
|
207
|
+
encoded_entries = dict(map(lambda kv: (kv[0], cls.convert_value(kv[1], map_trac_type, True)), value.items()))
|
208
|
+
|
209
|
+
return _meta.Value(
|
210
|
+
_meta.TypeDescriptor(_meta.BasicType.ARRAY, mapType=map_trac_type),
|
211
|
+
mapValue=_meta.MapValue(encoded_entries))
|
212
|
+
|
213
|
+
raise _ex.ETracInternal(f"Cannot encode value of type [{type(value).__name__}]")
|
193
214
|
|
194
215
|
@classmethod
|
195
|
-
def convert_value(cls, raw_value: tp.Any, type_desc: _meta.TypeDescriptor):
|
216
|
+
def convert_value(cls, raw_value: tp.Any, type_desc: _meta.TypeDescriptor, nested: bool = False):
|
196
217
|
|
197
218
|
if type_desc.basicType == _meta.BasicType.BOOLEAN:
|
198
|
-
return cls.convert_boolean_value(raw_value)
|
219
|
+
return cls.convert_boolean_value(raw_value, nested)
|
199
220
|
|
200
221
|
if type_desc.basicType == _meta.BasicType.INTEGER:
|
201
222
|
return cls.convert_integer_value(raw_value)
|
@@ -218,78 +239,97 @@ class MetadataCodec:
|
|
218
239
|
if type_desc.basicType == _meta.BasicType.ARRAY:
|
219
240
|
return cls.convert_array_value(raw_value, type_desc.arrayType)
|
220
241
|
|
242
|
+
if type_desc.basicType == _meta.BasicType.MAP:
|
243
|
+
return cls.convert_map_value(raw_value, type_desc.mapType)
|
244
|
+
|
221
245
|
raise _ex.ETracInternal(f"Conversion to value type [{type_desc.basicType.name}] is not supported yet")
|
222
246
|
|
223
247
|
@staticmethod
|
224
248
|
def convert_array_value(raw_value: tp.List[tp.Any], array_type: _meta.TypeDescriptor) -> _meta.Value:
|
225
249
|
|
226
|
-
type_desc = _meta.TypeDescriptor(_meta.BasicType.ARRAY, array_type)
|
250
|
+
type_desc = _meta.TypeDescriptor(basicType=_meta.BasicType.ARRAY, arrayType=array_type)
|
227
251
|
|
228
252
|
if not isinstance(raw_value, list):
|
229
|
-
msg = f"Value of type [{type(raw_value)}] cannot be converted to {_meta.BasicType.ARRAY.name}"
|
253
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.ARRAY.name}"
|
230
254
|
raise _ex.ETracInternal(msg)
|
231
255
|
|
232
|
-
items = list(map(lambda x: MetadataCodec.convert_value(x, array_type), raw_value))
|
256
|
+
items = list(map(lambda x: MetadataCodec.convert_value(x, array_type, True), raw_value))
|
233
257
|
|
234
258
|
return _meta.Value(type_desc, arrayValue=_meta.ArrayValue(items))
|
235
259
|
|
236
260
|
@staticmethod
|
237
|
-
def
|
261
|
+
def convert_map_value(raw_value: tp.Dict[str, tp.Any], map_type: _meta.TypeDescriptor) -> _meta.Value:
|
262
|
+
|
263
|
+
type_desc = _meta.TypeDescriptor(basicType=_meta.BasicType.MAP, mapType=map_type)
|
264
|
+
|
265
|
+
if not isinstance(raw_value, dict):
|
266
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.MAP.name}"
|
267
|
+
raise _ex.ETracInternal(msg)
|
268
|
+
|
269
|
+
entries = dict(map(lambda kv: (kv[0], MetadataCodec.convert_value(kv[1], map_type, True)), raw_value.items()))
|
270
|
+
|
271
|
+
return _meta.Value(type_desc, mapValue=_meta.MapValue(entries))
|
272
|
+
|
273
|
+
@staticmethod
|
274
|
+
def convert_boolean_value(raw_value: tp.Any, nested: bool = False) -> _meta.Value:
|
238
275
|
|
239
|
-
type_desc = _meta.TypeDescriptor(_meta.BasicType.BOOLEAN)
|
276
|
+
type_desc = _meta.TypeDescriptor(_meta.BasicType.BOOLEAN) if not nested else None
|
240
277
|
|
241
278
|
if isinstance(raw_value, bool):
|
242
279
|
return _meta.Value(type_desc, booleanValue=raw_value)
|
243
280
|
|
244
|
-
msg = f"Value of type [{type(raw_value)}] cannot be converted to {_meta.BasicType.BOOLEAN.name}"
|
281
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.BOOLEAN.name}"
|
245
282
|
raise _ex.ETracInternal(msg)
|
246
283
|
|
247
284
|
@staticmethod
|
248
|
-
def convert_integer_value(raw_value: tp.Any) -> _meta.Value:
|
285
|
+
def convert_integer_value(raw_value: tp.Any, nested: bool = False) -> _meta.Value:
|
249
286
|
|
250
|
-
type_desc = _meta.TypeDescriptor(_meta.BasicType.INTEGER)
|
287
|
+
type_desc = _meta.TypeDescriptor(_meta.BasicType.INTEGER) if not nested else None
|
251
288
|
|
252
|
-
|
289
|
+
# isinstance(bool_value, int) returns True! An explicit check is needed
|
290
|
+
if isinstance(raw_value, int) and not isinstance(raw_value, bool):
|
253
291
|
return _meta.Value(type_desc, integerValue=raw_value)
|
254
292
|
|
255
293
|
if isinstance(raw_value, float) and raw_value.is_integer():
|
256
294
|
return _meta.Value(type_desc, integerValue=int(raw_value))
|
257
295
|
|
258
|
-
msg = f"Value of type [{type(raw_value)}] cannot be converted to {_meta.BasicType.INTEGER.name}"
|
296
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.INTEGER.name}"
|
259
297
|
raise _ex.ETracInternal(msg)
|
260
298
|
|
261
299
|
@staticmethod
|
262
|
-
def convert_float_value(raw_value: tp.Any) -> _meta.Value:
|
300
|
+
def convert_float_value(raw_value: tp.Any, nested: bool = False) -> _meta.Value:
|
263
301
|
|
264
|
-
type_desc = _meta.TypeDescriptor(_meta.BasicType.FLOAT)
|
302
|
+
type_desc = _meta.TypeDescriptor(_meta.BasicType.FLOAT) if not nested else None
|
265
303
|
|
266
304
|
if isinstance(raw_value, float):
|
267
305
|
return _meta.Value(type_desc, floatValue=raw_value)
|
268
306
|
|
269
|
-
|
307
|
+
# isinstance(bool_value, int) returns True! An explicit check is needed
|
308
|
+
if isinstance(raw_value, int) and not isinstance(raw_value, bool):
|
270
309
|
return _meta.Value(type_desc, floatValue=float(raw_value))
|
271
310
|
|
272
|
-
msg = f"Value of type [{type(raw_value)}] cannot be converted to {_meta.BasicType.FLOAT.name}"
|
311
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.FLOAT.name}"
|
273
312
|
raise _ex.ETracInternal(msg)
|
274
313
|
|
275
314
|
@staticmethod
|
276
|
-
def convert_decimal_value(raw_value: tp.Any) -> _meta.Value:
|
315
|
+
def convert_decimal_value(raw_value: tp.Any, nested: bool = False) -> _meta.Value:
|
277
316
|
|
278
|
-
type_desc = _meta.TypeDescriptor(_meta.BasicType.DECIMAL)
|
317
|
+
type_desc = _meta.TypeDescriptor(_meta.BasicType.DECIMAL) if not nested else None
|
279
318
|
|
280
319
|
if isinstance(raw_value, decimal.Decimal):
|
281
320
|
return _meta.Value(type_desc, decimalValue=_meta.DecimalValue(str(raw_value)))
|
282
321
|
|
283
|
-
|
322
|
+
# isinstance(bool_value, int) returns True! An explicit check is needed
|
323
|
+
if isinstance(raw_value, int) or isinstance(raw_value, float) and not isinstance(raw_value, bool):
|
284
324
|
return _meta.Value(type_desc, decimalValue=_meta.DecimalValue(str(raw_value)))
|
285
325
|
|
286
|
-
msg = f"Value of type [{type(raw_value)}] cannot be converted to {_meta.BasicType.DECIMAL.name}"
|
326
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.DECIMAL.name}"
|
287
327
|
raise _ex.ETracInternal(msg)
|
288
328
|
|
289
329
|
@staticmethod
|
290
|
-
def convert_string_value(raw_value: tp.Any) -> _meta.Value:
|
330
|
+
def convert_string_value(raw_value: tp.Any, nested: bool = False) -> _meta.Value:
|
291
331
|
|
292
|
-
type_desc = _meta.TypeDescriptor(_meta.BasicType.STRING)
|
332
|
+
type_desc = _meta.TypeDescriptor(_meta.BasicType.STRING) if not nested else None
|
293
333
|
|
294
334
|
if isinstance(raw_value, str):
|
295
335
|
return _meta.Value(type_desc, stringValue=raw_value)
|
@@ -301,13 +341,13 @@ class MetadataCodec:
|
|
301
341
|
|
302
342
|
return _meta.Value(type_desc, stringValue=str(raw_value))
|
303
343
|
|
304
|
-
msg = f"Value of type [{type(raw_value)}] cannot be converted to {_meta.BasicType.STRING.name}"
|
344
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.STRING.name}"
|
305
345
|
raise _ex.ETracInternal(msg)
|
306
346
|
|
307
347
|
@staticmethod
|
308
|
-
def convert_date_value(raw_value: tp.Any) -> _meta.Value:
|
348
|
+
def convert_date_value(raw_value: tp.Any, nested: bool = False) -> _meta.Value:
|
309
349
|
|
310
|
-
type_desc = _meta.TypeDescriptor(_meta.BasicType.DATE)
|
350
|
+
type_desc = _meta.TypeDescriptor(_meta.BasicType.DATE) if not nested else None
|
311
351
|
|
312
352
|
if isinstance(raw_value, dt.date):
|
313
353
|
return _meta.Value(type_desc, dateValue=_meta.DateValue(isoDate=raw_value.isoformat()))
|
@@ -316,13 +356,13 @@ class MetadataCodec:
|
|
316
356
|
date_value = dt.date.fromisoformat(raw_value)
|
317
357
|
return _meta.Value(type_desc, dateValue=_meta.DateValue(isoDate=date_value.isoformat()))
|
318
358
|
|
319
|
-
msg = f"Value of type [{type(raw_value)}] cannot be converted to {_meta.BasicType.DATE.name}"
|
359
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.DATE.name}"
|
320
360
|
raise _ex.ETracInternal(msg)
|
321
361
|
|
322
362
|
@staticmethod
|
323
|
-
def convert_datetime_value(raw_value: tp.Any) -> _meta.Value:
|
363
|
+
def convert_datetime_value(raw_value: tp.Any, nested: bool = False) -> _meta.Value:
|
324
364
|
|
325
|
-
type_desc = _meta.TypeDescriptor(_meta.BasicType.DATETIME)
|
365
|
+
type_desc = _meta.TypeDescriptor(_meta.BasicType.DATETIME) if not nested else None
|
326
366
|
|
327
367
|
if isinstance(raw_value, dt.datetime):
|
328
368
|
return _meta.Value(type_desc, datetimeValue=_meta.DatetimeValue(isoDatetime=raw_value.isoformat()))
|
@@ -331,5 +371,5 @@ class MetadataCodec:
|
|
331
371
|
datetime_value = dt.datetime.fromisoformat(raw_value)
|
332
372
|
return _meta.Value(type_desc, datetimeValue=_meta.DatetimeValue(isoDatetime=datetime_value.isoformat()))
|
333
373
|
|
334
|
-
msg = f"Value of type [{type(raw_value)}] cannot be converted to {_meta.BasicType.DATETIME.name}"
|
374
|
+
msg = f"Value of type [{type(raw_value).__name__}] cannot be converted to {_meta.BasicType.DATETIME.name}"
|
335
375
|
raise _ex.ETracInternal(msg)
|
@@ -268,10 +268,18 @@ plugins.PluginManager.register_plugin(IStorageProvider, SqlStorageProvider, ["SQ
|
|
268
268
|
|
269
269
|
|
270
270
|
try:
|
271
|
-
|
272
271
|
import sqlalchemy as sqla # noqa
|
273
272
|
import sqlalchemy.exc as sqla_exc # noqa
|
274
273
|
|
274
|
+
# Only 2.x versions of SQL Alchemy are currently supported
|
275
|
+
sqla_supported = sqla.__version__.startswith("2.")
|
276
|
+
|
277
|
+
except ModuleNotFoundError:
|
278
|
+
sqla = None
|
279
|
+
sqla_supported = False
|
280
|
+
|
281
|
+
if sqla_supported:
|
282
|
+
|
275
283
|
class SqlAlchemyDriver(ISqlDriver):
|
276
284
|
|
277
285
|
def __init__(self, properties: tp.Dict[str, str]):
|
@@ -336,7 +344,7 @@ try:
|
|
336
344
|
|
337
345
|
class ConnectionWrapper(DbApiWrapper.Connection):
|
338
346
|
|
339
|
-
def __init__(self, conn: sqla.Connection):
|
347
|
+
def __init__(self, conn: "sqla.Connection"):
|
340
348
|
self.__conn = conn
|
341
349
|
|
342
350
|
def close(self):
|
@@ -355,7 +363,7 @@ try:
|
|
355
363
|
|
356
364
|
arraysize: int = 1000
|
357
365
|
|
358
|
-
def __init__(self, conn: sqla.Connection):
|
366
|
+
def __init__(self, conn: "sqla.Connection"):
|
359
367
|
self.__conn = conn
|
360
368
|
self.__result: tp.Optional[sqla.CursorResult] = None
|
361
369
|
|
@@ -414,5 +422,4 @@ try:
|
|
414
422
|
|
415
423
|
plugins.PluginManager.register_plugin(ISqlDriver, SqlAlchemyDriver, ["alchemy"])
|
416
424
|
|
417
|
-
|
418
|
-
pass
|
425
|
+
|
tracdap/rt/_version.py
CHANGED
tracdap/rt/metadata/__init__.py
CHANGED
@@ -9,6 +9,8 @@ from .type import Value
|
|
9
9
|
from .type import ArrayValue
|
10
10
|
from .type import MapValue
|
11
11
|
|
12
|
+
from .custom import CustomDefinition
|
13
|
+
|
12
14
|
from .object_id import ObjectType
|
13
15
|
from .object_id import TagHeader
|
14
16
|
from .object_id import TagSelector
|
@@ -21,6 +23,13 @@ from .data import SchemaDefinition
|
|
21
23
|
from .data import PartKey
|
22
24
|
from .data import DataDefinition
|
23
25
|
|
26
|
+
from .stoarge import CopyStatus
|
27
|
+
from .stoarge import IncarnationStatus
|
28
|
+
from .stoarge import StorageCopy
|
29
|
+
from .stoarge import StorageIncarnation
|
30
|
+
from .stoarge import StorageItem
|
31
|
+
from .stoarge import StorageDefinition
|
32
|
+
|
24
33
|
from .model import ModelType
|
25
34
|
from .model import ModelParameter
|
26
35
|
from .model import ModelInputSchema
|
@@ -56,23 +65,14 @@ from .job import JobGroup
|
|
56
65
|
from .job import SequentialJobGroup
|
57
66
|
from .job import ParallelJobGroup
|
58
67
|
|
59
|
-
from .file import FileDefinition
|
60
|
-
|
61
|
-
from .custom import CustomDefinition
|
62
|
-
|
63
|
-
from .stoarge import CopyStatus
|
64
|
-
from .stoarge import IncarnationStatus
|
65
|
-
from .stoarge import StorageCopy
|
66
|
-
from .stoarge import StorageIncarnation
|
67
|
-
from .stoarge import StorageItem
|
68
|
-
from .stoarge import StorageDefinition
|
69
|
-
|
70
|
-
from .object import ObjectDefinition
|
71
|
-
|
72
|
-
from .resource import ResourceType
|
73
|
-
|
74
68
|
from .common import MetadataFormat
|
75
69
|
from .common import MetadataVersion
|
76
70
|
from .common import TenantInfo
|
77
71
|
|
72
|
+
from .file import FileDefinition
|
73
|
+
|
74
|
+
from .object import ObjectDefinition
|
75
|
+
|
78
76
|
from .tag import Tag
|
77
|
+
|
78
|
+
from .resource import ResourceType
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: tracdap-runtime
|
3
|
-
Version: 0.7.
|
3
|
+
Version: 0.7.1
|
4
4
|
Summary: Runtime package for building models on the TRAC Data & Analytics Platform
|
5
5
|
Home-page: https://tracdap.finos.org/
|
6
6
|
Author: Martin Traverse
|
@@ -23,19 +23,6 @@ Requires-Dist: dulwich==0.22.1
|
|
23
23
|
Requires-Dist: requests==2.32.3
|
24
24
|
Requires-Dist: pandas<2.3.0,>=1.2.0
|
25
25
|
Requires-Dist: numpy<2.0.0
|
26
|
-
Provides-Extra: aws
|
27
|
-
Requires-Dist: botocore==1.34.93; extra == "aws"
|
28
|
-
Requires-Dist: boto3==1.34.93; extra == "aws"
|
29
|
-
Provides-Extra: azure
|
30
|
-
Requires-Dist: azure-core==1.30.1; extra == "azure"
|
31
|
-
Requires-Dist: azure-identity==1.16.1; extra == "azure"
|
32
|
-
Requires-Dist: azure-storage-blob==12.19.1; extra == "azure"
|
33
|
-
Requires-Dist: adlfs==2024.4.1; extra == "azure"
|
34
|
-
Provides-Extra: gcp
|
35
|
-
Requires-Dist: google-auth==2.34.0; extra == "gcp"
|
36
|
-
Requires-Dist: google-api-core==2.19.2; extra == "gcp"
|
37
|
-
Requires-Dist: google-cloud-storage==2.18.2; extra == "gcp"
|
38
|
-
Requires-Dist: gcsfs==2024.3.1; extra == "gcp"
|
39
26
|
Provides-Extra: grpc
|
40
27
|
Requires-Dist: grpcio==1.66.1; extra == "grpc"
|
41
28
|
Requires-Dist: grpcio-status==1.66.1; extra == "grpc"
|
@@ -45,6 +32,19 @@ Provides-Extra: spark
|
|
45
32
|
Requires-Dist: pyspark<3.6.0,>=3.0.0; extra == "spark"
|
46
33
|
Provides-Extra: sql
|
47
34
|
Requires-Dist: sqlalchemy<2.1.0,>=2.0.0; extra == "sql"
|
35
|
+
Provides-Extra: aws
|
36
|
+
Requires-Dist: botocore==1.34.93; extra == "aws"
|
37
|
+
Requires-Dist: boto3==1.34.93; extra == "aws"
|
38
|
+
Provides-Extra: gcp
|
39
|
+
Requires-Dist: google-auth==2.34.0; extra == "gcp"
|
40
|
+
Requires-Dist: google-api-core==2.19.2; extra == "gcp"
|
41
|
+
Requires-Dist: google-cloud-storage==2.18.2; extra == "gcp"
|
42
|
+
Requires-Dist: gcsfs==2024.3.1; extra == "gcp"
|
43
|
+
Provides-Extra: azure
|
44
|
+
Requires-Dist: azure-core==1.30.1; extra == "azure"
|
45
|
+
Requires-Dist: azure-identity==1.16.1; extra == "azure"
|
46
|
+
Requires-Dist: azure-storage-blob==12.19.1; extra == "azure"
|
47
|
+
Requires-Dist: adlfs==2024.4.1; extra == "azure"
|
48
48
|
|
49
49
|
# TRAC Model Runtime for Python
|
50
50
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
tracdap/rt/__init__.py,sha256=4aCSENdKNrf9nC1lUULwmHpI1D3K74_4CJzpG_OjA4Q,830
|
2
|
-
tracdap/rt/_version.py,sha256=
|
2
|
+
tracdap/rt/_version.py,sha256=ebCrn466uxyLREcUY2823ZEYghvt9XLIJp-pPaHOi9s,818
|
3
3
|
tracdap/rt/exceptions.py,sha256=PsB4fExDI-bliqJZD-ESrr9MeLPDW7R5VN_JcWg7TqU,8175
|
4
4
|
tracdap/rt/_exec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
tracdap/rt/_exec/actors.py,sha256=6jU_yUye7j5TFl1Fz6yxluVbbuN-jO0ShYGtvlzczJM,35144
|
6
6
|
tracdap/rt/_exec/context.py,sha256=FqQ09XLG4ClyVit01nSzeMHGnvOLQmsw1RGt_Pv7p6s,39233
|
7
|
-
tracdap/rt/_exec/dev_mode.py,sha256=
|
7
|
+
tracdap/rt/_exec/dev_mode.py,sha256=6ICCfUi2a77gQLeYKxIdzzx5M_0KeEim-eJUue2z3y0,39456
|
8
8
|
tracdap/rt/_exec/engine.py,sha256=pAVxoDyWmhd1h7hzRi9ahDXXO5Ya190ONybF8g3emYo,42205
|
9
9
|
tracdap/rt/_exec/functions.py,sha256=lKRfC29AhsNhndcwjm6DTXNHXkGpB5K89kwldcrUMIc,29786
|
10
10
|
tracdap/rt/_exec/graph.py,sha256=OoD7lj0o-lJj7uNnUL_FwI6tGACFIBAMma5_NMNjVHA,12071
|
@@ -12,16 +12,16 @@ tracdap/rt/_exec/graph_builder.py,sha256=Juqn8n5J_TNxhPnebSMJqBPDdnhpvP01slL7HlC
|
|
12
12
|
tracdap/rt/_exec/runtime.py,sha256=-0cQBNkJtb41f6I3LBv5GmNp2lv5M18Gtdga3Kcbt58,16354
|
13
13
|
tracdap/rt/_exec/server.py,sha256=Gx3-5k4fnDMOdYX5T_UwpDbBeOa7HbeKP8GaV5oG60k,12584
|
14
14
|
tracdap/rt/_impl/__init__.py,sha256=nFn00zysNlcEFHQJWs4l6vLm9RS5zsJ_IF9-eRwEXlo,796
|
15
|
-
tracdap/rt/_impl/config_parser.py,sha256=
|
15
|
+
tracdap/rt/_impl/config_parser.py,sha256=z_5plGBCjXG12B_PvE4RBSGo8G1Ak4oJhlfBQKJTFac,23480
|
16
16
|
tracdap/rt/_impl/data.py,sha256=MWL7UL5Fgswwb3UpBc2Ec-vO3zYM5At9-0J4B-6IXVA,43007
|
17
17
|
tracdap/rt/_impl/guard_rails.py,sha256=eixt5hqFuAMmPlzDQyWBXSKDYt12d954qfk-lwkdQmI,11611
|
18
18
|
tracdap/rt/_impl/models.py,sha256=83Nr2ILJu-fFzJ8N5QSg2SF8zX9sKj_wjElRNxPgQNM,10754
|
19
19
|
tracdap/rt/_impl/repos.py,sha256=66uUN4Jdh9QYd9nPoN3TAAJCcCxDi076abk7_R2mAuY,2250
|
20
20
|
tracdap/rt/_impl/schemas.py,sha256=1oh_GFxZpmdAHu3diC8B5HD3-W5hahwja6LYF2N9m8g,7604
|
21
21
|
tracdap/rt/_impl/shim.py,sha256=NptlbIx9Obxe8_vmiEv1kTxWeUiK4Xktuy6bTx7tlGM,23335
|
22
|
-
tracdap/rt/_impl/static_api.py,sha256=
|
22
|
+
tracdap/rt/_impl/static_api.py,sha256=kp6lEMA_g-XCFQyrIHVLJVMHroAZsvwPOzfF-HW_guo,10247
|
23
23
|
tracdap/rt/_impl/storage.py,sha256=LqJLcFsr2cwDuStcjA15SqaqViJlhynCHflMJM8zde8,35915
|
24
|
-
tracdap/rt/_impl/type_system.py,sha256=
|
24
|
+
tracdap/rt/_impl/type_system.py,sha256=KGO32QvppRP_35y_pwapxWdJd-YS6VQ7NCSR-3VsMbM,15371
|
25
25
|
tracdap/rt/_impl/util.py,sha256=EtjmC-cfSmNJ_vXx7COp_XYSr4f09SyBd4tg4jFj6Fc,11434
|
26
26
|
tracdap/rt/_impl/validation.py,sha256=57fHXt_dkHLybXbNDOkAbv5U91FT-E2jU9KN9gpmrCA,22606
|
27
27
|
tracdap/rt/_impl/ext/__init__.py,sha256=7VEb_giQUbvBBO8OSTjTtgFgu7WSA43qslcZvhweO10,795
|
@@ -75,7 +75,7 @@ tracdap/rt/_plugins/storage_aws.py,sha256=yxDYw0jL-hXoUgqBlPhL1I_8i8LehOMjZKtG_n
|
|
75
75
|
tracdap/rt/_plugins/storage_azure.py,sha256=G8gwrK_irwqodQmfzzOGiWigp9nQK1RvweDAbWFxwBs,6000
|
76
76
|
tracdap/rt/_plugins/storage_gcp.py,sha256=D0ReW2ZZ6IDqRdF-lowL43ceaupmf4tJGo7jvWHk8DQ,6651
|
77
77
|
tracdap/rt/_plugins/storage_local.py,sha256=KY1CsT0GzjYWo5YYetTnQDWu18RhVrmEGBrEUSQHPKU,15742
|
78
|
-
tracdap/rt/_plugins/storage_sql.py,sha256=
|
78
|
+
tracdap/rt/_plugins/storage_sql.py,sha256=DNw869QOeDCmEY7gGJ6FDLIkUcwfSswO2yix9XtkRlE,16075
|
79
79
|
tracdap/rt/_plugins/storage_sql_dialects.py,sha256=4HWx5Gm50TRf5BTmc3hMREJIFsFgqo4g7wkVEVZzPz0,3550
|
80
80
|
tracdap/rt/api/__init__.py,sha256=2uTiCcHq5UAon2gghq1AD85M9IiL-gXnNWbXcTKoemc,1951
|
81
81
|
tracdap/rt/api/experimental.py,sha256=f0ELh4Xb2fxawF2yH4xms9rh12cFLjg3I8tEs7IWOpU,7942
|
@@ -98,7 +98,7 @@ tracdap/rt/launch/__init__.py,sha256=SPIwj5Bwa-IlhrfY1OJspYnL_mPLvz4F9XTAYKeu6IE
|
|
98
98
|
tracdap/rt/launch/__main__.py,sha256=tfr5wL1gHm0oj4tcX6pv6bl-3Z1K7VMpmmNMQzfMFzU,841
|
99
99
|
tracdap/rt/launch/cli.py,sha256=jGySYBawTDFJrhHgwYnplXb9VPcgfrBVB2UURqx5s-s,2638
|
100
100
|
tracdap/rt/launch/launch.py,sha256=_OLDASuL-2805ME1ubPgNKPkSIbJma72sD4p0q_E3IQ,7857
|
101
|
-
tracdap/rt/metadata/__init__.py,sha256=
|
101
|
+
tracdap/rt/metadata/__init__.py,sha256=NH1y88cpIBBcfNrkwgdR4lYciZBUYfumMXNotq7Q0KQ,2032
|
102
102
|
tracdap/rt/metadata/common.py,sha256=J24poYPHSJfORPqqhyJGTAmepdhVaT0V0RblWiW9jCI,1404
|
103
103
|
tracdap/rt/metadata/custom.py,sha256=GhCO8xjjsjZzlfSefqmCFX80rXJnxDCDq_STWi0ZL_0,352
|
104
104
|
tracdap/rt/metadata/data.py,sha256=Hvf1hHks7XQi2zN8TrljGDWmqJ_i_evI-WVik0QLidA,3529
|
@@ -114,8 +114,8 @@ tracdap/rt/metadata/stoarge.py,sha256=-WYc3aJskSCF_ETFQDavG3fTck__WPGMOfzWEBv55p
|
|
114
114
|
tracdap/rt/metadata/tag.py,sha256=cjKF5gdNECHDtA9sc09Dc2Q4WNZQA_7iJsUEHSKFXiQ,5097
|
115
115
|
tracdap/rt/metadata/tag_update.py,sha256=I7iDJiHEcSQ2vhOlhIc0fzeOoqTg6N1LJZU1R6tG_8g,3779
|
116
116
|
tracdap/rt/metadata/type.py,sha256=7XOGlLVvxd6DEmKRBYTANBsu9lmxDOsMKE0aNvzsB3M,9568
|
117
|
-
tracdap_runtime-0.7.
|
118
|
-
tracdap_runtime-0.7.
|
119
|
-
tracdap_runtime-0.7.
|
120
|
-
tracdap_runtime-0.7.
|
121
|
-
tracdap_runtime-0.7.
|
117
|
+
tracdap_runtime-0.7.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
118
|
+
tracdap_runtime-0.7.1.dist-info/METADATA,sha256=hqyd0xPYOxf1t5ARqXMyF0JZbxf3bt-ArPpMb-7gElc,5018
|
119
|
+
tracdap_runtime-0.7.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
120
|
+
tracdap_runtime-0.7.1.dist-info/top_level.txt,sha256=Uv0JfaE1Lp4JnCzqW8lqXNJAEcsAFpAUGOghJolVNdM,8
|
121
|
+
tracdap_runtime-0.7.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|