Skip to content

Commit dc23cdf

Browse files
ehoganmo-tgeddeskatherinetomkins-moJon-Lillisarjclark
authored
Recipe Test Workflow (RTW) prototype (#3210)
Co-authored-by: mo-tgeddes <[email protected]> Co-authored-by: Katherine Tomkins <[email protected]> Co-authored-by: Jon Lillis <[email protected]> Co-authored-by: Jon Lillis <[email protected]> Co-authored-by: Andrew Clark <[email protected]> Co-authored-by: Alistair Sellar <[email protected]> Co-authored-by: Alistair Sellar <[email protected]> Co-authored-by: Alistair Sellar <[email protected]> Co-authored-by: Ed <[email protected]> Co-authored-by: chrisbillowsMO <[email protected]> Co-authored-by: Valeriu Predoi <[email protected]> Co-authored-by: sloosvel <[email protected]>
1 parent e070fd5 commit dc23cdf

38 files changed

+1398
-16
lines changed

.codacy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ engines:
2121
exclude_paths: [
2222
'doc/sphinx/**',
2323
'esmvaltool/cmor/tables/**',
24-
'tests/**'
24+
'tests/**',
25+
'esmvaltool/utils/recipe_test_workflow/app/configure/bin/test_configure.py'
2526
]

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
esmvaltool/cmorizers @ESMValGroup/obs-maintainers
22
.github/workflows @valeriupredoi
3+
esmvaltool/utils/recipe_test_workflow/ @alistairsellar @ehogan

.github/workflows/check-rtw.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# This workflow performs various validation steps for Cylc and Rose.
2+
name: Check Recipe Test Workflow (RTW)
3+
4+
# Controls when the action will run
5+
on:
6+
# Triggers the workflow on push events
7+
push:
8+
paths:
9+
# - esmvaltool/utils/recipe_test_workflow/**
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Common variables are defined here
15+
env:
16+
RTW_ROOT_DIR: esmvaltool/utils/recipe_test_workflow
17+
18+
# Required shell entrypoint to have properly configured bash shell
19+
defaults:
20+
run:
21+
shell: bash -l {0}
22+
23+
# A workflow run is made up of one or more jobs that can run
24+
# sequentially or in parallel
25+
jobs:
26+
# This workflow contains a single job called "check-rtw"
27+
check-rtw:
28+
# The type of runner that the job will run on
29+
runs-on: ubuntu-latest
30+
31+
# Steps represent a sequence of tasks that will be executed as part
32+
# of the job
33+
steps:
34+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job
35+
# can access it
36+
- uses: actions/checkout@v4
37+
- uses: conda-incubator/setup-miniconda@v3
38+
with:
39+
miniforge-version: "latest"
40+
miniforge-variant: Miniforge3
41+
use-mamba: true
42+
conda-remove-defaults: "true"
43+
44+
- name: Install Cylc and Rose
45+
run: conda install cylc-flow>=8.2 cylc-rose metomi-rose
46+
47+
- name: Check current environment
48+
run: conda list
49+
50+
- name: Validate Cylc workflow
51+
run: |
52+
cd ${RTW_ROOT_DIR}
53+
cylc validate . -O metoffice
54+
55+
- name: Run Cylc configuration linter
56+
run: |
57+
cd ${RTW_ROOT_DIR}
58+
cylc lint
59+
60+
- name: Validate format of Rose configuration files
61+
run: |
62+
cd ${RTW_ROOT_DIR}
63+
output="$(rose config-dump)"
64+
msg="Run 'rose config-dump' to re-dump the Rose configuration files"
65+
msg="${msg} in the common format, then commit the changes."
66+
# The '-z' option returns true if 'output' is empty.
67+
if [[ -z "${output}" ]]; then true; else echo "${msg}" && exit 1; fi
68+
69+
- name: Validate Rose configuration metadata
70+
run: |
71+
cd ${RTW_ROOT_DIR}
72+
rose metadata-check -C meta/
73+
74+
- name: Run Rose configuration validation macros
75+
run: |
76+
cd ${RTW_ROOT_DIR}
77+
rose macro -V
78+
79+
- name: Lint shell scripts
80+
run: |
81+
cd ${RTW_ROOT_DIR}
82+
output=$(find . -name "*.sh" -exec shellcheck {} \;)
83+
if [ "$output" ]; then echo "${output}" && exit 1; fi

.zenodo.json

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,17 @@
8181
"name": "Berg, Peter",
8282
"orcid": "0000-0002-1469-2568"
8383
},
84+
{
85+
"affiliation": "Met Office, UK",
86+
"name": "Billows, Chris"
87+
},
8488
{
8589
"affiliation": "DLR, Germany",
8690
"name": "Bock, Lisa",
8791
"orcid": "0000-0001-7058-5938"
8892
},
8993
{
90-
"affiliation": "MetOffice, UK",
94+
"affiliation": "Met Office, UK",
9195
"name": "Bodas-Salcedo, Alejandro",
9296
"orcid": "0000-0002-7890-2536"
9397
},
@@ -142,21 +146,29 @@
142146
"name": "Docquier, David"
143147
},
144148
{
145-
"affiliation": "MetOffice, UK",
149+
"affiliation": "Met Office, UK",
146150
"name": "Dreyer, Laura"
147151
},
148152
{
149153
"affiliation": "DKRZ, Germany",
150154
"name": "Ehbrecht, Carsten"
151155
},
152156
{
153-
"affiliation": "MetOffice, UK",
157+
"affiliation": "Met Office, UK",
154158
"name": "Earnshaw, Paul"
155159
},
160+
{
161+
"affiliation": "Met Office, UK",
162+
"name": "Geddes, Theo"
163+
},
156164
{
157165
"affiliation": "University of Bremen, Germany",
158166
"name": "Gier, Bettina"
159167
},
168+
{
169+
"affiliation": "Met Office, UK",
170+
"name": "Gillett, Ed"
171+
},
160172
{
161173
"affiliation": "BSC, Spain",
162174
"name": "Gonzalez-Reviriego, Nube",
@@ -191,6 +203,10 @@
191203
"name": "Heuer, Helge",
192204
"orcid": "0000-0003-2411-7150"
193205
},
206+
{
207+
"affiliation": "Met Office, UK",
208+
"name": "Hogan, Emma"
209+
},
194210
{
195211
"affiliation": "BSC, Spain",
196212
"name": "Hunter, Alasdair",
@@ -227,7 +243,7 @@
227243
"orcid": "0000-0001-6085-5914"
228244
},
229245
{
230-
"affiliation": "MetOffice, UK",
246+
"affiliation": "Met Office, UK",
231247
"name": "Little, Bill"
232248
},
233249
{
@@ -279,7 +295,7 @@
279295
"name": "Sandstad, Marit"
280296
},
281297
{
282-
"affiliation": "MetOffice, UK",
298+
"affiliation": "Met Office, UK",
283299
"name": "Sellar, Alistair"
284300
},
285301
{
@@ -305,6 +321,10 @@
305321
"name": "Swaminathan, Ranjini",
306322
"orcid": "0000-0001-5853-2673"
307323
},
324+
{
325+
"affiliation": "Met Office, UK",
326+
"name": "Tomkins, Katherine"
327+
},
308328
{
309329
"affiliation": "BSC, Spain",
310330
"name": "Torralba, Verónica"
@@ -387,7 +407,7 @@
387407
"orcid": "0000-0003-3780-0784"
388408
},
389409
{
390-
"affiliation": "MetOffice, UK",
410+
"affiliation": "Met Office, UK",
391411
"name": "Munday, Gregory",
392412
"orcid": "0000-0003-4750-9923"
393413
}

