From d518c480187313a30d01b6b28819027449a59846 Mon Sep 17 00:00:00 2001 From: Chris Billows <152496175+chrisbillowsMO@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:22:57 +0000 Subject: [PATCH 1/5] #3849: Use a temp env to add `rich` --- .../utils/recipe_test_workflow/opt/rose-suite-metoffice.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvaltool/utils/recipe_test_workflow/opt/rose-suite-metoffice.conf b/esmvaltool/utils/recipe_test_workflow/opt/rose-suite-metoffice.conf index 5a9287cb7a..6d089bf8ef 100644 --- a/esmvaltool/utils/recipe_test_workflow/opt/rose-suite-metoffice.conf +++ b/esmvaltool/utils/recipe_test_workflow/opt/rose-suite-metoffice.conf @@ -1,7 +1,7 @@ [template variables] DRS_CMIP5="BADC" DRS_CMIP6="BADC" -ENV_NAME="scitools/community/esmvaltool/2.11.0" +ENV_NAME="/home/h02/cbillows/esmvt-rtw-tmp" KGO_ROOT_PATH="/data/users/esmval/KGO" ROOTPATH_CMIP5="/project/champ/data/cmip5/output1" ROOTPATH_CMIP6="/project/champ/data/CMIP6" From 69ce57da42cf6c4cedc10ff39471574935fe5bd9 Mon Sep 17 00:00:00 2001 From: Chris Billows <152496175+chrisbillowsMO@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:28:54 +0000 Subject: [PATCH 2/5] #3849: Clone into `src` and pip install via a tmp env module --- .../app/get_esmval/bin/clone_latest_esmval.sh | 13 ++++++++++--- .../app/get_esmval/opt/rose-app-metoffice.conf | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/bin/clone_latest_esmval.sh b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/bin/clone_latest_esmval.sh index 331eada6c3..8a40b1edc7 100755 --- a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/bin/clone_latest_esmval.sh +++ b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/bin/clone_latest_esmval.sh @@ -12,8 +12,15 @@ if [[ -d ${ESMVALCORE_DIR} ]]; then rm -rf "${ESMVALCORE_DIR}" fi -# Checkout the specified branch for ESMValCore and ESMValTool. Use the +# Checkout the specified branch for ESMValCore and ESMValTool to a `src` dir. Use the # quiet ('-q') option to prevent the progress status from being reported # (which is done via done via 'stderr'). -git clone -q -b "${BRANCH}" "${ESMVALTOOL_URL}" "${ESMVALTOOL_DIR}" -git clone -q -b "${BRANCH}" "${ESMVALCORE_URL}" "${ESMVALCORE_DIR}" +git clone -q -b "${BRANCH}" "${ESMVALTOOL_URL}" "${ESMVALTOOL_SOURCE_DIR}" +git clone -q -b "${BRANCH}" "${ESMVALCORE_URL}" "${ESMVALCORE_SOURCE_DIR}" + +# Copy ESMValCore and ESMValTool into 'lib/python', adding them to the PYTHONPATH. +# 'pip install' does this and also triggers `setuptools-scm` to increment the +# package version number. Otherwise `version` returns the last tagged +# release, not the current development version. +rtw-env pip install "${ESMVALTOOL_SOURCE_DIR}" --target="${ESMVALTOOL_DIR}" --no-deps +rtw-env pip install "${ESMVALCORE_SOURCE_DIR}" --target="${ESMVALCORE_DIR}" --no-deps diff --git a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf index 8911ca1cfd..e1860ed24a 100644 --- a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf +++ b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf @@ -3,5 +3,8 @@ default=clone_latest_esmval.sh [env] BRANCH=main -ESMVALCORE_URL=git@github.com:ESMValGroup/ESMValCore.git ESMVALTOOL_URL=git@github.com:ESMValGroup/ESMValTool.git +ESMVALCORE_URL=git@github.com:ESMValGroup/ESMValCore.git +ESMVALTOOL_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValTool +ESMVALCORE_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValCore +ENV_NAME=/home/h02/cbillows/esmvt-rtw-pip From 38c7f5853d47d085f86a288671a77f288149533e Mon Sep 17 00:00:00 2001 From: Chris Billows <152496175+chrisbillowsMO@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:50:00 +0000 Subject: [PATCH 3/5] #3849: Use an existing sss for pip --- .../app/get_esmval/opt/rose-app-metoffice.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf index e1860ed24a..babab70325 100644 --- a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf +++ b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf @@ -7,4 +7,4 @@ ESMVALTOOL_URL=git@github.com:ESMValGroup/ESMValTool.git ESMVALCORE_URL=git@github.com:ESMValGroup/ESMValCore.git ESMVALTOOL_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValTool ESMVALCORE_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValCore -ENV_NAME=/home/h02/cbillows/esmvt-rtw-pip +ENV_NAME=scitools/default-next From 4e6325a0b37caf95ebc03c1e7cbd976d487661ce Mon Sep 17 00:00:00 2001 From: Chris Billows <152496175+chrisbillowsMO@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:22:58 +0000 Subject: [PATCH 4/5] #3849: Use site env for pip (works for esmvaltool env also) --- .../app/get_esmval/opt/rose-app-metoffice.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf index babab70325..6b40977dd7 100644 --- a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf +++ b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf @@ -7,4 +7,3 @@ ESMVALTOOL_URL=git@github.com:ESMValGroup/ESMValTool.git ESMVALCORE_URL=git@github.com:ESMValGroup/ESMValCore.git ESMVALTOOL_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValTool ESMVALCORE_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValCore -ENV_NAME=scitools/default-next From 1fbbcccfd6781163a01080ab825c151e193e200e Mon Sep 17 00:00:00 2001 From: Chris Billows <152496175+chrisbillowsMO@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:54:29 +0000 Subject: [PATCH 5/5] #3849: Run rose config dump --- .../app/get_esmval/opt/rose-app-metoffice.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf index 6b40977dd7..1ed0bdc399 100644 --- a/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf +++ b/esmvaltool/utils/recipe_test_workflow/app/get_esmval/opt/rose-app-metoffice.conf @@ -3,7 +3,7 @@ default=clone_latest_esmval.sh [env] BRANCH=main -ESMVALTOOL_URL=git@github.com:ESMValGroup/ESMValTool.git +ESMVALCORE_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValCore ESMVALCORE_URL=git@github.com:ESMValGroup/ESMValCore.git ESMVALTOOL_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValTool -ESMVALCORE_SOURCE_DIR=${CYLC_WORKFLOW_SHARE_DIR}/src/ESMValCore +ESMVALTOOL_URL=git@github.com:ESMValGroup/ESMValTool.git