Skip to content

Commit 85b836e

Browse files
authored
Merge branch 'main' into 4095-add-observations-to-sea-ice-sensitivity-recipe-retry
2 parents 578ffe6 + 74d7837 commit 85b836e

590 files changed

Lines changed: 14682 additions & 5629 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
---
22
version: 2.1
33

4-
orbs:
5-
coverage-reporter: codacy/coverage-reporter@13.13.0
6-
74
commands:
8-
95
check_changes:
106
steps:
117
- run:
@@ -41,6 +37,7 @@ commands:
4137
command: |
4238
. /opt/conda/etc/profile.d/conda.sh
4339
conda activate esmvaltool
40+
pip check
4441
pytest -n 4 --junitxml=test-reports/report.xml
4542
esmvaltool version
4643
esmvaltool -- --help
@@ -75,7 +72,7 @@ commands:
7572
- run:
7673
name: Install git+ssh
7774
environment:
78-
DEBIAN_FRONTEND: noninteractive # needed to install tzdata
75+
DEBIAN_FRONTEND: noninteractive # needed to install tzdata
7976
command: apt update && apt install -y git ssh
8077
- checkout
8178
- check_changes
@@ -95,7 +92,7 @@ commands:
9592
conda env create -n esmvaltool -f environment.yml --verbose
9693
conda activate esmvaltool
9794
mamba list >> /logs/conda.txt
98-
pip install << parameters.flags >> ".[<<parameters.extra>>]"> /logs/install.txt 2>&1
95+
pip install --no-deps << parameters.flags >> ".[<<parameters.extra>>]"> /logs/install.txt 2>&1
9996
if [[ "<<parameters.flags>>" != *'--editable'* ]]
10097
then
10198
rm -r esmvaltool
@@ -135,7 +132,7 @@ jobs:
135132
. /opt/conda/etc/profile.d/conda.sh
136133
conda activate esmvaltool
137134
mkdir /logs
138-
pip install .[test] > /logs/install.txt 2>&1
135+
pip install --no-deps .[test] > /logs/install.txt 2>&1
139136
- run:
140137
name: Check Python code style and mistakes
141138
command: |
@@ -146,15 +143,15 @@ jobs:
146143
name: Remove source code to test the installed software
147144
command: rm -r esmvaltool
148145
- test_and_report
146+
- run:
147+
# Documentation available at https://docs.codacy.com/coverage-reporter/
148+
name: Upload coverage report to Codacy
149+
command: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -s -r test-reports/coverage.xml
149150
- save_cache:
150151
key: test-{{ .Branch }}-{{ checksum "cache_key.txt" }}
151152
paths:
152153
- /root/.cache/pip
153154
- .pytest_cache
154-
- coverage-reporter/send_report:
155-
coverage-reports: 'test-reports/coverage.xml'
156-
project-token: $CODACY_PROJECT_TOKEN
157-
skip: true # skip if project-token is not defined (i.e. on a fork)
158155

