Runic.Workflow.CompilationUtils (Runic v0.1.0-alpha.7)

Copy Markdown View Source

Macro utilities for compiling expressions into workflow graphs or components.

Summary

Functions

Accepts a tree of lists and two item tuples representing a pipeline expression and builds a workflow graph DAG from the expression - expanding components which may have further nested pipelines and registering any components as necessary.

Used for testing and debugging purposes, this macro will compile a workflow graph from a pipeline expression and return the graph as a quoted expression.

Functions

pipeline_step(expression)

workflow_graph_of_pipeline_tree_expression(expression, name \\ nil)

Accepts a tree of lists and two item tuples representing a pipeline expression and builds a workflow graph DAG from the expression - expanding components which may have further nested pipelines and registering any components as necessary.

workflow_graph_of_pipeline_tree_expression(wrk_acc, expression, name)

workflow_of_pipeline(expression, name \\ nil)

(macro)

Used for testing and debugging purposes, this macro will compile a workflow graph from a pipeline expression and return the graph as a quoted expression.

Expects a tree of lists which may contain a component or a tuple {component, list(components | tuples)}.

Examples

workflow_of_pipeline([

{Runic.step(fn _ -> 1..4 end),
  [
    Runic.map([
      Runic.step(fn num -> num * 2 end),
      Runic.step(fn num -> num + 1 end),
      Runic.step(fn num -> num + 4 end)
    ])
  ]}

])