Skip to content

Commit

Permalink
#3601: Review rose-app.conf files in recipe test workflow
Browse files Browse the repository at this point in the history
Co-authored-by: Emma Hogan <[email protected]>
  • Loading branch information
mo-gill and ehogan authored Jun 25, 2024
1 parent 290c847 commit cc1afc6
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 43 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/check-rtw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,9 @@ jobs:
run: |
cd esmvaltool/utils/recipe_test_workflow/doc
make linkcheck
- name: Lint shell scripts
run: |
cd esmvaltool/utils/recipe_test_workflow
output=$(find . -name "*.sh" -exec shellcheck {} \;)
if [ "$output" ]; then echo "${output}" && exit 1; fi

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[command]
default=rtw-env compare_task_runner.sh

[env]
KGO_ROOT_PATH=${KGO_ROOT_PATH}
default=BASH_XTRACEFD=1 # Send the output from 'set -x' to 'stdout' rather than 'stderr'.
=set -euxo pipefail
=rtw-env python ${COMPARE_SCRIPT} ${KGO_DIR} ${COMPARISON_OUTPUT_DIR} --verbose

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Copy the site specific environment file to the 'share/bin' directory in the
# installed Cylc workflow (this directory is automatically added to the
# ${PATH} by Cylc).

[command]
default=install_env_file.sh
default=BASH_XTRACEFD=1 # Send the output from 'set -x' to 'stdout' rather than 'stderr'.
=set -euxo pipefail
=cp ${ENV_FILE_SITE_PATH} ${SHARE_BIN_DIR}/${ENV_FILE}

[env]
SITE=${SITE}
[file:${SHARE_BIN_DIR}]
mode=mkdir
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
platform = localhost
[[[environment]]]
SITE = {{ SITE }}
ENV_FILE=rtw-env
ENV_FILE_SITE_PATH=${CYLC_WORKFLOW_RUN_DIR}/site/${SITE}-env
SHARE_BIN_DIR=${CYLC_WORKFLOW_SHARE_DIR}/bin

[[get_esmval]]
[[[environment]]]
Expand Down Expand Up @@ -88,23 +91,30 @@
ROSE_TASK_APP = process
RECIPE_PATH = "${CYLC_TASK_PARAM_medium//--//}.yml"

[[COMPARE]]
inherit = None, COMPUTE
[[[environment]]]
ROSE_TASK_APP = compare
KGO_ROOT_PATH = {{ KGO_ROOT_PATH }}
COMPARE_SCRIPT=${ESMVALTOOL_DIR}/esmvaltool/utils/testing/regression/compare.py

# Bash variable manipulation `##*--` below strips leading path from recipe
# parameter to obtain RECIPE_NAME.
# RECIPE_NAME is the recipe file basename without yml extension, as used by
# ESMValTool for naming output directories. E.g. for the recipe
# examples/recipe_python.yml, RECIPE_NAME=recipe_python
[[compare<fast>]]
inherit = None, COMPUTE
inherit = COMPARE
[[[environment]]]
ROSE_TASK_APP = compare
RECIPE_NAME = "${CYLC_TASK_PARAM_fast##*--}"
KGO_ROOT_PATH = {{ KGO_ROOT_PATH }}
COMPARISON_OUTPUT_DIR=${OUTPUT_DIR}/${RECIPE_NAME}*
KGO_DIR=${KGO_ROOT_PATH}/${RECIPE_NAME}*

[[compare<medium>]]
inherit = None, COMPUTE
inherit = COMPARE
[[[environment]]]
ROSE_TASK_APP = compare
RECIPE_NAME = "${CYLC_TASK_PARAM_medium##*--}"
KGO_ROOT_PATH = {{ KGO_ROOT_PATH }}
COMPARISON_OUTPUT_DIR=${OUTPUT_DIR}/${RECIPE_NAME}*
KGO_DIR=${KGO_ROOT_PATH}/${RECIPE_NAME}*

{% include 'site/' ~ SITE ~ '.cylc' %}

0 comments on commit cc1afc6

Please sign in to comment.