159156
test_installation_from_source_test_mode:
160157
# Test installation from source
@@ -186,7 +183,7 @@ jobs:
186183
- run:
187184
name: Install git and ssh
188185
environment:
189-
DEBIAN_FRONTEND: noninteractive # needed to install tzdata
186+
DEBIAN_FRONTEND: noninteractive # needed to install tzdata
190187
command: apt update && apt install -y git ssh
191188
- checkout
192189
- run:
@@ -205,23 +202,29 @@ jobs:
205202
mkdir /logs
206203
conda env create -n esmvaltool -f environment.yml --verbose
207204
conda activate esmvaltool
205+
# Temporarily install intake-esgf here until there is a new release
206+
# that includes https://github.com/esgf2-us/intake-esgf/pull/160.
207+
pip install git+https://github.com/esgf2-us/intake-esgf@main
208208
mamba list >> /logs/conda.txt
209-
pip install --editable .[develop]
209+
pip install --no-deps --editable .[develop]
210210
git clone https://github.com/ESMValGroup/ESMValCore $HOME/ESMValCore
211-
pip install --editable $HOME/ESMValCore[develop]
211+
pip install --no-deps --editable $HOME/ESMValCore[develop]
212212
- log_versions
213213
- test_and_report
214214
- run:
215215
name: Run recipes
216216
command: |
217217
. /opt/conda/etc/profile.d/conda.sh
218218
conda activate esmvaltool
219-
mkdir -p ~/climate_data
220-
esmvaltool config get_config_user
221-
echo "search_esgf: when_missing" >> ~/.config/esmvaltool/config-user.yml
222-
cat ~/.config/esmvaltool/config-user.yml
219+
esmvaltool config copy data-intake-esgf.yml
220+
python -c '
221+
import intake_esgf
222+
intake_esgf.conf["solr_indices"]["esgf.ceda.ac.uk"] = True
223+
intake_esgf.conf["solr_indices"]["esgf-data.dkrz.de"] = True
224+
intake_esgf.conf.save()
225+
'
223226
for recipe in esmvaltool/recipes/testing/recipe_*.yml; do
224-
esmvaltool run "$recipe"
227+
esmvaltool run --max-parallel-tasks=2 "$recipe"
225228
done
226229
- store_artifacts:
227230
path: /root/esmvaltool_output
@@ -236,7 +239,7 @@ jobs:
236239
# Test building documentation
237240
docker:
238241
- image: condaforge/miniforge3:latest
239-
resource_class: medium
242+
resource_class: medium+
240243
steps:
241244
- checkout
242245
- run:
@@ -246,7 +249,8 @@ jobs:
246249
# Install
247250
conda env create -n esmvaltool -f environment_python.yml
248251
conda activate esmvaltool
249-
pip install .[doc]
252+
pip install --no-deps .[doc]
253+
pip check
250254
# Log versions
251255
dpkg -l > /logs/versions.txt
252256
conda env export > /logs/environment.yml
@@ -269,7 +273,7 @@ jobs:
269273
# Install prerequisites
270274
mkdir /logs
271275
# Install ESMValTool in a new conda environment
272-
mamba create -y --name esmvaltool -c conda-forge esmvaltool 'python=3.11' >> /logs/conda.txt 2>&1
276+
mamba create -y --name esmvaltool -c conda-forge esmvaltool 'python=3.12' >> /logs/conda.txt 2>&1
273277
# Activate the environment
274278
set +x; conda activate esmvaltool; set -x
275279
# Log versions

.codacy.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22
---
33
engines:
44
coverage:
5-
enabled: false
65
exclude_paths: ["tests"]
7-
metrics:
8-
enabled: true
9-
duplication:
10-
enabled: true
11-
ruff:
12-
enabled: true
136

147
exclude_paths:
158
[

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ updates:
1212
directory: "/"
1313
schedule:
1414
interval: "weekly"
15+
labels:
16+
- dependencies
17+
- github_actions
18+
- automatedPR

.github/workflows/check-rtw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# Checks-out your repository under $GITHUB_WORKSPACE, so your job
3737
# can access it
3838
- name: Checkout repository
39-
uses: actions/checkout@v5
39+
uses: actions/checkout@v6
4040

4141
- name: Setup Cylc
4242
uses: cylc/setup-cylc@v1

.github/workflows/check_links.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Check Links for Documentation
2+
3+
on:
4+
# push:
5+
# branches:
6+
# - link-checker
7+
repository_dispatch:
8+
workflow_dispatch:
9+
schedule:
10+
- cron: "00 00 1 * *" # monthly
11+
12+
jobs:
13+
linkChecker:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
issues: write # Required for peter-evans/create-issue-from-file
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Link Checker
21+
id: lychee
22+
uses: lycheeverse/lychee-action@v2
23+
24+
with:
25+
# This token is included to avoid github.com requests rate limiting
26+
token: ${{ secrets.TOKEN_GITHUB }}
27+
fail: false
28+
args: >
29+
./doc/sphinx/**/*.rst
30+
--max-concurrency 1 --no-progress
31+
--accept "200..=204, 302, 429"
32+
33+
- name: Set current date
34+
run: echo "REPORT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
35+
36+
- name: Create Issue From File
37+
if: steps.lychee.outputs.exit_code != 0
38+
uses: peter-evans/create-issue-from-file@v6
39+
with:
40+
title: "🔗 Link Checker Report - ${{ env.REPORT_DATE }}"
41+
content-filepath: ./lychee/out.md
42+
labels: documentation, github_actions
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Link Checker for Pull requests
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
jobs:
7+
changedFiles:
8+
runs-on: ubuntu-latest
9+
outputs:
10+
files: ${{ steps.changed-doc-files.outputs.all_changed_files }}
11+
steps:
12+
- uses: actions/checkout@v6
13+
- name: Get changed doc files
14+
id: changed-doc-files
15+
uses: tj-actions/changed-files@v47
16+
with:
17+
# Avoid using single or double quotes for multiline patterns
18+
files: |
19+
**.rst
20+
matrix: true
21+
22+
linkChecker:
23+
runs-on: ubuntu-latest
24+
needs: changedFiles
25+
if: ${{ needs.changedFiles.outputs.files != '' && toJSON(fromJSON(needs.changedFiles.outputs.files)) != '[]' }}
26+
strategy:
27+
matrix:
28+
file: ${{ fromJSON(needs.changedFiles.outputs.files) }}
29+
fail-fast: false
30+
steps:
31+
- uses: actions/checkout@v6
32+
with:
33+
fetch-depth: 2
34+
- name: Link Checker for changed files
35+
id: lychee
36+
uses: lycheeverse/lychee-action@v2
37+
with:
38+
# This token is included to avoid github.com requests rate limiting
39+
token: ${{ secrets.TOKEN_GITHUB }}
40+
# Fail check on broken links
41+
fail: true
42+
args: >
43+
${{ matrix.file }}
44+
--max-concurrency 1 --no-progress
45+
--accept "200..=204, 429"

.github/workflows/citation_file_validator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
if: github.event_name != 'schedule' || github.repository == 'ESMValGroup/ESMValTool' # avoid scheduled GHAs in forks
1818
steps:
1919
- name: Check out a copy of the repository
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6
2121

2222
- name: Check whether the citation metadata from CITATION.cff is valid
2323
uses: citation-file-format/cffconvert-github-action@2.0.0

.github/workflows/create-condalock-file.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: 'ubuntu-latest'
2222
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
2323
steps:
24-
- uses: actions/checkout@v5
24+
- uses: actions/checkout@v6
2525
with:
2626
fetch-depth: 0
2727
- uses: conda-incubator/setup-miniconda@v3
@@ -73,7 +73,7 @@ jobs:
7373
# Automated PR
7474
# see https://github.com/marketplace/actions/create-pull-request
7575
- name: Create Automated PR if conda lock file has changed
76-
uses: peter-evans/create-pull-request@v7
76+
uses: peter-evans/create-pull-request@v8
7777
with:
7878
token: ${{ secrets.GITHUB_TOKEN }}
7979
commit-message: Updating Linux condalock file

.github/workflows/cron_esmvalbot_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: 'ubuntu-latest'
1919
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
2020
steps:
21-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 0
2424
- name: Create empty commit on branch
@@ -30,7 +30,7 @@ jobs:
3030
# as comment in the PR
3131
# see https://github.com/marketplace/actions/create-pull-request
3232
- name: Create Auto PR
33-
uses: peter-evans/create-pull-request@v7
33+
uses: peter-evans/create-pull-request@v8
3434
with:
3535
token: ${{ secrets.GITHUB_TOKEN }}
3636
commit-message: empty message

.github/workflows/install-from-conda.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches:
88
- main
99
schedule:
10-
- cron: '0 4 * * *'
10+
- cron: "0 4 * * *"
1111

1212
# Required shell entrypoint to have properly configured bash shell
1313
defaults:
@@ -17,11 +17,11 @@ defaults:
1717
jobs:
1818
linux:
1919
runs-on: "ubuntu-latest"
20-
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
20+
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
python-version: ["3.11", "3.12", "3.13"]
24+
python-version: ["3.12", "3.13"]
2525
name: Linux Python ${{ matrix.python-version }}
2626
steps:
2727
- uses: conda-incubator/setup-miniconda@v3
@@ -40,11 +40,12 @@ jobs:
4040
run: mamba install esmvaltool 2>&1 | tee conda_install_linux_artifacts_python_${{ matrix.python-version }}/install.txt
4141
- name: Verify installation
4242
run: |
43+
pip check
4344
esmvaltool --help
4445
esmvaltool version 2>&1 | tee conda_install_linux_artifacts_python_${{ matrix.python-version }}/version.txt
4546
- name: Upload artifacts
4647
if: ${{ always() }} # upload artifacts even if fail
47-
uses: actions/upload-artifact@v5
48+
uses: actions/upload-artifact@v7
4849
with:
4950
name: Conda_Install_Linux_python_${{ matrix.python-version }}
5051
path: conda_install_linux_artifacts_python_${{ matrix.python-version }}
@@ -83,7 +84,7 @@ jobs:
8384
# - run: esmvaltool version 2>&1 | tee conda_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt
8485
# - name: Upload artifacts
8586
# if: ${{ always() }} # upload artifacts even if fail
86-
# uses: actions/upload-artifact@v5
87+
# uses: actions/upload-artifact@v7
8788
# with:
8889
# name: Conda_Install_OSX_python_${{ matrix.python-version }}
8990
# path: conda_install_osx_artifacts_python_${{ matrix.python-version }}

0 commit comments

Comments
 (0)