Skip to content

Commit f1721c4

Browse files
author
Liza Malinina
committed
update main
2 parents da44f59 + 86784c1 commit f1721c4

609 files changed

Lines changed: 31165 additions & 7058 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: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ orbs:
55
coverage-reporter: codacy/coverage-reporter@13.13.0
66

77
commands:
8-
98
check_changes:
109
steps:
1110
- run:
@@ -41,10 +40,11 @@ commands:
4140
command: |
4241
. /opt/conda/etc/profile.d/conda.sh
4342
conda activate esmvaltool
44-
mamba --version
43+
pip check
4544
pytest -n 4 --junitxml=test-reports/report.xml
4645
esmvaltool version
4746
esmvaltool -- --help
47+
esmvaltool develop compare -- --help
4848
ncl -V
4949
cdo --version
5050
- store_test_results:
@@ -75,7 +75,7 @@ commands:
7575
- run:
7676
name: Install git+ssh
7777
environment:
78-
DEBIAN_FRONTEND: noninteractive # needed to install tzdata
78+
DEBIAN_FRONTEND: noninteractive # needed to install tzdata
7979
command: apt update && apt install -y git ssh
8080
- checkout
8181
- check_changes
@@ -95,8 +95,7 @@ commands:
9595
conda env create -n esmvaltool -f environment.yml --verbose
9696
conda activate esmvaltool
9797
mamba list >> /logs/conda.txt
98-
pip install << parameters.flags >> ".[<<parameters.extra>>]"> /logs/install.txt 2>&1
99-
esmvaltool install Julia > /logs/install_julia.txt 2>&1
98+
pip install --no-deps << parameters.flags >> ".[<<parameters.extra>>]"> /logs/install.txt 2>&1
10099
if [[ "<<parameters.flags>>" != *'--editable'* ]]
101100
then
102101
rm -r esmvaltool
@@ -136,8 +135,7 @@ jobs:
136135
. /opt/conda/etc/profile.d/conda.sh
137136
conda activate esmvaltool
138137
mkdir /logs
139-
pip install .[test] > /logs/install.txt 2>&1
140-
esmvaltool install Julia > /logs/install_julia.txt 2>&1
138+
pip install --no-deps .[test] > /logs/install.txt 2>&1
141139
- run:
142140
name: Check Python code style and mistakes
143141
command: |
@@ -154,9 +152,9 @@ jobs:
154152
- /root/.cache/pip
155153
- .pytest_cache
156154
- coverage-reporter/send_report:
157-
coverage-reports: 'test-reports/coverage.xml'
155+
coverage-reports: "test-reports/coverage.xml"
158156
project-token: $CODACY_PROJECT_TOKEN
159-
skip: true # skip if project-token is not defined (i.e. on a fork)
157+
skip: true # skip if project-token is not defined (i.e. on a fork)
160158

161159
test_installation_from_source_test_mode:
162160
# Test installation from source
@@ -188,7 +186,7 @@ jobs:
188186
- run:
189187
name: Install git and ssh
190188
environment:
191-
DEBIAN_FRONTEND: noninteractive # needed to install tzdata
189+
DEBIAN_FRONTEND: noninteractive # needed to install tzdata
192190
command: apt update && apt install -y git ssh
193191
- checkout
194192
- run:
@@ -205,26 +203,24 @@ jobs:
205203
# https://docs.esmvaltool.org/en/latest/quickstart/installation.html#install-from-source
206204
. /opt/conda/etc/profile.d/conda.sh
207205
mkdir /logs
206+
# Temporarily install intake-esgf here until it is an ESMValCore dependency in v2.14.
207+
echo " - intake-esgf" >> environment.yml
208208
conda env create -n esmvaltool -f environment.yml --verbose
209209
conda activate esmvaltool
210210
mamba list >> /logs/conda.txt
211-
pip install --editable .[develop]
212-
esmvaltool install Julia > /logs/install_julia.txt 2>&1
211+
pip install --no-deps --editable .[develop]
213212
git clone https://github.com/ESMValGroup/ESMValCore $HOME/ESMValCore
214-
pip install --editable $HOME/ESMValCore[develop]
213+
pip install --no-deps --editable $HOME/ESMValCore[develop]
215214
- log_versions
216215
- test_and_report
217216
- run:
218217
name: Run recipes
219218
command: |
220219
. /opt/conda/etc/profile.d/conda.sh
221220
conda activate esmvaltool
222-
mkdir -p ~/climate_data
223-
esmvaltool config get_config_user
224-
echo "search_esgf: when_missing" >> ~/.config/esmvaltool/config-user.yml
225-
cat ~/.config/esmvaltool/config-user.yml
221+
esmvaltool config copy data-esmvalcore-esgf.yml
226222
for recipe in esmvaltool/recipes/testing/recipe_*.yml; do
227-
esmvaltool run "$recipe"
223+
esmvaltool run --max-parallel-tasks=2 "$recipe"
228224
done
229225
- store_artifacts:
230226
path: /root/esmvaltool_output
@@ -249,7 +245,8 @@ jobs:
249245
# Install
250246
conda env create -n esmvaltool -f environment_python.yml
251247
conda activate esmvaltool
252-
pip install .[doc]
248+
pip install --no-deps .[doc]
249+
pip check
253250
# Log versions
254251
dpkg -l > /logs/versions.txt
255252
conda env export > /logs/environment.yml
@@ -272,11 +269,9 @@ jobs:
272269
# Install prerequisites
273270
mkdir /logs
274271
# Install ESMValTool in a new conda environment
275-
mamba create -y --name esmvaltool -c conda-forge esmvaltool julia 'python=3.11' >> /logs/conda.txt 2>&1
272+
mamba create -y --name esmvaltool -c conda-forge esmvaltool 'python=3.12' >> /logs/conda.txt 2>&1
276273
# Activate the environment
277274
set +x; conda activate esmvaltool; set -x
278-
# install the Julia dependencies
279-
esmvaltool install Julia > /logs/install_Julia.txt 2>&1
280275
# Log versions
281276
mamba env export > /logs/environment.yml
282277
# Test installation

.circleci/install_triggers

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
^\.circleci/
22
^environment\.yml$
3-
^esmvaltool/install/
43
^pyproject.toml$
54
^setup\.py$
65
^setup\.cfg$

.codacy.yml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,15 @@
11
# codacy configuration file
2-
32
---
4-
53
engines:
6-
coverage:
7-
enabled: false
8-
exclude_paths: [
9-
'tests',
10-
]
11-
metrics:
12-
enabled: true
13-
duplication:
14-
enabled: true
15-
prospector:
16-
enabled: true
17-
pylint:
18-
enabled: true
19-
python_version: 3
4+
coverage:
5+
exclude_paths: ["tests"]
206

21-
exclude_paths: [
22-
'archive/**',
23-
'doc/sphinx/**',
24-
'esmvaltool/cmor/tables/**',
25-
'tests/**',
26-
'esmvaltool/utils/recipe_test_workflow/app/configure/bin/test_configure.py',
27-
]
7+
exclude_paths:
8+
[
9+
"archive/**",
10+
"doc/sphinx/**",
11+
"esmvaltool/cmor/tables/**",
12+
"tests/**",
13+
"esmvaltool/utils/recipe_test_workflow/app/configure/bin/test_configure.py",
14+
"esmvaltool/utils/recipe_test_workflow/app/generate_report/bin/test_generate_html_report.py",
15+
]

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
# Enable version updates for GitHub Actions
9+
- package-ecosystem: "github-actions"
10+
# Workflow files stored in the default location of `.github/workflows`
11+
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"

.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@v4
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@v4
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: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,20 @@ jobs:
2121
runs-on: 'ubuntu-latest'
2222
if: github.repository == 'ESMValGroup/ESMValTool' # avoid GAs in forks
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v6
2525
with:
2626
fetch-depth: 0
2727
- uses: conda-incubator/setup-miniconda@v3
2828
with:
2929
auto-update-conda: true
3030
activate-environment: esmvaltool-fromlock
31-
python-version: "3.12"
31+
python-version: "3.13"
3232
miniforge-version: "latest"
3333
use-mamba: true
3434
- name: Show conda config
3535
run: |
3636
conda update -n base -c conda-forge conda
3737
conda --version
38-
# setup-miniconda@v3 installs an old conda and mamba
39-
# forcing a modern mamba updates both mamba and conda
40-
# unpin mamba after conda-lock=3 release
41-
# see github.com/ESMValGroup/ESMValTool/issues/3782
42-
conda install -c conda-forge "mamba>=1.4.8,<2"
43-
conda config --show-sources
44-
conda config --show
45-
conda --version
4638
mamba --version
4739
- name: Python info
4840
run: |
@@ -69,7 +61,7 @@ jobs:
6961
which python
7062
pip --version
7163
- name: Install ESMValTool
72-
run: pip install -e .[develop]
64+
run: pip install --no-deps -e .[develop]
7365
- name: Check ESMValTool version
7466
run: esmvaltool --help
7567
- name: Check ESMValTool help
@@ -81,7 +73,7 @@ jobs:
8173
# Automated PR
8274
# see https://github.com/marketplace/actions/create-pull-request
8375
- name: Create Automated PR if conda lock file has changed
84-
uses: peter-evans/create-pull-request@v3
76+
uses: peter-evans/create-pull-request@v8
8577
with:
8678
token: ${{ secrets.GITHUB_TOKEN }}
8779
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@v4
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

0 commit comments

Comments
 (0)