-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
networkAcess
, envDef
, and initialWorkDir
tests
- Loading branch information
Showing
56 changed files
with
2,220 additions
and
45 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class: CommandLineTool | ||
cwlVersion: v1.3.0-dev1 | ||
requirements: | ||
- class: ShellCommandRequirement | ||
initialWorkDir: $(inputs.indir.listing) | ||
inputs: | ||
indir: | ||
type: Directory | ||
loadListing: shallow_listing | ||
outputs: | ||
outlist: | ||
type: File | ||
outputBinding: | ||
glob: output.txt | ||
arguments: ["find", "-L", ".", "!", "-path", "*.txt", | ||
{shellQuote: false, valueFrom: "|"}, | ||
"sort"] | ||
stdout: output.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class: CommandLineTool | ||
cwlVersion: v1.3.0-dev1 | ||
inputs: | ||
in: string | ||
outputs: | ||
out: | ||
type: File | ||
outputBinding: | ||
glob: out | ||
|
||
envDef: | ||
TEST_ENV: $(inputs.in) | ||
|
||
baseCommand: ["/bin/sh", "-c", "echo $TEST_ENV"] | ||
|
||
stdout: out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class: CommandLineTool | ||
cwlVersion: v1.3.0-dev1 | ||
inputs: | ||
in: string | ||
outputs: | ||
out: | ||
type: File | ||
outputBinding: | ||
glob: out | ||
|
||
envDef: | ||
TEST_ENV: conflict_original | ||
|
||
baseCommand: ["/bin/bash", "-c", "echo $TEST_ENV"] | ||
|
||
stdout: out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env cwl-runner | ||
class: Workflow | ||
cwlVersion: v1.3.0-dev1 | ||
|
||
inputs: | ||
in: string | ||
|
||
outputs: | ||
out: | ||
type: File | ||
outputSource: step1/out | ||
|
||
requirements: | ||
EnvVarRequirement: | ||
envDef: | ||
TEST_ENV: override | ||
|
||
steps: | ||
step1: | ||
run: env-tool1_noreq.cwl | ||
in: | ||
in: in | ||
out: [out] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class: CommandLineTool | ||
cwlVersion: v1.3.0-dev1 | ||
requirements: | ||
ShellCommandRequirement: {} | ||
initialWorkDir: | ||
- entry: $(inputs.file1) | ||
entryname: bob.txt | ||
inputs: | ||
file1: File | ||
outputs: [] | ||
arguments: | ||
- shellQuote: false | ||
valueFrom: | | ||
test "$(inputs.file1.path)" = "$(runtime.outdir)/bob.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env cwl-runner | ||
|
||
cwlVersion: v1.3.0-dev1 | ||
|
||
initialWorkDir: | ||
- $(inputs.INPUT) | ||
|
||
class: CommandLineTool | ||
|
||
inputs: | ||
- id: INPUT | ||
type: File | ||
|
||
outputs: | ||
- id: OUTPUT | ||
type: File | ||
outputBinding: | ||
glob: $(runtime.outdir)/$(inputs.INPUT.basename) | ||
secondaryFiles: | ||
- .fai | ||
|
||
arguments: | ||
- valueFrom: $(inputs.INPUT.basename).fai | ||
position: 0 | ||
|
||
baseCommand: [touch] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env cwl-runner | ||
|
||
cwlVersion: v1.3.0-dev1 | ||
|
||
requirements: | ||
- class: DockerRequirement | ||
dockerPull: docker.io/debian:stable-slim | ||
|
||
initialWorkDir: | ||
- $(inputs.INPUT) | ||
|
||
class: CommandLineTool | ||
|
||
inputs: | ||
- id: INPUT | ||
type: File | ||
|
||
outputs: | ||
- id: OUTPUT | ||
type: File | ||
outputBinding: | ||
glob: $(inputs.INPUT.basename) | ||
secondaryFiles: | ||
- .fai | ||
|
||
arguments: | ||
- valueFrom: $(inputs.INPUT.basename).fai | ||
position: 0 | ||
|
||
baseCommand: [touch] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env cwl-runner | ||
class: Workflow | ||
cwlVersion: v1.3.0-dev1 | ||
inputs: [] | ||
outputs: | ||
a: | ||
type: int | ||
outputSource: step3/output | ||
b: | ||
type: int | ||
outputSource: step4/output | ||
steps: | ||
step1: | ||
in: | ||
in: {default: "3"} | ||
out: [out] | ||
run: echo-file-tool.cwl | ||
step2: | ||
in: | ||
r: step1/out | ||
out: [out] | ||
run: updateval_inplace_noiwdr.cwl | ||
step3: | ||
in: | ||
file1: step1/out | ||
wait: step2/out | ||
out: [output] | ||
run: parseInt-tool.cwl | ||
step4: | ||
in: | ||
file1: step2/out | ||
out: [output] | ||
run: parseInt-tool.cwl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env cwl-runner | ||
class: Workflow | ||
cwlVersion: v1.3.0-dev1 | ||
inputs: [] | ||
requirements: | ||
InlineJavascriptRequirement: {} | ||
outputs: | ||
a: | ||
type: File[] | ||
outputSource: step3/d1out | ||
b: | ||
type: File[] | ||
outputSource: step3/d2out | ||
steps: | ||
step1: | ||
in: | ||
dirname: {default: step1dir} | ||
out: [out] | ||
run: mkdir.cwl | ||
step2: | ||
in: | ||
r: step1/out | ||
out: [out] | ||
run: updatedir_inplace_noiwdr.cwl | ||
step3: | ||
in: | ||
d1: step1/out | ||
d2: step2/out | ||
out: [d1out, d2out] | ||
run: | ||
class: ExpressionTool | ||
inputs: | ||
d1: | ||
type: Directory | ||
loadListing: shallow_listing | ||
d2: | ||
type: Directory | ||
loadListing: shallow_listing | ||
outputs: | ||
d1out: File[] | ||
d2out: File[] | ||
expression: "$({d1out: inputs.d1.listing, d2out: inputs.d2.listing})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
cwlVersion: v1.3.0-dev1 | ||
class: CommandLineTool | ||
doc: | | ||
When executing in a container, entryname can have an absolute path | ||
to a mount location inside the container. | ||
|
||
inputs: | ||
filelist: File | ||
|
||
outputs: | ||
head: | ||
type: File | ||
outputBinding: | ||
glob: head.txt | ||
|
||
requirements: | ||
DockerRequirement: | ||
dockerPull: docker.io/debian:stable-slim | ||
dockerOutputDirectory: /output | ||
ShellCommandRequirement: {} | ||
|
||
initialWorkDir: | ||
- entryname: /tmp2j3y7rpb/input/stuff.txt # Give it a weird prefix to minimize chance of conflict with a real file | ||
entry: $(inputs.filelist) | ||
|
||
arguments: | ||
- {shellQuote: false, valueFrom: "head -n10 /tmp2j3y7rpb/input/stuff.txt > /output/head.txt"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
cwlVersion: v1.3.0-dev1 | ||
class: CommandLineTool | ||
doc: | | ||
Must fail if entryname is an absolute path and DockerRequirement is | ||
not in the 'requirements' section. | ||
inputs: | ||
filelist: File | ||
outputs: | ||
head: | ||
type: File | ||
outputBinding: | ||
glob: head.txt | ||
requirements: | ||
ShellCommandRequirement: {} | ||
|
||
initialWorkDir: | ||
- entryname: /tmp2j3y7rpb/input/stuff.txt # Give it a weird prefix to minimize chance of conflict with a real file | ||
entry: $(inputs.filelist) | ||
|
||
arguments: | ||
- {shellQuote: false, valueFrom: "head -n10 /tmp2j3y7rpb/input/stuff.txt > /output/head.txt"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cwlVersion: v1.3.0-dev1 | ||
class: CommandLineTool | ||
doc: | | ||
Must fail if entryname is an absolute path and DockerRequirement is | ||
not in the 'requirements' section. | ||
inputs: | ||
filelist: File | ||
outputs: | ||
head: | ||
type: File | ||
outputBinding: | ||
glob: head.txt | ||
hints: | ||
DockerRequirement: | ||
dockerPull: docker.io/debian:stable-slim | ||
dockerOutputDirectory: /output | ||
requirements: | ||
ShellCommandRequirement: {} | ||
|
||
initialWorkDir: | ||
- entryname: /tmp2j3y7rpb/input/stuff.txt # Give it a weird prefix to minimize chance of conflict with a real file | ||
entry: $(inputs.filelist) | ||
arguments: | ||
- {shellQuote: false, valueFrom: "head -n10 /tmp2j3y7rpb/input/stuff.txt > /output/head.txt"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
cwlVersion: v1.3.0-dev1 | ||
class: CommandLineTool | ||
doc: | | ||
Must fail if entryname starts with ../ | ||
inputs: | ||
filelist: File | ||
outputs: | ||
head: | ||
type: File | ||
outputBinding: | ||
glob: head.txt | ||
|
||
initialWorkDir: | ||
- entryname: ../input/stuff.txt # Illegal | ||
entry: $(inputs.filelist) | ||
|
||
requirements: | ||
ShellCommandRequirement: {} | ||
|
||
arguments: | ||
- {shellQuote: false, valueFrom: "head -n10 ../input/stuff.txt > head.txt"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env cwl-runner | ||
class: CommandLineTool | ||
cwlVersion: v1.3.0-dev1 | ||
doc: Can have a file declared directly in an initialWorkDir | ||
initialWorkDir: | ||
- class: File | ||
location: ../loadContents/inp-filelist.txt | ||
- class: Directory | ||
location: ../testdir | ||
inputs: [] | ||
outputs: | ||
filelist: | ||
type: File | ||
outputBinding: | ||
glob: inp-filelist.txt | ||
testdir: | ||
type: Directory | ||
outputBinding: | ||
glob: testdir | ||
baseCommand: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env cwl-runner | ||
class: CommandLineTool | ||
cwlVersion: v1.3.0-dev1 | ||
doc: Can have a file declared directly in initialWorkDir | ||
initialWorkDir: | ||
- [{class: File, location: ../loadContents/inp-filelist.txt}, | ||
{class: Directory, location: ../testdir}] | ||
inputs: [] | ||
outputs: | ||
filelist: | ||
type: File | ||
outputBinding: | ||
glob: inp-filelist.txt | ||
testdir: | ||
type: Directory | ||
outputBinding: | ||
glob: testdir | ||
baseCommand: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env cwl-runner | ||
class: CommandLineTool | ||
cwlVersion: v1.3.0-dev1 | ||
initialWorkDir: | ||
- entryname: "out-filelist.json" | ||
entry: | | ||
${ | ||
var ls = []; | ||
for (var i = 1; i < 10000; i++) { | ||
ls.push("example_input_file"+i+".txt"); | ||
} | ||
return ls; | ||
} | ||
requirements: | ||
InlineJavascriptRequirement: {} | ||
inputs: [] | ||
outputs: | ||
filelist: | ||
type: File | ||
outputBinding: | ||
glob: out-filelist.json | ||
arguments: ["true"] |
Oops, something went wrong.