CITATION.cff

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,17 @@ authors:
8585
family-names: Berg
8686
given-names: Peter
8787
orcid: "https://orcid.org/0000-0002-1469-2568"
88+
-
89+
affiliation: "Met Office, UK"
90+
family-names: Billows
91+
given-names: Chris
8892
-
8993
affiliation: "DLR, Germany"
9094
family-names: Bock
9195
given-names: Lisa
9296
orcid: "https://orcid.org/0000-0001-7058-5938"
9397
-
94-
affiliation: "MetOffice, UK"
98+
affiliation: "Met Office, UK"
9599
family-names: Bodas-Salcedo
96100
given-names: Alejandro
97101
orcid: "https://orcid.org/0000-0002-7890-2536"
@@ -146,21 +150,29 @@ authors:
146150
family-names: Docquier
147151
given-names: David
148152
-
149-
affiliation: "MetOffice, UK"
153+
affiliation: "Met Office, UK"
150154
family-names: Dreyer
151155
given-names: Laura
152156
-
153157
affiliation: "DKRZ, Germany"
154158
family-names: Ehbrecht
155159
given-names: Carsten
156160
-
157-
affiliation: "MetOffice, UK"
161+
affiliation: "Met Office, UK"
158162
family-names: Earnshaw
159163
given-names: Paul
164+
-
165+
affiliation: "Met Office, UK"
166+
family-names: Geddes
167+
given-names: Theo
160168
-
161169
affiliation: "University of Bremen, Germany"
162170
family-names: Gier
163171
given-names: Bettina
172+
-
173+
affiliation: "Met Office, UK"
174+
family-names: Gillett
175+
given-names: Ed
164176
-
165177
affiliation: "BSC, Spain"
166178
family-names: Gonzalez-Reviriego
@@ -196,6 +208,10 @@ authors:
196208
family-names: Heuer
197209
given-names: Helge
198210
orcid: "https://orcid.org/0000-0003-2411-7150"
211+
-
212+
affiliation: "Met Office, UK"
213+
family-names: Hogan
214+
given-names: Emma
199215
-
200216
affiliation: "BSC, Spain"
201217
family-names: Hunter
@@ -232,7 +248,7 @@ authors:
232248
given-names: Valerio
233249
orcid: "https://orcid.org/0000-0001-6085-5914"
234250
-
235-
affiliation: "MetOffice, UK"
251+
affiliation: "Met Office, UK"
236252
family-names: Little
237253
given-names: Bill
238254
-
@@ -289,7 +305,7 @@ authors:
289305
family-names: Sandstad
290306
given-names: Marit
291307
-
292-
affiliation: "MetOffice, UK"
308+
affiliation: "Met Office, UK"
293309
family-names: Sellar
294310
given-names: Alistair
295311
-
@@ -315,6 +331,10 @@ authors:
315331
family-names: Swaminathan
316332
given-names: Ranjini
317333
orcid: "https://orcid.org/0000-0001-5853-2673"
334+
-
335+
affiliation: "Met Office, UK"
336+
family-names: Tomkins
337+
given-names: Katherine
318338
-
319339
affiliation: "BSC, Spain"
320340
family-names: Torralba
@@ -396,8 +416,8 @@ authors:
396416
family-names: Bonnet
397417
given-names: Pauline
398418
orcid: "https://orcid.org/0000-0003-3780-0784"
399-
-
400-
affiliation: "MetOffice, UK"
419+
-
420+
affiliation: "Met Office, UK"
401421
family-names: Munday
402422
given-names: Gregory
403423
orcid: "https://orcid.org/0000-0003-4750-9923"

doc/sphinx/source/gensidebar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def _header(project, text):
6565
_write("esmvaltool", "Obtaining input data", "input")
6666
_write("esmvaltool", "Making a recipe or diagnostic", "develop/index")
6767
_write("esmvaltool", "Contributing to the community", "community/index")
68-
_write("esmvaltool", "Utilities", "utils")
68+
_write("esmvaltool", "Utilities", "utils/utils")
6969
_write("esmvaltool", "Diagnostics API Reference", "api/esmvaltool")
7070
_write("esmvaltool", "Frequently Asked Questions", "faq")
7171
_write("esmvaltool", "Changelog", "changelog")
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*****
2+
About
3+
*****
4+
5+
.. include:: common.txt
6+
7+
The Recipe Test Workflow (|RTW|) is a workflow that is used to regularly run
8+
recipes so issues can be discovered during the development process sooner
9+
rather than later.
10+
11+
|Cylc| v8 and |Rose| v2 are used as the workflow engine and application
12+
configuration system for the |RTW|, respectively. |Cylc| and |Rose| are not
13+
included in the ESMValTool environment as they are typically already centrally
14+
installed at sites e.g. JASMIN and the Met Office.

0 commit comments

Comments
 (0)