Skip to content

Automatic calculation dependency detection #116

Open
@mikofski

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions