Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
data
data
.DS_Store
output/*
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ To test, create `input` and `output` subfolders in the `data` directory. Create
Re-Run: `docker-compose up --build`

The testfile should be copied to the `data/output` directory.

To run cwl file:

`cwltool --outdir=data main.cwl job.yml`
7 changes: 7 additions & 0 deletions job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# job.yml
script:
class: File
path: main.py
input_dir:
class: Directory
path: data/input
34 changes: 34 additions & 0 deletions main.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cwlVersion: v1.2
class: CommandLineTool

requirements:
DockerRequirement:
dockerPull: hackathon/python
InitialWorkDirRequirement:
listing:
- entryname: main.py
entry: $(inputs.script)
- entryname: data/input
entry: $(inputs.input_dir)
- entryname: data/output
entry: "$(null)"
writable: true
EnvVarRequirement:
envDef:
INPUT_DIR: "data/input"
OUTPUT_DIR: "data/output"

inputs:
script:
type: File
doc: "The main Python script"

input_dir:
type: Directory
doc: "Input directory"

outputs:
output_dir:
type: Directory
outputBinding:
glob: data/output