common-workflow-language / common-workflow-language/cwltool
Behavior of `cwltool --pack` is inconsistent when tool has an ID
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
The typical behavior of `cwltool --pack` is to set the ID of the main tool/workflow to `#main` and then prefix all it's input and output IDs with `#main/`. However, when the tool defines `id` then the input and output IDs don't get the prefix even though the name of the tool is changed to `#main`. When I remove the tool `id` the generated file is as expected. This can be reproduced by trying to pack https://github.com/common-workflow-language/cwl-v1.2/blob/main/tests/stage_file_array.cwl with and without the tool `id` field.
Contributor guide
Research direction
Start by running cwltool --pack on tests/stage_file_array.cwl both with and without the tool id field, then compare the generated main tool, input, and output IDs. Trace the --pack handling to identify why the tool becomes #main without consistently applying the #main/ prefix; done means both cases produce consistent IDs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100