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

Float values are not accepted for cpu because they don't coerce to int #690

Open
adamnovak opened this issue Jun 11, 2024 · 0 comments
Open
Labels
interop Bears on spec compatibility

Comments

@adamnovak
Copy link
Contributor

According to the WDL 1.1 spec, the cpu key in the runtime section may be a Float. But MiniWDL tries to coerce it to Int. So if you use a float it doesn't work.

cpu_value = runtime_eval["cpu"].coerce(Type.Int()).value

To reproduce:

cat >test.wdl <<EOF
version 1.1

task TestTask {
    input {
    }
    command <<<
        ls
    >>>
    output {
    }
    runtime {
        container: "ubuntu:latest"
        cpu: 0.5
    }
}
EOF
miniwdl check test.wdl

This gives the error:

test.wdl
    task TestTask
        (Ln 13, Col 14) UnexpectedRuntimeValue, expected Int/String for task runtime.cpu
@mlin mlin added the interop Bears on spec compatibility label Jun 27, 2024
@github-project-automation github-project-automation bot moved this to Backlog in miniwdl Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Bears on spec compatibility
Projects
Status: Backlog
Development

No branches or pull requests

2 participants