aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-01-29 17:29:26 +0100
committerThéo de la Hogue2024-01-29 17:29:26 +0100
commite0344a225e8bb636da9678942b582b2658ae97aa (patch)
treed76024b4c40f26c74613e0f7e78c1ec1027eab00
parent299fa2c8cfb256b4df7882b19ced5ab1319f7819 (diff)
downloadargaze-e0344a225e8bb636da9678942b582b2658ae97aa.zip
argaze-e0344a225e8bb636da9678942b582b2658ae97aa.tar.gz
argaze-e0344a225e8bb636da9678942b582b2658ae97aa.tar.bz2
argaze-e0344a225e8bb636da9678942b582b2658ae97aa.tar.xz
Allowing to instanciate ready-made argaze observers via dict.
-rw-r--r--src/argaze/DataFeatures.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py
index a3b7034..6c77c37 100644
--- a/src/argaze/DataFeatures.py
+++ b/src/argaze/DataFeatures.py
@@ -503,6 +503,13 @@ class PipelineStepObject():
new_observers = observer_module.__observers__
+ # dict: instanciate ready-made argaze observers
+ elif type(new_observers_value) == dict:
+
+ for observer_type, observer_data in new_observers_value.items():
+
+ new_observers[observer_type] = eval(f'{observer_type}(**observer_data)')
+
except KeyError:
pass