generated from pyiron/pyiron_module_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
@samwaseda moved in an excellent direction in #158. Since WorkflowParser is also an ast.NodeVisitor, we can pull a similar trick there. For conditional branches, we'll need to make a copy of the scope: ScopeProxy so that imports inside conditional branches aren't made available outside that branch, but I think it should all be pretty straightforward.
The goal is that we can parse nodes like
from flowrep.models.parsers import workflow_parser
@workflow_parser.workflow
def my_sneaky_wf(func):
import inspect
src = inspect.getsource(func)
return srcInstead of requiring that the import be outside the workflow definition.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request