Skip to content

Commit

Permalink
update with new main
Browse files Browse the repository at this point in the history
  • Loading branch information
Elizaveta Malinina committed Jan 23, 2025
2 parents cfaafc0 + 425e233 commit fb48377
Show file tree
Hide file tree
Showing 168 changed files with 7,542 additions and 2,426 deletions.
20 changes: 11 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ commands:
# Install
. /opt/conda/etc/profile.d/conda.sh
mkdir /logs
mamba env create >> /logs/conda.txt 2>&1
mamba env create
conda activate esmvaltool
mamba list >> /logs/conda.txt
pip install << parameters.flags >> ".[<<parameters.extra>>]"> /logs/install.txt 2>&1
esmvaltool install Julia > /logs/install_julia.txt 2>&1
if [[ "<<parameters.flags>>" != *'--editable'* ]]
Expand Down Expand Up @@ -158,7 +159,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 +168,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 +180,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 All @@ -201,8 +202,9 @@ jobs:
# https://docs.esmvaltool.org/en/latest/quickstart/installation.html#install-from-source
. /opt/conda/etc/profile.d/conda.sh
mkdir /logs
mamba env create >> /logs/conda.txt 2>&1
mamba env create
conda activate esmvaltool
mamba list >> /logs/conda.txt
pip install --editable .[develop]
esmvaltool install Julia > /logs/install_julia.txt 2>&1
git clone https://github.com/ESMValGroup/ESMValCore $HOME/ESMValCore
Expand All @@ -216,8 +218,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 +235,7 @@ jobs:
build_documentation:
# Test building documentation
docker:
- image: condaforge/mambaforge:latest
- image: condaforge/miniforge3:latest
resource_class: medium
steps:
- checkout
Expand All @@ -257,7 +259,7 @@ jobs:
test_installation_from_conda:
# Test conda package installation
docker:
- image: condaforge/mambaforge:latest
- image: condaforge/miniforge3:latest
resource_class: large
steps:
- run:
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
78 changes: 78 additions & 0 deletions .github/workflows/check-rtw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 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/**

# Schedule this workflow to run at 04:00 every 10 days
schedule:
- cron: '0 4 */10 * *'

# 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
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Cylc
uses: cylc/setup-cylc@v1
with:
cylc_rose: true

- 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
7 changes: 4 additions & 3 deletions .github/workflows/create-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ jobs:
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@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
50 changes: 50 additions & 0 deletions .github/workflows/cron_esmvalbot_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Run Esmvalbot Test

on:
# push:
# branches:
# - cron_esmvalbot_test
# scheduled once every 2 weeks
schedule:
- cron: '0 4 */14 * *'

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

jobs:
run-esmvalbot:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create empty commit on branch
run: |
git config user.name 'Valeriu Predoi'
git config user.email '[email protected]'
git commit --allow-empty -m "empty commit"
# Automated PR where we run "@esmvalbot please run examples/recipe_python.yml"
# as comment in the PR
# see https://github.com/marketplace/actions/create-pull-request
- name: Create Auto PR
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: empty message
# defaults are GH bot: # ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
committer: Valeriu Predoi <[email protected]>
author: Valeriu Predoi <[email protected]>
signoff: false
branch: run-esmvalbot
delete-branch: true
title: '[EsmvalbotTest] Periodic reminder to run an esmvalbot test'
body: 'Automatic PR; please DO NOT merge! This is for testing Esmvalbot only. @valeriupredoi @bouweandela @schlunma please run an ESMValBot test here; if the bot runs fine, please close the auto PR, if it has issues, please open a Github issue and tag @valeriupredoi. Many thanks :beers:'
labels: |
testing
esmvalbot
automatedPR
assignees: valeriupredoi
reviewers: valeriupredoi
draft: true
3 changes: 1 addition & 2 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.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- 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 Down
2 changes: 1 addition & 1 deletion .github/workflows/install-from-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand All @@ -32,7 +32,6 @@ jobs:
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 Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- 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
6 changes: 2 additions & 4 deletions .github/workflows/run-tests-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand All @@ -35,7 +35,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand Down Expand Up @@ -67,7 +66,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
Expand All @@ -82,7 +81,6 @@ jobs:
environment-file: environment_osx.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
# - name: Install libomp with homebrew
# run: brew install libomp
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand All @@ -38,7 +38,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p develop_test_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand All @@ -32,7 +32,6 @@ jobs:
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
- run: mkdir -p test_linux_artifacts_python_${{ matrix.python-version }}
- name: Record versions
Expand All @@ -45,6 +44,8 @@ jobs:
run: conda list
- name: Install ESMValTool
run: pip install -e .[develop] 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/install.txt
- name: Examine conda environment
run: conda list
- name: Install Julia dependencies
run: esmvaltool install Julia
- name: Export Python minor version
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
Expand All @@ -87,7 +88,6 @@ jobs:
environment-file: environment_osx.yml
python-version: ${{ matrix.python-version }}
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
# - name: Install libomp with homebrew
# run: brew install libomp
Expand Down
Loading

0 comments on commit fb48377

Please sign in to comment.