Skip to content

Draft: "method" task with multiple outputs

Thomas Vincent requested to merge method-output into main

This MR proposes a way to define a Task with multiple outputs from a Python function.

For me the goal is two-fold:

  • Hopefully have a simpler way to define a Task based on Python syntax.
  • Write Tasks that can also be used directly outside ewoks and called directly from Python as well.

I can imagine different ways to do this, this MR proposes one approach: Use the function return type annotation to define the task output fields.

As it is, by default there is a single "return_value" output and the use of return type is enabled through a decorator. I'm not sure about the best default and the way to choose to "unpack" outputs or keep a single one, but I'd expect allowing both is needed.

Related to #46

Merge request reports

Loading