common-workflow-language / cwltool

Common Workflow Language reference implementation
https://cwltool.readthedocs.io/
Apache License 2.0
333 stars 230 forks source link

conform to the spec: paths for File and Directory inputs placed in the InitialWorkDir must reflect that location and no other #325

Open gijzelaerr opened 7 years ago

gijzelaerr commented 7 years ago

Hi!

I think it would be useful/more clear if it is somehow possible to have access to the full path of a file that is marked writable in InitialWorkDirRequirement. Currently you just have to assume it will be in the current work folder (workdir) and you can access it with the basename flag of in the input.

Is it an idea to add a entry for path to the writable content?

It get specifically ambiguous if you use a $(JSON.stringify(inputs)) in the InitialWorkDirRequirement listing, since once inside the container you can't know which item is flagged writable or not.

mr-c commented 7 years ago

Hey @gijzelaerr , we talked about this at Tuesday's meeting and we agreed to clarify the spec and amend cwltool's behavior: https://github.com/common-workflow-language/common-workflow-language/issues/405

After this is implemented then all references to a input that has been staged to the working directory will return a path inside that working directory -- no need to guess.

tetron commented 7 years ago

Relates to https://github.com/common-workflow-language/common-workflow-language/issues/405