Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental feature to change substitution prefix. #1132

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tetron
Copy link
Member

@tetron tetron commented Jun 10, 2019

Example of combining this feature with attachments (common-workflow-language/schema_salad#254) to simplify wrapping an inline bash script:

#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
$namespaces:
  cwltool: "http://commonwl.org/cwltool#"
baseCommand: [/bin/sh, script]
requirements:
  cwltool:SubstitutionPrefix:
    substitutionPrefix: "@"
  InitialWorkDirRequirement:
    listing:
      - entryname: script
        entry: {$include: "#attachment-1"}
inputs:
  msg: string
outputs:
  output:
    type: File
    outputBinding:
      glob: output.txt
--- |
echo Zip@(inputs.msg) $(date) > output.txt

@mr-c
Copy link
Member

mr-c commented Jun 11, 2019

For your example I would demonstrate use of EnvVarRequirement and turn off the substitution altogether

@multimeric
Copy link

I like it. I think having this would solve a lot of issues.

However I still believe InitialWorkDirRequirement is not the most logical place for the inclusion of scripts. We still need a construct that is intuitively for including scripts and setting them as the tool's command, which is where my ScriptTool proposal etc come in. That said we could reasonably add this substitutionPrefix feature in independently from any better mechanism for referring to scripts.

@mr-c mr-c changed the base branch from master to main July 2, 2020 11:21
@mr-c mr-c marked this pull request as draft December 3, 2020 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants