Open mikofski opened 7 years ago
Currently calculation dependencies have to be entered manually, which is a bit redundant and often leads to errors.
Carousel should automatically detect dependencies by comparing the output arguments to returns from other calculations.
For example:
class MyCalc(Calculation): calc1 = CalcParameter( formula='f_my_formula', args={'data': {'x': 'arg1'}, 'outputs': {'y': 'arg2'}}, returns=['arg3'] ) calc2 = CalcParameter( formula='f_my_other_formula', args={'data': {'w': 'arg0'}, 'outputs': {'z': 'arg3'}}, returns=['arg4'] )
So it's obvious that calc2 depends on calc1 because it uses arg3 for z in f_my_other_formula which is a return from calc1.
calc2
calc1
arg3
z
f_my_other_formula
Currently calculation dependencies have to be entered manually, which is a bit redundant and often leads to errors.
Carousel should automatically detect dependencies by comparing the output arguments to returns from other calculations.
For example:
So it's obvious that
calc2
depends oncalc1
because it usesarg3
forz
inf_my_other_formula
which is a return fromcalc1
.