Skip to content

Commit

Permalink
Merge branch 'main' into recipe_wenzel16jclim
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriupredoi authored Nov 25, 2024
2 parents f2ef252 + ba53425 commit 8864068
Show file tree
Hide file tree
Showing 293 changed files with 8,494 additions and 4,772 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
test_installation_from_source_test_mode:
# Test installation from source
docker:
- image: condaforge/mambaforge:latest
- image: condaforge/miniforge3:latest
resource_class: large
steps:
- test_installation_from_source:
Expand All @@ -167,7 +167,7 @@ jobs:
test_installation_from_source_develop_mode:
# Test development installation
docker:
- image: condaforge/mambaforge:latest
- image: condaforge/miniforge3:latest
resource_class: large
steps:
- test_installation_from_source:
Expand All @@ -179,7 +179,7 @@ jobs:
# purpose of this test to discover backward-incompatible changes early on in
# the development cycle.
docker:
- image: condaforge/mambaforge:latest
- image: condaforge/miniforge3:latest
resource_class: large
steps:
- run:
Expand Down Expand Up @@ -216,8 +216,8 @@ jobs:
conda activate esmvaltool
mkdir -p ~/climate_data
esmvaltool config get_config_user
echo "search_esgf: when_missing" >> ~/.esmvaltool/config-user.yml
cat ~/.esmvaltool/config-user.yml
echo "search_esgf: when_missing" >> ~/.config/esmvaltool/config-user.yml
cat ~/.config/esmvaltool/config-user.yml
for recipe in esmvaltool/recipes/testing/recipe_*.yml; do
esmvaltool run "$recipe"
done
Expand All @@ -233,7 +233,7 @@ jobs:
build_documentation:
# Test building documentation
docker:
- image: condaforge/mambaforge:latest
- image: condaforge/miniforge3:latest
resource_class: medium
steps:
- checkout
Expand All @@ -257,8 +257,8 @@ jobs:
test_installation_from_conda:
# Test conda package installation
docker:
- image: condaforge/mambaforge:latest
resource_class: medium
- image: condaforge/miniforge3:latest
resource_class: large
steps:
- run:
command: |
Expand Down
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
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
2 changes: 1 addition & 1 deletion .github/workflows/citation_file_validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/[email protected]
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/create-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,25 @@ jobs:
name: Create conda lock file for latest Python
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: esmvaltool-fromlock
python-version: "3.11"
python-version: "3.12"
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- name: Show conda config
run: |
conda update -n base -c conda-forge conda
conda --version
# setup-miniconda@v2 installs an old conda and mamba
# setup-miniconda@v3 installs an old conda and mamba
# forcing a modern mamba updates both mamba and conda
conda install -c conda-forge "mamba>=1.4.8"
# unpin mamba after conda-lock=3 release
# see github.com/ESMValGroup/ESMValTool/issues/3782
conda install -c conda-forge "mamba>=1.4.8,<2"
conda config --show-sources
conda config --show
conda --version
Expand Down Expand Up @@ -97,7 +98,4 @@ jobs:
automatedPR
assignees: valeriupredoi
reviewers: valeriupredoi
team-reviewers: |
owners
maintainers
draft: false
13 changes: 6 additions & 7 deletions .github/workflows/install-from-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p conda_install_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand All @@ -44,7 +43,7 @@ jobs:
esmvaltool version 2>&1 | tee conda_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
- name: Upload artifacts
if: ${{ always() }} # upload artifacts even if fail
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Conda_Install_Linux_python_${{ matrix.python-version }}
path: conda_install_linux_artifacts_python_${{ matrix.python-version }}
Expand All @@ -56,12 +55,12 @@ jobs:
# runs-on: "macos-latest"
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11"]
# python-version: ["3.10", "3.11"]
# fail-fast: false
# name: OSX Python ${{ matrix.python-version }}
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# - uses: conda-incubator/setup-miniconda@v3
# with:
# python-version: ${{ matrix.python-version }}
# miniconda-version: "latest"
Expand All @@ -82,7 +81,7 @@ jobs:
# - run: esmvaltool version 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt
# - name: Upload artifacts
# if: ${{ always() }} # upload artifacts even if fail
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v4
# with:
# name: Conda_Install_OSX_python_${{ matrix.python-version }}
# path: conda_install_osx_artifacts_python_${{ matrix.python-version }}
8 changes: 4 additions & 4 deletions .github/workflows/install-from-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: esmvaltool-fromlock
python-version: ${{ matrix.python-version }}
Expand All @@ -57,7 +57,7 @@ jobs:
- run: pytest -n 2 -m "not installation"
- name: Upload artifacts
if: ${{ always() }} # upload artifacts even if fail
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Source_Install_Linux_python_${{ matrix.python-version }}
path: source_install_linux_artifacts_python_${{ matrix.python-version }}
15 changes: 7 additions & 8 deletions .github/workflows/install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: esmvaltool
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p source_install_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand All @@ -47,7 +46,7 @@ jobs:
esmvaltool version 2>&1 | tee source_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
- name: Upload artifacts
if: ${{ always() }} # upload artifacts even if fail
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Source_Install_Linux_python_${{ matrix.python-version }}
path: source_install_linux_artifacts_python_${{ matrix.python-version }}
Expand All @@ -59,12 +58,12 @@ jobs:
# runs-on: "macos-latest"
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11"]
# python-version: ["3.10", "3.11"]
# fail-fast: false
# name: OSX Python ${{ matrix.python-version }}
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# - uses: conda-incubator/setup-miniconda@v3
# with:
# activate-environment: esmvaltool
# environment-file: environment.yml
Expand All @@ -79,7 +78,7 @@ jobs:
# - run: esmvaltool version 2>&1 | tee source_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt
# - name: Upload artifacts
# if: ${{ always() }} # upload artifacts even if fail
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v4
# with:
# name: Source_Install_OSX_python_${{ matrix.python-version }}
# path: source_install_osx_artifacts_python_${{ matrix.python-version }}
6 changes: 3 additions & 3 deletions .github/workflows/pypi-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
name: Build and publish ESMValTool on PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: "3.11"
python-version: "3.12"
- name: Install pep517
run: >-
python -m
Expand Down
Loading

0 comments on commit 8864068

Please sign in to comment.