flaxandteal / dewret

DEclarative Workflow REndering Tool
Apache License 2.0
1 stars 0 forks source link

Follow up / Check whether return of multiple unnamed objects, such as in a tuple [1-24] #31

Closed philtweir closed 1 day ago

elleryames commented 2 months ago

As an example

import sys
import yaml
from dewret.tasks import task, run
from dewret.renderers.cwl import render

@task()
def paris_coordinates_in_deg() -> tuple[float, float]:
    return 48.856667, 2.351667

result = paris_coordinates_in_deg()
workflow = run(result)
cwl = render(workflow)
yaml.dump(cwl, sys.stdout, indent=2)

complains "TypeError: Cannot render complex type (tuple[float, float]) to CWL."

elleryames commented 2 months ago

@philtweir we should follow up about this issue.

elleryames commented 2 months ago

Hey @KamenDimitrov97 , I think you could look into this. There are two possible outcomes or rather reasonable conclusions to this task:

1) The functionality can be added, which is great, and it should be demonstrated in an example and tested. 2) There is an significant or fundamental obstacle to adding this functionality, in which case the restriction should be documented.

elleryames commented 2 months ago

@philtweir , do you have any comments or suggestions on where to start with this task?

elleryames commented 1 month ago

Plan: @KamenDimitrov97 will take over @philtweir 's old work on this, rebase/port, write tests, and fix any remaining bugs, and create the PR.