Skip to content

Upgrading to latest version of cwl-runner breaks command line inputs #69

Closed

Description

@prismofeverything

The previous version of cwl-runner I could do this:

cwl-runner cat.cwl --input README.md 

using the following workflow (performs a simple cat):

#!/usr/bin/env cwl-runner
cwlVersion: "cwl:draft-3"
class: CommandLineTool
description: "This tool is developed for SMC-RNA Challenge for detecting gene fusions (STAR fusion)"
inputs:
  #Give it a list of input files
  - id: input
    type: File
    inputBinding:
      position: 0 
outputs:
  - id: output
    type: File
    outputBinding:
      glob: test.txt
stdout: test.txt
baseCommand: [cat]

and I would get a result:

Final process status is success
{
    "output": {
        "size": 68, 
        "path": "/Users/spanglry/Code/importers/test.txt", 
        "checksum": "sha1$3f9848f75373e501d9832e9d47899b6ee3cfa780", 
        "class": "File"
    }
}

And the contents of README.md would be present in the output file test.txt.

Today I upgraded to the latest cwl-runner and the exact same process now fails!

/usr/local/bin/cwl-runner 1.0.20160425140546
Traceback (most recent call last):
  File "/usr/local/bin/cwl-runner", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/cwltool/main.py", line 590, in main
    stdout=stdout)
  File "/usr/local/lib/python2.7/site-packages/cwltool/main.py", line 434, in load_job_order
    cmd_line = vars(toolparser.parse_args(args.job_order))
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1701, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1733, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1939, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1879, in consume_optional
    take_action(action, args, option_string)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1807, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 802, in __call__
    raise NotImplementedError(_('.__call__() not defined'))
NotImplementedError: .__call__() not defined

Any idea what happened?

Activity

  1. mr-c commented on Apr 26, 2016

    @mr-c
    Member

    Hello @prismofeverything, thank you for your report.

    Do you know which version of cwltool worked previously?

  2. prismofeverything commented on Apr 26, 2016

    @prismofeverything
    ContributorAuthor

    This was the one:

    /usr/local/bin/cwl-runner 1.0.20160310140736

  3. mr-c commented on Apr 26, 2016

    @mr-c
    Member

    Then 021d3fd is the commit that worked; I'm looking into it now.

  4. mr-c commented on Apr 26, 2016

    @mr-c
    Member

    Oh, git bisect you are efficient and cruel: a3d24f8 is the first bad commit

    commit a3d24f8da648befae983fe9f1b995713fdfcb28f
    Author: Michael R. Crusoe <[email protected]>
    Date:   Tue Mar 29 02:41:31 2016 -0700
    
        add type hints
    
  5. mr-c commented on Apr 26, 2016

    @mr-c
    Member

    Fixed in a85f8fd including a test using your sample code. Thank you for the test case!

    Sorry for the bother.

  6. prismofeverything commented on Apr 26, 2016

    @prismofeverything
    ContributorAuthor

    Not at all, thanks for your speedy response!

  7. added a commit that references this issue on Mar 20, 2018
  8. added a commit that references this issue on Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions