Skip to content

Commit

Permalink
Recipe Test Workflow (RTW) prototype (#3210)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
13 people authored Nov 21, 2024
1 parent e070fd5 commit dc23cdf
Show file tree
Hide file tree
Showing 38 changed files with 1,398 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ engines:
exclude_paths: [
'doc/sphinx/**',
'esmvaltool/cmor/tables/**',
'tests/**'
'tests/**',
'esmvaltool/utils/recipe_test_workflow/app/configure/bin/test_configure.py'
]
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
esmvaltool/cmorizers @ESMValGroup/obs-maintainers
.github/workflows @valeriupredoi
esmvaltool/utils/recipe_test_workflow/ @alistairsellar @ehogan
83 changes: 83 additions & 0 deletions .github/workflows/check-rtw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This workflow performs various validation steps for Cylc and Rose.
name: Check Recipe Test Workflow (RTW)

# Controls when the action will run
on:
# Triggers the workflow on push events
push:
paths:
# - esmvaltool/utils/recipe_test_workflow/**

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Common variables are defined here
env:
RTW_ROOT_DIR: esmvaltool/utils/recipe_test_workflow

# Required shell entrypoint to have properly configured bash shell
defaults:
run:
shell: bash -l {0}

# A workflow run is made up of one or more jobs that can run
# sequentially or in parallel
jobs:
# This workflow contains a single job called "check-rtw"
check-rtw:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part
# of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job
# can access it
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: "latest"
miniforge-variant: Miniforge3
use-mamba: true
conda-remove-defaults: "true"

- name: Install Cylc and Rose
run: conda install cylc-flow>=8.2 cylc-rose metomi-rose

- name: Check current environment
run: conda list

- name: Validate Cylc workflow
run: |
cd ${RTW_ROOT_DIR}
cylc validate . -O metoffice
- name: Run Cylc configuration linter
run: |
cd ${RTW_ROOT_DIR}
cylc lint
- name: Validate format of Rose configuration files
run: |
cd ${RTW_ROOT_DIR}
output="$(rose config-dump)"
msg="Run 'rose config-dump' to re-dump the Rose configuration files"
msg="${msg} in the common format, then commit the changes."
# The '-z' option returns true if 'output' is empty.
if [[ -z "${output}" ]]; then true; else echo "${msg}" && exit 1; fi
- name: Validate Rose configuration metadata
run: |
cd ${RTW_ROOT_DIR}
rose metadata-check -C meta/
- name: Run Rose configuration validation macros
run: |
cd ${RTW_ROOT_DIR}
rose macro -V
- name: Lint shell scripts
run: |
cd ${RTW_ROOT_DIR}
output=$(find . -name "*.sh" -exec shellcheck {} \;)
if [ "$output" ]; then echo "${output}" && exit 1; fi
32 changes: 26 additions & 6 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,17 @@
"name": "Berg, Peter",
"orcid": "0000-0002-1469-2568"
},
{
"affiliation": "Met Office, UK",
"name": "Billows, Chris"
},
{
"affiliation": "DLR, Germany",
"name": "Bock, Lisa",
"orcid": "0000-0001-7058-5938"
},
{
"affiliation": "MetOffice, UK",
"affiliation": "Met Office, UK",
"name": "Bodas-Salcedo, Alejandro",
"orcid": "0000-0002-7890-2536"
},
Expand Down Expand Up @@ -142,21 +146,29 @@
"name": "Docquier, David"
},
{
"affiliation": "MetOffice, UK",
"affiliation": "Met Office, UK",
"name": "Dreyer, Laura"
},
{
"affiliation": "DKRZ, Germany",
"name": "Ehbrecht, Carsten"
},
{
"affiliation": "MetOffice, UK",
"affiliation": "Met Office, UK",
"name": "Earnshaw, Paul"
},
{
"affiliation": "Met Office, UK",
"name": "Geddes, Theo"
},
{
"affiliation": "University of Bremen, Germany",
"name": "Gier, Bettina"
},
{
"affiliation": "Met Office, UK",
"name": "Gillett, Ed"
},
{
"affiliation": "BSC, Spain",
"name": "Gonzalez-Reviriego, Nube",
Expand Down Expand Up @@ -191,6 +203,10 @@
"name": "Heuer, Helge",
"orcid": "0000-0003-2411-7150"
},
{
"affiliation": "Met Office, UK",
"name": "Hogan, Emma"
},
{
"affiliation": "BSC, Spain",
"name": "Hunter, Alasdair",
Expand Down Expand Up @@ -227,7 +243,7 @@
"orcid": "0000-0001-6085-5914"
},
{
"affiliation": "MetOffice, UK",
"affiliation": "Met Office, UK",
"name": "Little, Bill"
},
{
Expand Down Expand Up @@ -279,7 +295,7 @@
"name": "Sandstad, Marit"
},
{
"affiliation": "MetOffice, UK",
"affiliation": "Met Office, UK",
"name": "Sellar, Alistair"
},
{
Expand All @@ -305,6 +321,10 @@
"name": "Swaminathan, Ranjini",
"orcid": "0000-0001-5853-2673"
},
{
"affiliation": "Met Office, UK",
"name": "Tomkins, Katherine"
},
{
"affiliation": "BSC, Spain",
"name": "Torralba, Verónica"
Expand Down Expand Up @@ -387,7 +407,7 @@
"orcid": "0000-0003-3780-0784"
},
{
"affiliation": "MetOffice, UK",
"affiliation": "Met Office, UK",
"name": "Munday, Gregory",
"orcid": "0000-0003-4750-9923"
}
Expand Down
34 changes: 27 additions & 7 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,17 @@ authors:
family-names: Berg
given-names: Peter
orcid: "https://orcid.org/0000-0002-1469-2568"
-
affiliation: "Met Office, UK"
family-names: Billows
given-names: Chris
-
affiliation: "DLR, Germany"
family-names: Bock
given-names: Lisa
orcid: "https://orcid.org/0000-0001-7058-5938"
-
affiliation: "MetOffice, UK"
affiliation: "Met Office, UK"
family-names: Bodas-Salcedo
given-names: Alejandro
orcid: "https://orcid.org/0000-0002-7890-2536"
Expand Down Expand Up @@ -146,21 +150,29 @@ authors:
family-names: Docquier
given-names: David
-
affiliation: "MetOffice, UK"
affiliation: "Met Office, UK"
family-names: Dreyer
given-names: Laura
-
affiliation: "DKRZ, Germany"
family-names: Ehbrecht
given-names: Carsten
-
affiliation: "MetOffice, UK"
affiliation: "Met Office, UK"
family-names: Earnshaw
given-names: Paul
-
affiliation: "Met Office, UK"
family-names: Geddes
given-names: Theo
-
affiliation: "University of Bremen, Germany"
family-names: Gier
given-names: Bettina
-
affiliation: "Met Office, UK"
family-names: Gillett
given-names: Ed
-
affiliation: "BSC, Spain"
family-names: Gonzalez-Reviriego
Expand Down Expand Up @@ -196,6 +208,10 @@ authors:
family-names: Heuer
given-names: Helge
orcid: "https://orcid.org/0000-0003-2411-7150"
-
affiliation: "Met Office, UK"
family-names: Hogan
given-names: Emma
-
affiliation: "BSC, Spain"
family-names: Hunter
Expand Down Expand Up @@ -232,7 +248,7 @@ authors:
given-names: Valerio
orcid: "https://orcid.org/0000-0001-6085-5914"
-
affiliation: "MetOffice, UK"
affiliation: "Met Office, UK"
family-names: Little
given-names: Bill
-
Expand Down Expand Up @@ -289,7 +305,7 @@ authors:
family-names: Sandstad
given-names: Marit
-
affiliation: "MetOffice, UK"
affiliation: "Met Office, UK"
family-names: Sellar
given-names: Alistair
-
Expand All @@ -315,6 +331,10 @@ authors:
family-names: Swaminathan
given-names: Ranjini
orcid: "https://orcid.org/0000-0001-5853-2673"
-
affiliation: "Met Office, UK"
family-names: Tomkins
given-names: Katherine
-
affiliation: "BSC, Spain"
family-names: Torralba
Expand Down Expand Up @@ -396,8 +416,8 @@ authors:
family-names: Bonnet
given-names: Pauline
orcid: "https://orcid.org/0000-0003-3780-0784"
-
affiliation: "MetOffice, UK"
-
affiliation: "Met Office, UK"
family-names: Munday
given-names: Gregory
orcid: "https://orcid.org/0000-0003-4750-9923"
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/source/gensidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _header(project, text):
_write("esmvaltool", "Obtaining input data", "input")
_write("esmvaltool", "Making a recipe or diagnostic", "develop/index")
_write("esmvaltool", "Contributing to the community", "community/index")
_write("esmvaltool", "Utilities", "utils")
_write("esmvaltool", "Utilities", "utils/utils")
_write("esmvaltool", "Diagnostics API Reference", "api/esmvaltool")
_write("esmvaltool", "Frequently Asked Questions", "faq")
_write("esmvaltool", "Changelog", "changelog")
Expand Down
14 changes: 14 additions & 0 deletions doc/sphinx/source/utils/RTW/about.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*****
About
*****

.. include:: common.txt

The Recipe Test Workflow (|RTW|) is a workflow that is used to regularly run
recipes so issues can be discovered during the development process sooner
rather than later.

|Cylc| v8 and |Rose| v2 are used as the workflow engine and application
configuration system for the |RTW|, respectively. |Cylc| and |Rose| are not
included in the ESMValTool environment as they are typically already centrally
installed at sites e.g. JASMIN and the Met Office.
Loading

0 comments on commit dc23cdf

Please sign in to comment.