Skip to content

Parsing python operators #276

Description

@liamhuber

As a corollary to #269 and with recipes necessary to resolve #258, it should be pretty straightforward to inject operator recipes into the graph when parsing a @workflow and ast finds an operation. I.e., we should be able to parse something like

import flowrep as fr

@fr.workflow
def wf(a, b):
    if a < b:
        x = "less"
    else:
        x = "more"
    return x

When building the condition node for the if flow controller, it the ast parser should figure out to add a standard less-than recipe with edges for a, b-->less-than inputs.

The reverse, where we transform these operator nodes back into in-lined operators when recompiling the python might not be as easy. Still, I currently believe these difficulties to be of a book-keeping nature, and not fundamental obstacles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementCategory: New feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions