forked from cumc/xqtl-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sos
executable file
·51 lines (44 loc) · 1.6 KB
/
release.sos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env sos-runner
#fileformat=SOS1.0
[docker_to_singularity]
import glob
depends: executable('spython')
input: glob.glob("container/docker/*.dockerfile"), group_by = 1
output: f"container/singularity/{_input:bn}.def"
bash: expand = True
spython recipe {_input} | sed 's/Stage: spython-base//g' &> {_output}
[singularity]
parameter: config = path
parameter: out_dir = path('container/singularity')
bash: expand = True, stderr = f'{config}.stderr', stdout = f'{config}.stdout'
rm -f {out_dir}/{config:bn}.sif
singularity build --fakeroot {out_dir}/{config:bn}.sif {config}
md5sum {out_dir}/{config:bn}.sif > {out_dir}/{config:bn}.md5
[docker]
import glob
depends: executable('docker')
input: glob.glob("container/docker/*.dockerfile"), group_by = 1, concurrent = False
repo = str(_input).split("/")[-1].lower()[:-11]
bash: expand = True
set -e
docker build -t gaow/{repo} -f {_input} .
docker push gaow/{repo}
[build, default_1]
input: group_by = 'all'
bash:
rm -f pipeline/*.ipynb
jupyter-book build . --path-output . --config website/_config.yml --toc website/_toc.yml
rsync -auzP code/images/* _build/html/_images/
ghp-import -n -p -f _build/html
[make_link, default_2]
from glob import glob
input: [x for x in glob('code/**/*.ipynb', recursive=True) if not '.ipynb_checkpoints' in x], group_by = 1
output: f'pipeline/{_input:b}'
bash: expand = True
cd pipeline
ln -s ../{_input} {_output:b}
[make_manuscript, default_3]
input: group_by = "all"
bash: expand = True
cd website/nature_protocol
jupyter nbconvert --to notebook --execute conversion_notebook.ipynb && rm -f conversion_notebook.nbconvert.ipynb