Skip to content

Support for control structures #126

Description

@simontaurus

are control structures like if and while already supported?

Example:

def function_one(x):
    u = 'https://play.min.io/bucket/example.csv?versioinId=fe45d98a'
    return x

def function_two(y):
    return y

def function_three(c, d):
    return c + d

def my_workflow(a, b, d=0):
    if a > 0:
        c = function_one(a)
    else:
        c = function_two(b)
    while d <= 0:
        d = function_three(c, d)
    return d
my_workflow(1, 2)

Activity

  1. JaGeo commented on Jul 5, 2025

    @JaGeo
    Contributor

    Thanks @simontaurus for your interest.

    To your question:
    No, as this is what we call a "dynamic workflow". This is on our radar, of course, and something we want to address soon (ideally in the next months)

  2. jan-janssen commented on Jul 6, 2025

    @jan-janssen
    Member

    I close this issue as it is similar to #18 .

    @simontaurus based on @samwaseda s work in https://github.com/pyiron/semantikon we are currently benchmarking possible extensions of the Python Workflow Definition to support more complex logical structures. We aim to have a proposal ready for the MADICES workshop in October https://madices.github.io

  3. simontaurus commented on Jul 11, 2025

    @simontaurus
    Author

    Just for reference: Detailed issues on this topic

    pyiron/flowrep#24 (while loop)
    pyiron/flowrep#23 (for loop)
    pyiron/flowrep#22 (if elif else)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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