forked from reanahub/reana-demo-worldpopulation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
workflow.yaml
39 lines (38 loc) · 1.6 KB
/
workflow.yaml
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
# Note that if you are working on the analysis development locally, i.e. outside
# of the REANA platform, you can proceed as follows:
#
# $ cd reana-demo-worldpopulation
# $ mkdir -p yadage-local-run/yadage-inputs
# $ cd yadage-local-run
# $ cp -a ../code ../data yadage-inputs
# $ yadage-run . ../workflow/yadage/workflow.yaml \
# -p notebook=code/worldpopulation.ipynb \
# -p input_file=data/World_historical_and_predicted_populations_in_percentage.csv \
# -p region=Africa \
# -p year_min=1500 \
# -p year_max=2012 \
# -d initdir=`pwd`/yadage-inputs
# $ firefox worldpopulation/plot.png
stages:
- name: worldpopulation
dependencies: [init]
scheduler:
scheduler_type: 'singlestep-stage'
parameters:
notebook: {stages: init, output: notebook, unwrap: true}
region: {stages: init, output: region, unwrap: true}
year_min: {stages: init, output: year_min, unwrap: true}
year_max: {stages: init, output: year_max, unwrap: true}
input_file: {stages: init, output: input_file, unwrap: true}
outputfile: '{workdir}/plot.png'
step:
process:
process_type: 'string-interpolated-cmd'
cmd: 'papermill "{notebook}" /dev/null -p input_file "{input_file}" -p region "{region}" -p year_min "{year_min}" -p year_max "{year_max}" -p output_file "{outputfile}"'
publisher:
publisher_type: 'frompar-pub'
outputmap:
outputfile: outputfile
environment:
environment_type: 'docker-encapsulated'
image: 'reanahub/reana-env-jupyter'