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

CWL generation: invalid result with output_type=File(), selector=Stdout() → "outputEval: _stderr" #95

Open
mr-c opened this issue Aug 30, 2021 · 1 comment · May be fixed by #100
Open

Comments

@mr-c
Copy link
Contributor

mr-c commented Aug 30, 2021

outputs:
- id: result
  label: result
  type: File
  outputBinding:
    glob: _stdout
    outputEval: _stderr
    loadContents: false

The outputEval: _stderr is nonsensical here

From

hello_janis.py

from typing import List, Optional, Dict, Any

from janis_core import *
from janis_core.types.common_data_types import File

Optionalexample_Dev = CommandToolBuilder(
    tool="OptionalExample",
    base_command=["echo", "Hello, World!"],
    inputs=[],
    outputs=[
        ToolOutput(
            tag="result",
            output_type=File(),
            selector=Stdout(subtype=File(), optional=False),
            doc=OutputDocumentation(doc=None),
        )
    ],
    container="ubuntu:latest",
    version="DEV",
)


if __name__ == "__main__":
    Optionalexample_Dev().translate("cwl")
@mr-c mr-c changed the title CWL generation: incorrect stdout with "outputEval: _stderr" CWL generation: invalidresult with output_type=File(), selector=Stdout() → "outputEval: _stderr" Aug 30, 2021
@mr-c mr-c changed the title CWL generation: invalidresult with output_type=File(), selector=Stdout() → "outputEval: _stderr" CWL generation: invalid result with output_type=File(), selector=Stdout() → "outputEval: _stderr" Aug 30, 2021
@mr-c
Copy link
Contributor Author

mr-c commented Aug 30, 2021

FYI, that example above is a variation on the output of fromwdl using the following.

version 1.0                                                                     
                                                                                
                                                                                
task OptionalExample {                                                          
    input {                                                                     
    }                                                                           
                                                                                
    command {                                                                   
       echo Hello, world!                                                       
    }                                                                           
                                                                                
    output {                                                                    
        File result = stdout()                                                  
    }                                                                           
                                                                                
    runtime {                                                                   
        memory: 1                                                               
    }                                                                           
                                                                                
}

So maybe fromwdl should be updated to use generate ToolOutput(tag="result",output_type=Stdout) instead

@illusional illusional linked a pull request Sep 1, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant