clean up directory structure
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
12
submitters/snakemake/Snakefile
Normal file
12
submitters/snakemake/Snakefile
Normal file
@@ -0,0 +1,12 @@
|
||||
rule collect_and_delete:
|
||||
input:
|
||||
[f"{i}.txt" for i in range(100)],
|
||||
run:
|
||||
shell("rm {input}")
|
||||
|
||||
|
||||
rule create:
|
||||
output:
|
||||
"{i}.txt",
|
||||
run:
|
||||
shell("touch {output}")
|
||||
9
submitters/snakemake/zoidberg/config.yaml
Normal file
9
submitters/snakemake/zoidberg/config.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
jobscript: "grid-jobscript.sh"
|
||||
cluster: "grid-submit.py"
|
||||
cluster-status: "grid-status.py"
|
||||
max-jobs-per-second: 100
|
||||
max-status-checks-per-second: 100
|
||||
restart-times: 5
|
||||
local-cores: 10
|
||||
jobs: 5000
|
||||
verbose: false
|
||||
9
submitters/snakemake/zoidberg/grid-jobscript.sh
Executable file
9
submitters/snakemake/zoidberg/grid-jobscript.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# properties = {properties}
|
||||
|
||||
set -e
|
||||
|
||||
echo "hostname:"
|
||||
hostname -f
|
||||
|
||||
{exec_job}
|
||||
14
submitters/snakemake/zoidberg/grid-status.py
Executable file
14
submitters/snakemake/zoidberg/grid-status.py
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import requests
|
||||
|
||||
resp = requests.post("http://localhost:8080/status", json=[{"id": int(sys.argv[1])}])
|
||||
|
||||
translation = {
|
||||
"Submitted": "running",
|
||||
"Completed": "success",
|
||||
"Failed": "failed",
|
||||
}
|
||||
|
||||
print(translation[resp.json()[0]["status"]])
|
||||
16
submitters/snakemake/zoidberg/grid-submit.py
Executable file
16
submitters/snakemake/zoidberg/grid-submit.py
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import requests
|
||||
|
||||
jobscript = sys.argv[1]
|
||||
|
||||
resp = requests.post(
|
||||
"http://localhost:8080/submit",
|
||||
json=[
|
||||
{"cmd": jobscript},
|
||||
],
|
||||
)
|
||||
assert resp.ok, "http request failed"
|
||||
|
||||
print(resp.json()[0]["id"])
|
||||
Reference in New Issue
Block a user