aboutsummaryrefslogtreecommitdiff
path: root/run.py
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-10-18 23:55:21 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-10-18 23:55:21 +0200
commit436a3d3eaebcca11d8da6d8b1bb4f6f543e135e4 (patch)
treeb7cf8adef98c4a108379b897d2c0d722bd421433 /run.py
parentea086464f8919b1477369fb08177fc9b0797f222 (diff)
downloadmeteo_toolbox-436a3d3eaebcca11d8da6d8b1bb4f6f543e135e4.tar.gz
implemented aggreator
Diffstat (limited to 'run.py')
-rwxr-xr-xrun.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/run.py b/run.py
index de6a078..fa0f598 100755
--- a/run.py
+++ b/run.py
@@ -26,6 +26,19 @@ for plotter in conf['plotter']:
modname = plotter['module']
del plotter['module']
+ if 'aggregator' in plotter:
+ aggname = plotter['aggregator']
+ del plotter['aggregator']
+ aggconf = conf['aggregator'][aggname]
+ classname = aggconf['module']
+ # We should prbly not delete it like in the plotter, since it is not a deepcopy
+ # and may be used again.
+
+ agg = __import__(classname, fromlist=[None])
+
+ # TODO: figure out a way to use **aggconf instead.
+ plotter['data'] = agg.load_data(aggname, aggconf)
+
mod = __import__(modname, fromlist=[None])
index.extend(mod.run(**plotter))