NLeSC / scriptcwl

Create cwl workflows by writing a simple Python script
https://scriptcwl.readthedocs.io/
Apache License 2.0
40 stars 9 forks source link

filenames with underscores raise a ValueError exception #100

Closed SpheMakh closed 6 years ago

SpheMakh commented 6 years ago

scriptcwl is replacing underscores with hyphens, then losing track of the workflow steps if the cwl filename has an underscore. I think swapping lines 144 and 145 of workflow.py should fix this

https://github.com/NLeSC/scriptcwl/blob/master/scriptcwl/workflow.py#L144

My cwl file is named casa_gaincal.cwl, and I get this error

  File "/home/makhathini/cwl-stuff/Stimela/tenv/local/lib/python2.7/site-packages/scriptcwl/workflow.py", line 145, in __getattr__
    step = self._get_step(name)
  File "/home/makhathini/cwl-stuff/Stimela/tenv/local/lib/python2.7/site-packages/scriptcwl/workflow.py", line 313, in _get_step
    raise ValueError(msg.format(name))
ValueError: "casa-gaincal" not found in steps library. Please check your spelling or load additional steps