common-workflow-language / user_guide

The CWL v1.0 - v1.2 user guide
http://www.commonwl.org/user_guide/
Other
42 stars 68 forks source link

be explicit about using a new virtualenv with the reference runner #64

Closed manabuishii closed 2 years ago

manabuishii commented 6 years ago

When I install cwltoil after cwl-runner and cwltool , cwl-runner does not run correctly.

I test with this example Common Workflow Language User Guide: Essential Input Parameters .

  1. I install cwltool and cwl-runner
  2. I execute with cwl-runner This is OK.
  3. I install cwltoil
  4. I execute with cwl-runner This is fail
  5. I execute with cwltool This is OK

I think some module is overwrite ? and this is other problem .

I think all samples execute with cwltool not cwl-runner.

$ pip install cwltool
$ pip install cwl-runner
$ cwl-runner --version
/home/vagrant/.local/bin/cwl-runner 1.0.20171221100033
$ cwl-runner inp.cwl inp-job.yml
/home/vagrant/.local/bin/cwl-runner 1.0.20171221100033
Resolved 'inp.cwl' to 'file:///home/vagrant/inp.cwl'
[job inp.cwl] /tmp/tmpBnSIR9$ echo \
    -f \
    -i42 \
    --example-string \
    hello \
    --file=/tmp/tmp9OasAQ/stg52d4a651-2a87-4428-b16e-a4aca17734c6/whale.txt
-f -i42 --example-string hello --file=/tmp/tmp9OasAQ/stg52d4a651-2a87-4428-b16e-a4aca17734c6/whale.txt
[job inp.cwl] completed success
{}
Final process status is success
$ pip install toil
$ cwl-runner --version
3.12.0
$ cwl-runner inp.cwl inp-job.yml
vagrant 2017-12-22 07:52:03,156 MainThread INFO toil.lib.bioio: Root logger is at level 'INFO', 'toil' logger at level 'INFO'.
vagrant 2017-12-22 07:52:03,157 MainThread INFO toil.lib.bioio: Root logger is at level 'INFO', 'toil' logger at level 'INFO'.
vagrant 2017-12-22 07:52:03,161 MainThread INFO toil.jobStores.abstractJobStore: The workflow ID is: 'c3fa241a-7c74-47e7-8122-442f56641ecd'
Resolved 'inp.cwl' to 'file:///home/vagrant/inp.cwl'
vagrant 2017-12-22 07:52:03,163 MainThread INFO cwltool: Resolved 'inp.cwl' to 'file:///home/vagrant/inp.cwl'
Traceback (most recent call last):
  File "/home/vagrant/.local/bin/cwl-runner", line 11, in <module>
    sys.exit(main())
  File "/home/vagrant/.local/lib/python2.7/site-packages/toil/cwl/cwltoil.py", line 905, in main
    job = cwltool.main.load_job_order(options, t, sys.stdin)
TypeError: load_job_order() takes exactly 5 arguments (3 given)
$ cwltool inp.cwl inp-job.yml
/home/vagrant/.local/bin/cwltool 1.0.20171221100033
Resolved 'inp.cwl' to 'file:///home/vagrant/inp.cwl'
[job inp.cwl] /tmp/tmpRw7cH_$ echo \
    -f \
    -i42 \
    --example-string \
    hello \
    --file=/tmp/tmpFMDLw6/stg3970c4e6-b734-47a7-8e1e-849445f92f47/whale.txt
-f -i42 --example-string hello --file=/tmp/tmpFMDLw6/stg3970c4e6-b734-47a7-8e1e-849445f92f47/whale.txt
[job inp.cwl] completed success
{}
Final process status is success
mr-c commented 6 years ago

cwl-runner should be a point to the CWL executor that the user (or their admin) prefers.

pip install cwlref-runner makes the reference CWL runner (cwltool) this default

Unfortunately pip install toil[cwl] always installs the console scripts toil-cwl-runner also as cwl-runner. So we should get them to fix that: https://github.com/BD2KGenomics/toil/issues/1994

This repo should use cwl-runner everywhere unless it is demonstrating functionality specific to the reference CWL runner, then cwltool should be used: