Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TBC] Should dewret force (e.g.) mypy checking? [1-26/27] #34

Open
philtweir opened this issue Jun 15, 2024 · 1 comment
Open

[TBC] Should dewret force (e.g.) mypy checking? [1-26/27] #34

philtweir opened this issue Jun 15, 2024 · 1 comment

Comments

@philtweir
Copy link
Contributor

1-26:

Can pass incorrect types in workflow steps and they end up being rendered without warning. For example,

@task()
def increment(num: int) -> int:
    return num + 1

result = increment(num="Hello World")
workflow = run(result)
cwl = render(workflow)
yaml.dump(cwl, sys.stdout, indent=2)

renders

class: Workflow
cwlVersion: 1.2
inputs: {}
outputs:
  out:
    label: out
    outputSource: increment-87042095119bafeb4cbfea12f9986bb1/out
    type: int
steps:
  increment-87042095119bafeb4cbfea12f9986bb1:
    in:
      num:
        default: Hello World
    out:
    - out
    run: increment

1-27:
The same issue, but when typing bugs are present in the task code, for example:

@task()
def increment(num: int) -> int:
    return "Phil loves mac"

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

@philtweir We should discuss this and decide if it is in scope of the initial feature request. If not, we should clarify this behavior in the documentation.

@elleryames
Copy link
Contributor

elleryames commented Jul 25, 2024

This feature is pending strategic alignment, and thus not targeted for release/0.9.1 .
FYI: @KamenDimitrov97 @philtweir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants