populse / capsul

Collaborative Analysis Platform : Simple, Unifying, Lean
Other
7 stars 14 forks source link

Processes and pipeline creation #273

Closed sapetnioc closed 9 months ago

sapetnioc commented 1 year ago

What are the various possibilities to create a process or a pipeline ?

c-langlet commented 1 year ago

My dream for the process creation part is to be able to reference one of my python script with only the needed signature parameters. The link definition part should be user friendly. No additional functional coding content should appear at this point, in my opinion. The time to go from plain python script to the Process embedding should be minimal. Pipelines should only be association of processes with linking functionalities (that may be simple for most of the usual cases)

sapetnioc commented 1 year ago

In the simplest cases we are close to your dream. In v3, a function with parameter type annotations and eventually default value can be used as-is as a process. But we very quickly get beyond of this "simplest" limit. Python functions are most often using Python objects whereas processes are often taking file system paths. AFAIK, here is no yet a Python type for paths. I heard about a PEP for that but it does not take into account type metadata indicating if the file is used as input or output for instance. But soma-base Controllers have a file type that you can use in a standard Python function.

I believe that, most often, a Python function and a Capsul executable are different because they are used in a very different context. Python functions are build to be called in a shared memory environment whereas Processes are meant to be called in a remote environment.