Skip to content

Commit de24c05

Browse files
authored
Changes to DPC template (#53)
* Alter name of UI schema * Alter quotation format * Set notebook parameters with workflow and in spec: arguments: parameters:
1 parent 1ca3f89 commit de24c05

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed
File renamed without changes.

i14/templates/dpc-template.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
workflows.diamond.ac.uk/parameter-schema: |
1010
{{- .Files.Get "schema/dpcSchema.json" | nindent 6 }}
1111
workflows.diamond.ac.uk/ui-schema: |
12-
{{- .Files.Get "schema/dpcUiSchema.json" | nindent 6 }}
12+
{{- .Files.Get "schema/dpcUISchema.json" | nindent 6 }}
1313
spec:
1414
entrypoint: dpc
1515
arguments:
@@ -19,6 +19,10 @@ spec:
1919
configMapKeyRef:
2020
name: sessionspaces
2121
key: data_directory
22+
- name: outputFolder
23+
value: /tmp/output
24+
- name: singleFirst
25+
value: 395329
2226
volumeClaimTemplates:
2327
- metadata:
2428
name: tmp
@@ -44,9 +48,9 @@ spec:
4448
inputs:
4549
parameters:
4650
- name: outputFolder
47-
value: /tmp/output
51+
value: "{{`{{ workflow.parameters.outputFolder }}`}}"
4852
- name: singleFirst
49-
value: 280793
53+
value: "{{`{{ workflow.parameters.singleFirst }}`}}"
5054
script:
5155
image: gitlab.diamond.ac.uk:5050/i14/i14_utility/dpc:v0.1
5256
env:
@@ -55,13 +59,13 @@ spec:
5559
command: [bash]
5660
source: |
5761
python -m papermill /tmp/notebook.ipynb /tmp/notebook-parametrized.ipynb \
58-
-p inpath '{{`{{workflow.parameters.visitdir}}`}}'/scan/i14-'{{`{{inputs.parameters.singleFirst}}`}}'.nxs \
62+
-p inpath "{{`{{ workflow.parameters.visitdir }}`}}/scan/i14-{{`{{ inputs.parameters.singleFirst }}`}}.nxs" \
5963
-p process_configfile /tmp/config.yaml \
60-
-p outpath '{{`{{inputs.parameters.outputFolder}}`}}'
64+
-p outpath "{{`{{ inputs.parameters.outputFolder }}`}}"
6165
python -m jupyter nbconvert --execute --allow-errors --to html --output dpc --output-dir /tmp /tmp/notebook-parametrized.ipynb
6266
volumeMounts:
6367
- name: session
64-
mountPath: "{{`{{workflow.parameters.visitdir}}`}}"
68+
mountPath: "{{`{{ workflow.parameters.visitdir }}`}}"
6569
- name: tmp
6670
mountPath: /tmp
6771
outputs:
@@ -83,7 +87,7 @@ spec:
8387
volumes:
8488
- name: session
8589
hostPath:
86-
path: "{{`{{workflow.parameters.visitdir}}`}}"
90+
path: "{{`{{ workflow.parameters.visitdir }}`}}"
8791
type: Directory
8892
- name: dpc
8993
dag:

0 commit comments

Comments
 (0)