Skip to content

Commit fd4e834

Browse files
lbergelsoncmnbroad
authored andcommitted
Cherry-picked carrot files from lb_carrot.
1 parent 638fb11 commit fd4e834

File tree

9 files changed

+92
-0
lines changed

9 files changed

+92
-0
lines changed

.carrot/carrot_eval.wdl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version 1.0
2+
3+
task compare {
4+
input {
5+
String result
6+
String image_to_use
7+
}
8+
command {
9+
echo "Checking the result from previous test:"
10+
echo "~{result}"
11+
}
12+
runtime {
13+
docker: image_to_use
14+
}
15+
output {
16+
File comparison_result = stdout()
17+
}
18+
}
19+
20+
workflow eval_workflow {
21+
input {
22+
String result
23+
String image_to_use
24+
}
25+
call compare {
26+
input:
27+
result = result,
28+
image_to_use = image_to_use
29+
}
30+
output {
31+
File comparison_result = compare.comparison_result
32+
}
33+
}

.carrot/carrot_test.wdl

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version 1.0
2+
3+
task test_htsjdk {
4+
input {
5+
File input_file
6+
String image_to_use
7+
}
8+
command {
9+
echo "pretending to run test on ~{input_file}"
10+
}
11+
runtime {
12+
docker: image_to_use
13+
}
14+
15+
output {
16+
String result = stdout()
17+
}
18+
}
19+
20+
workflow test_workflow {
21+
input {
22+
File input_file
23+
String image_to_use
24+
}
25+
call test_htsjdk {
26+
input:
27+
input_file = input_file,
28+
image_to_use = image_to_use
29+
}
30+
output {
31+
String result = test_htsjdk.result
32+
}
33+
}
34+
35+

.carrot/eval.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"eval_workflow.result": "test_output:test_workflow.result"
3+
}
4+

.carrot/eval_defaults.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"eval_workflow.image_to_use": "ubuntu:latest"
3+
}
4+

.carrot/run_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python3.10 -m carrot_cli test run --test_input test.json --eval_input eval.json 36d33423-15a5-4d8b-aa5d-cb04eb6f6017

.carrot/test.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"test_workflow.image_to_use": "ubuntu:latest"
3+
}
4+

.carrot/test_defaults.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"test_workflow.input_file": "gs://hellbender/test/resources/nio/big.txt"
3+
}

.carrot/update_wdls.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python3.10 -m carrot_cli template update 03ff49e8-40ee-411e-b16f-f43b377cb6e9 --test_wdl carrot_test.wdl --eval_wdl carrot_eval.wdl

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This docker build is here to enable Carrot tests
2+
# It's not intended for any other purpose
3+
FROM eclipse-temurin:17
4+
5+
COPY . .
6+
RUN ./gradlew compileTestJava
7+
ENTRYPOINT bash

0 commit comments

Comments
 (0)