omnata-plugin-runtime 0.10.4a232__py3-none-any.whl → 0.10.5__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.
- omnata_plugin_runtime/configuration.py +62 -1
- {omnata_plugin_runtime-0.10.4a232.dist-info → omnata_plugin_runtime-0.10.5.dist-info}/METADATA +1 -1
- {omnata_plugin_runtime-0.10.4a232.dist-info → omnata_plugin_runtime-0.10.5.dist-info}/RECORD +5 -5
- {omnata_plugin_runtime-0.10.4a232.dist-info → omnata_plugin_runtime-0.10.5.dist-info}/LICENSE +0 -0
- {omnata_plugin_runtime-0.10.4a232.dist-info → omnata_plugin_runtime-0.10.5.dist-info}/WHEEL +0 -0
@@ -50,6 +50,20 @@ class InboundSyncStrategy(str, Enum):
|
|
50
50
|
INCREMENTAL = "Incremental"
|
51
51
|
AUTO = "Auto" # not valid as an individual stream choice, only when referring to a forward preference (new_stream_sync_strategy)
|
52
52
|
|
53
|
+
class InboundSyncStrategyBulkConfiguration(str, Enum):
|
54
|
+
"""
|
55
|
+
Supercedes InboundSyncBulkConfiguration, which was a combination of sync strategy and storage behaviour.
|
56
|
+
"""
|
57
|
+
AUTO = "auto"
|
58
|
+
MANUAL = "manual"
|
59
|
+
|
60
|
+
class InboundStorageBehaviourBulkConfiguration(str, Enum):
|
61
|
+
"""
|
62
|
+
Supercedes InboundSyncBulkConfiguration, which was a combination of sync strategy and storage behaviour.
|
63
|
+
"""
|
64
|
+
MERGE = "merge"
|
65
|
+
APPEND = "append"
|
66
|
+
MANUAL = "manual"
|
53
67
|
|
54
68
|
class InboundSyncBulkConfiguration(str, Enum):
|
55
69
|
"""
|
@@ -479,7 +493,54 @@ class InboundSyncStreamsConfiguration(SubscriptableBaseModel):
|
|
479
493
|
new_stream_storage_behaviour: Optional[InboundStorageBehaviour] = Field(default=None)
|
480
494
|
included_streams: Dict[str, StoredStreamConfiguration]
|
481
495
|
excluded_streams: List[str]
|
482
|
-
bulk_configuration: InboundSyncBulkConfiguration =
|
496
|
+
bulk_configuration: Optional[InboundSyncBulkConfiguration] = None
|
497
|
+
sync_strategy_bulk_configuration: InboundSyncStrategyBulkConfiguration
|
498
|
+
storage_behaviour_bulk_configuration: InboundStorageBehaviourBulkConfiguration
|
499
|
+
|
500
|
+
"""
|
501
|
+
We use a model_validator to manage the migration from bulk_configuration to the new
|
502
|
+
sync_strategy_bulk_configuration and storage_behaviour_bulk_configuration objects.
|
503
|
+
This means that if bulk_configuration is set, it will be used to populate the new objects.
|
504
|
+
"""
|
505
|
+
@model_validator(mode='before')
|
506
|
+
@classmethod
|
507
|
+
def migrate_bulk_configuration(cls, data: Any) -> Any:
|
508
|
+
if 'sync_strategy_bulk_configuration' in data or 'storage_behaviour_bulk_configuration' in data:
|
509
|
+
return data
|
510
|
+
if 'bulk_configuration' in data:
|
511
|
+
# Recently deprecated values
|
512
|
+
# AUTO_MERGE = "Auto / Merge changes" # Merge
|
513
|
+
# AUTO_APPEND = "Auto / Keep history" # Append
|
514
|
+
# CUSTOMIZE = "Customize - choose sync behaviours for each object"
|
515
|
+
# Deprecated longer ago
|
516
|
+
# ALL_FULL_REPLACE = "All Objects - Full refresh / Replace"
|
517
|
+
# ALL_FULL_APPEND = "All Objects - Full refresh / Append"
|
518
|
+
# ALL_INCR_MERGE = "All Objects - Incremental / Merge"
|
519
|
+
# ALL_INCR_APPEND = "All Objects - Incremental / Append"
|
520
|
+
if data['bulk_configuration']== InboundSyncBulkConfiguration.AUTO_MERGE.value:
|
521
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.AUTO.value
|
522
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.MERGE.value
|
523
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.AUTO_APPEND.value:
|
524
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.AUTO.value
|
525
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.APPEND.value
|
526
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.CUSTOMIZE.value:
|
527
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.MANUAL.value
|
528
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.MANUAL.value
|
529
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.ALL_FULL_REPLACE.value:
|
530
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.MANUAL.value
|
531
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.MERGE.value
|
532
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.ALL_FULL_APPEND.value:
|
533
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.MANUAL.value
|
534
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.APPEND.value
|
535
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.ALL_INCR_MERGE.value:
|
536
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.AUTO.value
|
537
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.MERGE.value
|
538
|
+
elif data['bulk_configuration']== InboundSyncBulkConfiguration.ALL_INCR_APPEND.value:
|
539
|
+
data['sync_strategy_bulk_configuration']= InboundSyncStrategyBulkConfiguration.AUTO.value
|
540
|
+
data['storage_behaviour_bulk_configuration']= InboundStorageBehaviourBulkConfiguration.APPEND.value
|
541
|
+
# remove this once the old UI is deprecated
|
542
|
+
#del data['bulk_configuration']
|
543
|
+
return data
|
483
544
|
|
484
545
|
|
485
546
|
class StoredStreamConfiguration(SubscriptableBaseModel):
|
{omnata_plugin_runtime-0.10.4a232.dist-info → omnata_plugin_runtime-0.10.5.dist-info}/RECORD
RENAMED
@@ -1,13 +1,13 @@
|
|
1
1
|
omnata_plugin_runtime/__init__.py,sha256=MS9d1whnfT_B3-ThqZ7l63QeC_8OEKTuaYV5wTwRpBA,1576
|
2
2
|
omnata_plugin_runtime/api.py,sha256=baGraSMiD4Yvi3ZWrEv_TKh8Ktd1U8riBdOpe9j0Puw,8202
|
3
|
-
omnata_plugin_runtime/configuration.py,sha256=
|
3
|
+
omnata_plugin_runtime/configuration.py,sha256=fpSyBr3Dr7GNdil88915VtMwRy5pexkGCRBk7BLFpPs,46527
|
4
4
|
omnata_plugin_runtime/forms.py,sha256=9YHJ_T17lT-rwyDaUg_0yj_YMPda4DRCw_wrvf8hE0E,19964
|
5
5
|
omnata_plugin_runtime/json_schema.py,sha256=NujSQBtyfnvSyw13sSFiSKmZeXkSk5cqCDVyuNwOACg,28395
|
6
6
|
omnata_plugin_runtime/logging.py,sha256=WBuZt8lF9E5oFWM4KYQbE8dDJ_HctJ1pN3BHwU6rcd0,4461
|
7
7
|
omnata_plugin_runtime/omnata_plugin.py,sha256=M0b6f9lKKEoEI0zf-ZwZcIPKPQTmHTIMhvcrBc94Mhg,133278
|
8
8
|
omnata_plugin_runtime/plugin_entrypoints.py,sha256=iqGl8_nEEnPGKg3Aem4YLSQ6d5xS3ju5gq8MJbx6sCA,31968
|
9
9
|
omnata_plugin_runtime/rate_limiting.py,sha256=qpr5esU4Ks8hMzuMpSR3gLFdor2ZUXYWCjmsQH_K6lQ,25882
|
10
|
-
omnata_plugin_runtime-0.10.
|
11
|
-
omnata_plugin_runtime-0.10.
|
12
|
-
omnata_plugin_runtime-0.10.
|
13
|
-
omnata_plugin_runtime-0.10.
|
10
|
+
omnata_plugin_runtime-0.10.5.dist-info/LICENSE,sha256=rGaMQG3R3F5-JGDp_-rlMKpDIkg5n0SI4kctTk8eZSI,56
|
11
|
+
omnata_plugin_runtime-0.10.5.dist-info/METADATA,sha256=vDAp8WjmD82Ie55efaD__02ucN6Tf0lMZnCn3YO1d8c,2207
|
12
|
+
omnata_plugin_runtime-0.10.5.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
13
|
+
omnata_plugin_runtime-0.10.5.dist-info/RECORD,,
|
{omnata_plugin_runtime-0.10.4a232.dist-info → omnata_plugin_runtime-0.10.5.dist-info}/LICENSE
RENAMED
File without changes
|
File without changes
|