From c8709d760db6bdce4bf5329f60de0f4f0cbe7176 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 23 Mar 2023 15:29:43 +0000 Subject: [PATCH 1/6] #55: allow config file to be set through rose edit --- climate-model-evaluation-workflow/meta/rose-meta.conf | 4 ++-- climate-model-evaluation-workflow/rose-suite.conf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/climate-model-evaluation-workflow/meta/rose-meta.conf b/climate-model-evaluation-workflow/meta/rose-meta.conf index 0e3c0f1d..6f0adcfc 100644 --- a/climate-model-evaluation-workflow/meta/rose-meta.conf +++ b/climate-model-evaluation-workflow/meta/rose-meta.conf @@ -178,8 +178,8 @@ help=If required, this value must be set in a site-specific configuration file type=quoted [template variables=SITE] -compulsory=true +compulsory=false description=The site at which the Rose suite will run. help=This value must be set in a site-specific configuration file located in =the 'opt/' directory. -values="metoffice" +type=quoted \ No newline at end of file diff --git a/climate-model-evaluation-workflow/rose-suite.conf b/climate-model-evaluation-workflow/rose-suite.conf index 1f643053..2716852b 100644 --- a/climate-model-evaluation-workflow/rose-suite.conf +++ b/climate-model-evaluation-workflow/rose-suite.conf @@ -1,4 +1,4 @@ -opts=metoffice +opts= [template variables] DRS_ANA4MIPS="default" From 71a395ec21d9569cea5d76662eaba187b1f3a8c8 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 23 Mar 2023 15:32:29 +0000 Subject: [PATCH 2/6] #55: clearer error messages --- climate-model-evaluation-workflow/flow.cylc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/climate-model-evaluation-workflow/flow.cylc b/climate-model-evaluation-workflow/flow.cylc index 7f5a1765..1b4d74cb 100644 --- a/climate-model-evaluation-workflow/flow.cylc +++ b/climate-model-evaluation-workflow/flow.cylc @@ -1,7 +1,7 @@ #!jinja2 # flow.cylc -{{ assert(SITE != "", "SITE must be set to something other than an empty string") }} -{{ assert(MODULE_NAME != "", "MODULE_NAME must be set to something other than an empty string") }} +{{ assert(SITE != "", "SITE must be set to something other than an empty string. Use -O on the command line or set opts to your site through rose edit.") }} +{{ assert(MODULE_NAME != "", "MODULE_NAME must be set to something other than an empty string. Make sure the opt config file is set through the site.") }} [scheduler] UTC mode = True From 92af25ead6f8c09f0f70894a38b6f38cfaceb7aa Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 23 Mar 2023 15:46:15 +0000 Subject: [PATCH 3/6] #55: update metadat --- climate-model-evaluation-workflow/meta/rose-meta.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/climate-model-evaluation-workflow/meta/rose-meta.conf b/climate-model-evaluation-workflow/meta/rose-meta.conf index 6f0adcfc..4d7dfe42 100644 --- a/climate-model-evaluation-workflow/meta/rose-meta.conf +++ b/climate-model-evaluation-workflow/meta/rose-meta.conf @@ -182,4 +182,4 @@ compulsory=false description=The site at which the Rose suite will run. help=This value must be set in a site-specific configuration file located in =the 'opt/' directory. -type=quoted \ No newline at end of file +values="metoffice","" \ No newline at end of file From c5cdaf0e29c81cf4fec817fc786fee4c844deb1c Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 23 Mar 2023 15:54:53 +0000 Subject: [PATCH 4/6] #55: reformat error messages --- climate-model-evaluation-workflow/flow.cylc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/climate-model-evaluation-workflow/flow.cylc b/climate-model-evaluation-workflow/flow.cylc index 1b4d74cb..90995fcd 100644 --- a/climate-model-evaluation-workflow/flow.cylc +++ b/climate-model-evaluation-workflow/flow.cylc @@ -1,7 +1,9 @@ #!jinja2 # flow.cylc -{{ assert(SITE != "", "SITE must be set to something other than an empty string. Use -O on the command line or set opts to your site through rose edit.") }} -{{ assert(MODULE_NAME != "", "MODULE_NAME must be set to something other than an empty string. Make sure the opt config file is set through the site.") }} +{{ assert(SITE != "", "SITE must be set to something other than an empty string. + Use -O on the command line or set opts to your site through rose edit.") }} +{{ assert(MODULE_NAME != "", "MODULE_NAME must be set to something other than an empty string. + Make sure the opt config file is set through the site.") }} [scheduler] UTC mode = True From cdc7a1d9ad78ac7d3d3aa7b0e2ff41631ae8c884 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Thu, 23 Mar 2023 15:55:26 +0000 Subject: [PATCH 5/6] #55: run rose config dump --- climate-model-evaluation-workflow/meta/rose-meta.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/climate-model-evaluation-workflow/meta/rose-meta.conf b/climate-model-evaluation-workflow/meta/rose-meta.conf index 4d7dfe42..ddf3993c 100644 --- a/climate-model-evaluation-workflow/meta/rose-meta.conf +++ b/climate-model-evaluation-workflow/meta/rose-meta.conf @@ -182,4 +182,4 @@ compulsory=false description=The site at which the Rose suite will run. help=This value must be set in a site-specific configuration file located in =the 'opt/' directory. -values="metoffice","" \ No newline at end of file +values="metoffice","" From fa2eccb0311b94c6c5337fe073f9bd09b59a3151 Mon Sep 17 00:00:00 2001 From: Theo Geddes Date: Fri, 24 Mar 2023 08:23:35 +0000 Subject: [PATCH 6/6] #55: update workflow test to pass in site --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 38d02f76..f6a71de9 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -38,7 +38,7 @@ jobs: eval "$(conda shell.bash hook)" conda activate cmew cd climate-model-evaluation-workflow - cylc validate . + cylc validate . -O metoffice - name: Run Cylc configuration linter run: |