Anduril syntax - Gig77/wiki GitHub Wiki

Anduril evaluate components

When developing workflow scripts with Anduril, "sourcing in" native code from other scripting languages via BashEvaluate, REvaluate, and alike is quite handy and thus frequently used. However, there is currently a lot of "clutter" involved when instantiating these evaluate components, which slows down development. This includes connecting output to input ports, assigning file names to output ports, and manual skeleton function calls. In addition, generic evaluate components like BashEvaluate have no declarative port names (e.g. var1 or optOut1), which makes inlined code difficult to read and write.

Much of this verbosity and opacity is avoidable by adopting a slightly different syntax. The key idea here is that the underlying functionality of Anduril stays identical, but the parser is intelligent enough to create all necessary clutter on the side, invisible from the developer.

Simple input and output files

Current syntax (Anduril 1.2):

@out.optOut1.filename = "out.txt"          // naming of output file
bash = BashEvaluate
(
  var1   =  component1.in,                 // connecting output to input port
  script = '''echo @var1@ > @optOut1@'''   // variable names not declarative
)

New syntax:

bash = BashEvaluate2('''echo @component1.in.txt@ > @out.txt@''')

TBC:

Folders

(identified by / following the @portname@)

Arrays

Trickier...

Parameters

Known variables get directly substituted by parser in external code fragments; no need to assign to component parameter first; how recognized?

Anduril2