From 9a558fb9cc4d95eea7dfaddd1771ada4f8f69c40 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Tue, 24 Nov 2026 20:29:37 +0100 Subject: [PATCH 01/15] ci: Move to the ci-infrastructure pipeline Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 115 ++++++++++++++++++ .ci/test.sh.j2 | 29 +++++ .github/workflows/ci.yml | 167 +++++++++++++++++++++----- .github/workflows/label-public-pr.yml | 8 -- .github/workflows/old_CI.yml | 36 ++++++ 5 files changed, 316 insertions(+), 39 deletions(-) create mode 100644 .ci/manifest.toml create mode 100644 .ci/test.sh.j2 delete mode 100644 .github/workflows/label-public-pr.yml create mode 100644 .github/workflows/old_CI.yml diff --git a/.ci/manifest.toml b/.ci/manifest.toml new file mode 100644 index 000000000..8000ed584 --- /dev/null +++ b/.ci/manifest.toml @@ -0,0 +1,115 @@ +[package] +name = "earthkit-data" +repo = "ecmwf/earthkit-data" +visibility = "public" +fork-pull-requests = false +compiler-inputs = [] +ci-pre-commit = false +full-history = true + +[[deps]] +repo = "ecmwf/cfgrib" +package = "cfgrib" +ref = "master" +compiler-inputs = [] +python-version-input = "python-version" + +[[deps]] +repo = "ecmwf/pdbufr" +package = "pdbufr" +ref = "develop" +compiler-inputs = [] +python-version-input = "python-version" + +[[deps]] +repo = "ecmwf/pyodc" +package = "pyodc" +ref = "master" +compiler-inputs = [] +python-version-input = "python-version" + +[[deps]] +repo = "ecmwf/fdb" +package = "pyfdb" +ref = "develop" +compiler-inputs = ["cxx-compiler"] +python-version-input = "python-version" + +[[deps]] +repo = "ecmwf/metkit" +package = "pymetkit" +ref = "develop" +compiler-inputs = ["cxx-compiler"] +python-version-input = "python-version" + +# Pure-Python upstreams, built on the GitHub runner rather than in this container. +[[deps]] +repo = "ecmwf/multiurl" +package = "multiurl" +ref = "develop" +compiler-inputs = [] +python-version-input = "python-version" +platform-input = "python-platform" +build-type-input = "python-build-type" + +[[deps]] +repo = "ecmwf/earthkit-utils" +package = "earthkit-utils" +ref = "develop" +compiler-inputs = [] +python-version-input = "python-version" +platform-input = "python-platform" +build-type-input = "python-build-type" + +[[trigger-downstream]] +repo = "ecmwf/earthkit-transforms" +ref = "develop" + +[[trigger-downstream]] +repo = "ecmwf/earthkit-workflows" +ref = "main" + +[[trigger-downstream]] +repo = "ecmwf/earthkit-hydro" +ref = "develop" + +[[trigger-downstream]] +repo = "ecmwf/earthkit-geo" +ref = "develop" + +[[trigger-downstream]] +repo = "ecmwf/earthkit-meteo" +ref = "develop" + +[[trigger-downstream]] +repo = "ecmwf/earthkit-plots" +ref = "develop" + +[[trigger-downstream]] +repo = "ecmwf/earthkit" +ref = "develop" + +[matrix.test] +triggers = ["upstream-change", "rebuild-request"] + +# The container and compiler of the eccodes, odc, and fdb builds, whose libraries the tests load. +[matrix.test.defaults] +job-script = "./.ci/test.sh.j2" +runs-on = "ubuntu-latest" +container = "eccr.ecmwf.int/public-ci-images/ubuntu24.04-gcc13-gfortran13" +platform = "ubuntu-24.04" +cxx-compiler = "g++-13" +c-compiler = "gcc-13" +build-type = "RelWithDebInfo" +python-platform = "gh-ubuntu-26.04" +python-build-type = "Release" +extras = "all,test,ci" + +[[matrix.test.include]] +python-version = "3.11" + +[[matrix.test.include]] +python-version = "3.12" + +[[matrix.test.include]] +python-version = "3.13" diff --git a/.ci/test.sh.j2 b/.ci/test.sh.j2 new file mode 100644 index 000000000..7937c1e19 --- /dev/null +++ b/.ci/test.sh.j2 @@ -0,0 +1,29 @@ +{% extends "ci-infrastructure/python-runner.sh.j2" %} +{% block set_environment %} +# findlibs finds eccodes, odc, metkit, and fdb from their *_HOME; each dep has its own prefix. +IFS=';:' read -ra dep_prefixes <<<"${CMAKE_PREFIX_PATH:-}" +for prefix in ${dep_prefixes[@]+"${dep_prefixes[@]}"}; do + if compgen -G "$prefix/lib*/libeccodes.*" >/dev/null; then + export ECCODES_HOME="$prefix" + export ECCODES_DEFINITION_PATH="$prefix/share/eccodes/definitions" + export ECCODES_SAMPLES_PATH="$prefix/share/eccodes/samples" + fi + if compgen -G "$prefix/lib*/libodccore.*" >/dev/null; then + export ODC_HOME="$prefix" + fi + if compgen -G "$prefix/lib*/libmetkit.*" >/dev/null; then + export METKIT_HOME="$prefix" + fi + if compgen -G "$prefix/lib*/libfdb5.*" >/dev/null; then + export FDB5_HOME="$prefix" + fi +done +export FINDLIBS_DISABLE_PACKAGE=yes +{% endblock %} +{% block test %} +cd "$CI_SOURCE_DIR" +python -m pytest -vv -m 'not notebook and not no_cache_init' -k 'not netcdf' --cov=. --cov-report=xml +python -m pytest -v -m 'notebook' +python -m pytest --forked -vv -m 'no_cache_init' -k 'not netcdf' +python -m coverage report +{% endblock %} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a22b06e1a..998feb5c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,36 +1,141 @@ -name: ci +# GENERATED FILE - DO NOT EDIT. +# Regenerate via the ci-infrastructure-generate CLI. +# Source of truth: each repo's .ci/manifest.toml. +name: CI + on: - # Trigger the workflow on push to master or develop, except tag creation push: - branches: - - "main" - - "develop" - tags-ignore: - - "**" - paths-ignore: - - "docs/**" - - "README.md" - # Trigger the workflow on pull request + branches: [develop, master, main] pull_request: - paths-ignore: - - "docs/**" - - "README.md" - # Trigger the workflow manually + types: [opened, reopened, synchronize] workflow_dispatch: + schedule: + - cron: "22 4 * * *" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read + +env: + ARTIFACT_POLL_INTERVAL: ${{ vars.ARTIFACT_POLL_INTERVAL || '60' }} + ARTIFACT_WAIT_TIMEOUT: ${{ vars.ARTIFACT_WAIT_TIMEOUT || '1800' }} + ARTIFACT_S3_ENDPOINT: ${{ secrets.ARTIFACT_S3_ENDPOINT }} + ARTIFACT_S3_BUCKET: ${{ secrets.ARTIFACT_S3_BUCKET }} + SCCACHE_BUCKET: ${{ secrets.SCCACHE_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + jobs: - # Run CI including downstream packages on self-hosted runners - downstream-ci: - name: downstream-ci - uses: ecmwf/downstream-ci/.github/workflows/downstream-ci.yml@main - with: - earthkit-data: ecmwf/earthkit-data@${{ github.event.pull_request.head.sha || github.sha }} - codecov_upload: true - python_qa: false - secrets: inherit - # Build downstream packages on HPC - downstream-ci-hpc: - name: downstream-ci-hpc - uses: ecmwf/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main - with: - earthkit-data: ecmwf/earthkit-data@${{ github.event.pull_request.head.sha || github.sha }} - secrets: inherit + ci-approval: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: ecmwf/ci-infrastructure/actions/require-ci-approval@main + + resolve: + needs: ci-approval + runs-on: ubuntu-latest + outputs: + matrices: ${{ steps.r.outputs.json }} + dispatch-plans: ${{ steps.r.outputs.dispatch-plans }} + steps: + - id: mint + uses: ecmwf/ci-infrastructure/actions/mint-token@main + with: + client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} + private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} + repositories: cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fdb,findlibs,metkit,multiurl,odc,pdbufr,pyodc,stack-dependencies + permissions: contents:read actions:read + - uses: actions/checkout@v6 + with: + persist-credentials: false + fetch-depth: 0 + - id: r + uses: ecmwf/ci-infrastructure/actions/resolve-deps@main + with: + matrix: test + token: ${{ steps.mint.outputs.token }} + rebuild-missing: 'true' + - name: Wait for the deps of test + if: steps.r.outputs.dispatch-plans == '[]' + uses: ecmwf/ci-infrastructure/actions/wait-for-deps@main + with: + matrix: ${{ steps.r.outputs.json }} + kinds: test + token: ${{ steps.mint.outputs.token }} + name: resolve + wait-build + + rebuild-producers: + needs: [ci-approval, resolve] + runs-on: ubuntu-latest + steps: + - if: needs.resolve.outputs.dispatch-plans != '' && needs.resolve.outputs.dispatch-plans != '[]' + uses: ecmwf/ci-infrastructure/actions/dispatch-producers@main + with: + dispatch-plans: ${{ needs.resolve.outputs.dispatch-plans }} + repositories: cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fdb,findlibs,metkit,multiurl,odc,pdbufr,pyodc,stack-dependencies + client-id: ${{ vars.CI_DISPATCHER_APP_CLIENT_ID }} + app-private-key: ${{ secrets.CI_DISPATCHER_APP_PRIVATE_KEY }} + + test: + needs: [ci-approval, resolve, rebuild-producers] + name: test (${{ matrix._resolved['job-name'] }}) + runs-on: ${{ matrix['runs-on'] }} + container: + image: ${{ matrix.container || '' }} + strategy: + fail-fast: false + matrix: ${{ fromJSON(needs.resolve.outputs.matrices).test }} + steps: + - name: Announce image + uses: ecmwf/ci-infrastructure/actions/announce-image@main + - id: mint + uses: ecmwf/ci-infrastructure/actions/mint-token@main + with: + client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} + private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} + repositories: cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fdb,findlibs,metkit,multiurl,odc,pdbufr,pyodc,stack-dependencies + permissions: contents:read actions:read + - uses: actions/checkout@v6 + with: + persist-credentials: false + fetch-depth: 0 + - name: Fetch resolved deps + id: deps + uses: ecmwf/ci-infrastructure/actions/fetch-deps@main + with: + deps-json: ${{ toJSON(matrix._resolved.deps) }} + token: ${{ steps.mint.outputs.token }} + - name: Print dependency table + uses: ecmwf/ci-infrastructure/actions/print-dep-table@main + with: + resolved: ${{ toJSON(matrix._resolved) }} + - name: Build + id: build + uses: ecmwf/ci-infrastructure/actions/run-job-script@main + with: + job-script: ${{ matrix.job-script }} + matrix-leg: ${{ toJSON(matrix) }} + package: earthkit-data + cmake-prefix-path: ${{ steps.deps.outputs.cmake-prefix-path }} + - name: Publish + uses: ecmwf/ci-infrastructure/actions/publish-artifact@main + with: + install-path: ${{ steps.build.outputs.install-path }} + artifact-name: ${{ matrix._resolved['own-artifact-name'] }} + + ci-result: + name: collect results + if: always() + needs: [ci-approval, resolve, test] + runs-on: ubuntu-latest + permissions: + statuses: write + steps: + - uses: ecmwf/ci-infrastructure/actions/ci-result@main + with: + needs: ${{ toJSON(needs) }} diff --git a/.github/workflows/label-public-pr.yml b/.github/workflows/label-public-pr.yml deleted file mode 100644 index e9a26b0ec..000000000 --- a/.github/workflows/label-public-pr.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Manage labels of pull requests that originate from forks -name: label-public-pr -on: - pull_request_target: - types: [opened, synchronize] -jobs: - label: - uses: ecmwf/reusable-workflows/.github/workflows/label-pr.yml@v2 diff --git a/.github/workflows/old_CI.yml b/.github/workflows/old_CI.yml new file mode 100644 index 000000000..503c627aa --- /dev/null +++ b/.github/workflows/old_CI.yml @@ -0,0 +1,36 @@ +name: old CI + +on: + # Trigger the workflow after the new CI succeeded on a push + workflow_run: + workflows: [CI] + types: [completed] + branches: + - "main" + - "develop" + + # Trigger the workflow manually + workflow_dispatch: ~ + +jobs: + # Run CI including downstream packages on self-hosted runners + downstream-ci: + name: downstream-ci + if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success') }} + uses: ecmwf/downstream-ci/.github/workflows/downstream-ci.yml@main + with: + ci_group: only-self + earthkit-data: ecmwf/earthkit-data@${{ github.event.workflow_run.head_sha || github.sha }} + codecov_upload: true + python_qa: false + secrets: inherit + + # Build downstream packages on HPC + downstream-ci-hpc: + name: downstream-ci-hpc + if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success') }} + uses: ecmwf/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main + with: + ci_group: only-self + earthkit-data: ecmwf/earthkit-data@${{ github.event.workflow_run.head_sha || github.sha }} + secrets: inherit From 3fef639e9057ea53e326f8283f64a39de389bf0f Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Tue, 24 Nov 2026 20:30:19 +0100 Subject: [PATCH 02/15] ci: Format the CI sources and skip formatting generated workflows Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 130 +++++++++++++++++------------------ .github/workflows/old_CI.yml | 6 +- .pre-commit-config.yaml | 2 + 3 files changed, 70 insertions(+), 68 deletions(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 8000ed584..fc8059e9f 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -1,115 +1,115 @@ -[package] -name = "earthkit-data" -repo = "ecmwf/earthkit-data" -visibility = "public" -fork-pull-requests = false -compiler-inputs = [] -ci-pre-commit = false -full-history = true - [[deps]] -repo = "ecmwf/cfgrib" -package = "cfgrib" -ref = "master" compiler-inputs = [] +package = "cfgrib" python-version-input = "python-version" +ref = "master" +repo = "ecmwf/cfgrib" [[deps]] -repo = "ecmwf/pdbufr" -package = "pdbufr" -ref = "develop" compiler-inputs = [] +package = "pdbufr" python-version-input = "python-version" +ref = "develop" +repo = "ecmwf/pdbufr" [[deps]] -repo = "ecmwf/pyodc" -package = "pyodc" -ref = "master" compiler-inputs = [] +package = "pyodc" python-version-input = "python-version" +ref = "master" +repo = "ecmwf/pyodc" [[deps]] -repo = "ecmwf/fdb" -package = "pyfdb" -ref = "develop" compiler-inputs = ["cxx-compiler"] +package = "pyfdb" python-version-input = "python-version" +ref = "develop" +repo = "ecmwf/fdb" [[deps]] -repo = "ecmwf/metkit" -package = "pymetkit" -ref = "develop" compiler-inputs = ["cxx-compiler"] +package = "pymetkit" python-version-input = "python-version" +ref = "develop" +repo = "ecmwf/metkit" # Pure-Python upstreams, built on the GitHub runner rather than in this container. [[deps]] -repo = "ecmwf/multiurl" -package = "multiurl" -ref = "develop" +build-type-input = "python-build-type" compiler-inputs = [] -python-version-input = "python-version" +package = "multiurl" platform-input = "python-platform" -build-type-input = "python-build-type" +python-version-input = "python-version" +ref = "develop" +repo = "ecmwf/multiurl" [[deps]] -repo = "ecmwf/earthkit-utils" +build-type-input = "python-build-type" +compiler-inputs = [] package = "earthkit-utils" +platform-input = "python-platform" +python-version-input = "python-version" ref = "develop" +repo = "ecmwf/earthkit-utils" + +[matrix.test] +triggers = ["upstream-change", "rebuild-request"] + +# The container and compiler of the eccodes, odc, and fdb builds, whose libraries the tests load. +[matrix.test.defaults] +build-type = "RelWithDebInfo" +c-compiler = "gcc-13" +container = "eccr.ecmwf.int/public-ci-images/ubuntu24.04-gcc13-gfortran13" +cxx-compiler = "g++-13" +extras = "all,test,ci" +job-script = "./.ci/test.sh.j2" +platform = "ubuntu-24.04" +python-build-type = "Release" +python-platform = "gh-ubuntu-26.04" +runs-on = "ubuntu-latest" + +[[matrix.test.include]] +python-version = "3.11" + +[[matrix.test.include]] +python-version = "3.12" + +[[matrix.test.include]] +python-version = "3.13" + +[package] +ci-pre-commit = false compiler-inputs = [] -python-version-input = "python-version" -platform-input = "python-platform" -build-type-input = "python-build-type" +fork-pull-requests = false +full-history = true +name = "earthkit-data" +repo = "ecmwf/earthkit-data" +visibility = "public" [[trigger-downstream]] -repo = "ecmwf/earthkit-transforms" ref = "develop" +repo = "ecmwf/earthkit-transforms" [[trigger-downstream]] -repo = "ecmwf/earthkit-workflows" ref = "main" +repo = "ecmwf/earthkit-workflows" [[trigger-downstream]] -repo = "ecmwf/earthkit-hydro" ref = "develop" +repo = "ecmwf/earthkit-hydro" [[trigger-downstream]] -repo = "ecmwf/earthkit-geo" ref = "develop" +repo = "ecmwf/earthkit-geo" [[trigger-downstream]] -repo = "ecmwf/earthkit-meteo" ref = "develop" +repo = "ecmwf/earthkit-meteo" [[trigger-downstream]] -repo = "ecmwf/earthkit-plots" ref = "develop" +repo = "ecmwf/earthkit-plots" [[trigger-downstream]] -repo = "ecmwf/earthkit" ref = "develop" - -[matrix.test] -triggers = ["upstream-change", "rebuild-request"] - -# The container and compiler of the eccodes, odc, and fdb builds, whose libraries the tests load. -[matrix.test.defaults] -job-script = "./.ci/test.sh.j2" -runs-on = "ubuntu-latest" -container = "eccr.ecmwf.int/public-ci-images/ubuntu24.04-gcc13-gfortran13" -platform = "ubuntu-24.04" -cxx-compiler = "g++-13" -c-compiler = "gcc-13" -build-type = "RelWithDebInfo" -python-platform = "gh-ubuntu-26.04" -python-build-type = "Release" -extras = "all,test,ci" - -[[matrix.test.include]] -python-version = "3.11" - -[[matrix.test.include]] -python-version = "3.12" - -[[matrix.test.include]] -python-version = "3.13" +repo = "ecmwf/earthkit" diff --git a/.github/workflows/old_CI.yml b/.github/workflows/old_CI.yml index 503c627aa..561108076 100644 --- a/.github/workflows/old_CI.yml +++ b/.github/workflows/old_CI.yml @@ -6,11 +6,11 @@ on: workflows: [CI] types: [completed] branches: - - "main" - - "develop" + - "main" + - "develop" # Trigger the workflow manually - workflow_dispatch: ~ + workflow_dispatch: jobs: # Run CI including downstream packages on self-hosted runners diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef9babeb8..e71554a38 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,6 +32,8 @@ repos: hooks: - id: pretty-format-yaml args: [--autofix, --preserve-quotes] + # Written by the ci-infrastructure regenerator, which would undo the formatting. + exclude: ^\.github/workflows/(ci|ci-fork|cross-repo-trigger.*|trigger-downstream.*|pr-label-.*|pr-sync-branch|retry-nightly)\.yml$ - id: pretty-format-toml args: [--autofix] - repo: https://github.com/sphinx-contrib/sphinx-lint From 4a7e2fd3418d44b98a435ad1b1fbfaeb6be347ab Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Tue, 24 Nov 2026 22:34:17 +0100 Subject: [PATCH 03/15] ci: Spread the nightly start time Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 998feb5c3..cba3d78e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: types: [opened, reopened, synchronize] workflow_dispatch: schedule: - - cron: "22 4 * * *" + - cron: "28 4 * * *" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} From d8d0f52f3cbc16b414129301ea0bece0aa16409b Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 25 Nov 2026 11:55:07 +0100 Subject: [PATCH 04/15] ci: Run tests on ubuntu-24.04 Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index fc8059e9f..5bbc7d6c1 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -66,7 +66,7 @@ job-script = "./.ci/test.sh.j2" platform = "ubuntu-24.04" python-build-type = "Release" python-platform = "gh-ubuntu-26.04" -runs-on = "ubuntu-latest" +runs-on = "ubuntu-24.04" [[matrix.test.include]] python-version = "3.11" From 8f0eada36bd0642480b743f87fa9fcce39d703b2 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 25 Nov 2026 11:56:31 +0100 Subject: [PATCH 05/15] ci: Take pyodc from develop Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 5bbc7d6c1..c19235878 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -16,7 +16,7 @@ repo = "ecmwf/pdbufr" compiler-inputs = [] package = "pyodc" python-version-input = "python-version" -ref = "master" +ref = "develop" repo = "ecmwf/pyodc" [[deps]] From d41dddaee5ef25dd39b9c53f8cf8bd2b5a6ca01f Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 25 Nov 2026 12:06:22 +0100 Subject: [PATCH 06/15] ci: Run tests on ubuntu-latest again Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index c19235878..30a206393 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -66,7 +66,7 @@ job-script = "./.ci/test.sh.j2" platform = "ubuntu-24.04" python-build-type = "Release" python-platform = "gh-ubuntu-26.04" -runs-on = "ubuntu-24.04" +runs-on = "ubuntu-latest" [[matrix.test.include]] python-version = "3.11" From c6f90501962ce17627948f39cdb128cf9a91ec2b Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 25 Nov 2026 15:30:09 +0100 Subject: [PATCH 07/15] ci: Accept stale deps; find libraries through LD_LIBRARY_PATH Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 1 + .ci/test.sh.j2 | 15 +++------------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 30a206393..57dd4faa2 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -78,6 +78,7 @@ python-version = "3.12" python-version = "3.13" [package] +allow-stale-deps = true ci-pre-commit = false compiler-inputs = [] fork-pull-requests = false diff --git a/.ci/test.sh.j2 b/.ci/test.sh.j2 index 7937c1e19..0b2396642 100644 --- a/.ci/test.sh.j2 +++ b/.ci/test.sh.j2 @@ -1,22 +1,13 @@ {% extends "ci-infrastructure/python-runner.sh.j2" %} {% block set_environment %} -# findlibs finds eccodes, odc, metkit, and fdb from their *_HOME; each dep has its own prefix. +# fetch-deps puts each dep's lib dirs on LD_LIBRARY_PATH, where findlibs finds them; +# eccodes still needs its definitions and samples. IFS=';:' read -ra dep_prefixes <<<"${CMAKE_PREFIX_PATH:-}" for prefix in ${dep_prefixes[@]+"${dep_prefixes[@]}"}; do - if compgen -G "$prefix/lib*/libeccodes.*" >/dev/null; then - export ECCODES_HOME="$prefix" + if [ -d "$prefix/share/eccodes/definitions" ]; then export ECCODES_DEFINITION_PATH="$prefix/share/eccodes/definitions" export ECCODES_SAMPLES_PATH="$prefix/share/eccodes/samples" fi - if compgen -G "$prefix/lib*/libodccore.*" >/dev/null; then - export ODC_HOME="$prefix" - fi - if compgen -G "$prefix/lib*/libmetkit.*" >/dev/null; then - export METKIT_HOME="$prefix" - fi - if compgen -G "$prefix/lib*/libfdb5.*" >/dev/null; then - export FDB5_HOME="$prefix" - fi done export FINDLIBS_DISABLE_PACKAGE=yes {% endblock %} From ec45995d4ef50aac2818383095ceb63eef2b0400 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 25 Nov 2026 16:52:42 +0100 Subject: [PATCH 08/15] Code-own .ci/ Co-Authored-By: Claude Opus 5.5 --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3d21c2de2..0b929ab4d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,6 +2,7 @@ # BEGIN org baseline: maintainers own .github/ and CODEOWNERS (ci-infrastructure scripts/apply-codeowners.sh) /.github/ @JamesVarndell @sandorkertesz +/.ci/ @JamesVarndell @sandorkertesz /CODEOWNERS @JamesVarndell @sandorkertesz /docs/CODEOWNERS @JamesVarndell @sandorkertesz # END org baseline From 5be0376efe4b50dd5cf602d6ec92da3cd890e21c Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 25 Nov 2026 22:53:21 +0100 Subject: [PATCH 09/15] ci: Keep the PyPI lib wheels out of the test install Co-Authored-By: Claude Opus 5.5 --- .ci/test.sh.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.ci/test.sh.j2 b/.ci/test.sh.j2 index 0b2396642..98cced6ae 100644 --- a/.ci/test.sh.j2 +++ b/.ci/test.sh.j2 @@ -10,6 +10,9 @@ for prefix in ${dep_prefixes[@]+"${dep_prefixes[@]}"}; do fi done export FINDLIBS_DISABLE_PACKAGE=yes +# The PyPI wheels bundling those libraries are unused here, and their exact pins clash. +printf '%s\n' eckitlib eccodeslib metkitlib odclib fdb5lib >"${TMPDIR:-/tmp}/ci-excludes.txt" +export UV_EXCLUDE="${TMPDIR:-/tmp}/ci-excludes.txt" {% endblock %} {% block test %} cd "$CI_SOURCE_DIR" From ba2fd9b6b7d1224d968d8592d6500296baa019f8 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 25 Nov 2026 23:07:33 +0100 Subject: [PATCH 10/15] Revert "ci: Keep the PyPI lib wheels out of the test install" Co-Authored-By: Claude Opus 5.5 --- .ci/test.sh.j2 | 3 --- 1 file changed, 3 deletions(-) diff --git a/.ci/test.sh.j2 b/.ci/test.sh.j2 index 98cced6ae..0b2396642 100644 --- a/.ci/test.sh.j2 +++ b/.ci/test.sh.j2 @@ -10,9 +10,6 @@ for prefix in ${dep_prefixes[@]+"${dep_prefixes[@]}"}; do fi done export FINDLIBS_DISABLE_PACKAGE=yes -# The PyPI wheels bundling those libraries are unused here, and their exact pins clash. -printf '%s\n' eckitlib eccodeslib metkitlib odclib fdb5lib >"${TMPDIR:-/tmp}/ci-excludes.txt" -export UV_EXCLUDE="${TMPDIR:-/tmp}/ci-excludes.txt" {% endblock %} {% block test %} cd "$CI_SOURCE_DIR" From bd492850e8d7bc99d76b073b069a0fbe5bc79e00 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Thu, 26 Nov 2026 00:06:14 +0100 Subject: [PATCH 11/15] ci: Take eckit, mir-python, and pygribjump from CI builds Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 26 +++++++++++++++++++++++--- .github/workflows/ci.yml | 6 +++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 57dd4faa2..6bd35e1c7 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -33,6 +33,28 @@ python-version-input = "python-version" ref = "develop" repo = "ecmwf/metkit" +# From PyPI these would pull in the PyPI eckit, mir, and gribjump libraries. +[[deps]] +compiler-inputs = ["cxx-compiler"] +package = "eckit-python" +python-version-input = "python-version" +ref = "develop" +repo = "ecmwf/eckit" + +[[deps]] +compiler-inputs = ["cxx-compiler"] +package = "mir-python" +python-version-input = "python-version" +ref = "develop" +repo = "ecmwf/mir" + +[[deps]] +compiler-inputs = ["cxx-compiler"] +package = "pygribjump" +python-version-input = "python-version" +ref = "develop" +repo = "ecmwf/gribjump" + # Pure-Python upstreams, built on the GitHub runner rather than in this container. [[deps]] build-type-input = "python-build-type" @@ -68,9 +90,7 @@ python-build-type = "Release" python-platform = "gh-ubuntu-26.04" runs-on = "ubuntu-latest" -[[matrix.test.include]] -python-version = "3.11" - +# No 3.11: gribjump builds no pygribjump for it. [[matrix.test.include]] python-version = "3.12" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cba3d78e5..02bd3dbad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: with: client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} - repositories: cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fdb,findlibs,metkit,multiurl,odc,pdbufr,pyodc,stack-dependencies + repositories: atlas,cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fckit,fdb,findlibs,gribjump,metkit,mir,multiurl,odc,pdbufr,pyodc,stack-dependencies permissions: contents:read actions:read - uses: actions/checkout@v6 with: @@ -77,7 +77,7 @@ jobs: uses: ecmwf/ci-infrastructure/actions/dispatch-producers@main with: dispatch-plans: ${{ needs.resolve.outputs.dispatch-plans }} - repositories: cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fdb,findlibs,metkit,multiurl,odc,pdbufr,pyodc,stack-dependencies + repositories: atlas,cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fckit,fdb,findlibs,gribjump,metkit,mir,multiurl,odc,pdbufr,pyodc,stack-dependencies client-id: ${{ vars.CI_DISPATCHER_APP_CLIENT_ID }} app-private-key: ${{ secrets.CI_DISPATCHER_APP_PRIVATE_KEY }} @@ -98,7 +98,7 @@ jobs: with: client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} - repositories: cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fdb,findlibs,metkit,multiurl,odc,pdbufr,pyodc,stack-dependencies + repositories: atlas,cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fckit,fdb,findlibs,gribjump,metkit,mir,multiurl,odc,pdbufr,pyodc,stack-dependencies permissions: contents:read actions:read - uses: actions/checkout@v6 with: From cfa0f6415a34344458b7c2b0fc3e4e67e29958c8 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Thu, 26 Nov 2026 16:32:52 +0100 Subject: [PATCH 12/15] ci: Leave fork-pull-requests at its default Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 6bd35e1c7..a4108faf5 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -101,7 +101,6 @@ python-version = "3.13" allow-stale-deps = true ci-pre-commit = false compiler-inputs = [] -fork-pull-requests = false full-history = true name = "earthkit-data" repo = "ecmwf/earthkit-data" From a1b3e23d1d5c375515a96d6c7057e0677a29e52f Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Mon, 30 Nov 2026 15:03:55 +0100 Subject: [PATCH 13/15] ci: Test against PyPI's eccodes, eckit, metkit, mir, odc, and fdb for now Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 67 ++-------------------------------------- .ci/test.sh.j2 | 12 ------- .github/workflows/ci.yml | 8 ++--- 3 files changed, 6 insertions(+), 81 deletions(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index a4108faf5..368b0ccea 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -1,61 +1,4 @@ -[[deps]] -compiler-inputs = [] -package = "cfgrib" -python-version-input = "python-version" -ref = "master" -repo = "ecmwf/cfgrib" - -[[deps]] -compiler-inputs = [] -package = "pdbufr" -python-version-input = "python-version" -ref = "develop" -repo = "ecmwf/pdbufr" - -[[deps]] -compiler-inputs = [] -package = "pyodc" -python-version-input = "python-version" -ref = "develop" -repo = "ecmwf/pyodc" - -[[deps]] -compiler-inputs = ["cxx-compiler"] -package = "pyfdb" -python-version-input = "python-version" -ref = "develop" -repo = "ecmwf/fdb" - -[[deps]] -compiler-inputs = ["cxx-compiler"] -package = "pymetkit" -python-version-input = "python-version" -ref = "develop" -repo = "ecmwf/metkit" - -# From PyPI these would pull in the PyPI eckit, mir, and gribjump libraries. -[[deps]] -compiler-inputs = ["cxx-compiler"] -package = "eckit-python" -python-version-input = "python-version" -ref = "develop" -repo = "ecmwf/eckit" - -[[deps]] -compiler-inputs = ["cxx-compiler"] -package = "mir-python" -python-version-input = "python-version" -ref = "develop" -repo = "ecmwf/mir" - -[[deps]] -compiler-inputs = ["cxx-compiler"] -package = "pygribjump" -python-version-input = "python-version" -ref = "develop" -repo = "ecmwf/gribjump" - -# Pure-Python upstreams, built on the GitHub runner rather than in this container. +# An island for now: eccodes, eckit, metkit, mir, odc, fdb, gribjump, cfgrib, and pdbufr come from PyPI. [[deps]] build-type-input = "python-build-type" compiler-inputs = [] @@ -77,20 +20,14 @@ repo = "ecmwf/earthkit-utils" [matrix.test] triggers = ["upstream-change", "rebuild-request"] -# The container and compiler of the eccodes, odc, and fdb builds, whose libraries the tests load. [matrix.test.defaults] -build-type = "RelWithDebInfo" -c-compiler = "gcc-13" -container = "eccr.ecmwf.int/public-ci-images/ubuntu24.04-gcc13-gfortran13" -cxx-compiler = "g++-13" extras = "all,test,ci" job-script = "./.ci/test.sh.j2" -platform = "ubuntu-24.04" +platform = "gh-ubuntu-26.04" python-build-type = "Release" python-platform = "gh-ubuntu-26.04" runs-on = "ubuntu-latest" -# No 3.11: gribjump builds no pygribjump for it. [[matrix.test.include]] python-version = "3.12" diff --git a/.ci/test.sh.j2 b/.ci/test.sh.j2 index 0b2396642..bfa00e125 100644 --- a/.ci/test.sh.j2 +++ b/.ci/test.sh.j2 @@ -1,16 +1,4 @@ {% extends "ci-infrastructure/python-runner.sh.j2" %} -{% block set_environment %} -# fetch-deps puts each dep's lib dirs on LD_LIBRARY_PATH, where findlibs finds them; -# eccodes still needs its definitions and samples. -IFS=';:' read -ra dep_prefixes <<<"${CMAKE_PREFIX_PATH:-}" -for prefix in ${dep_prefixes[@]+"${dep_prefixes[@]}"}; do - if [ -d "$prefix/share/eccodes/definitions" ]; then - export ECCODES_DEFINITION_PATH="$prefix/share/eccodes/definitions" - export ECCODES_SAMPLES_PATH="$prefix/share/eccodes/samples" - fi -done -export FINDLIBS_DISABLE_PACKAGE=yes -{% endblock %} {% block test %} cd "$CI_SOURCE_DIR" python -m pytest -vv -m 'not notebook and not no_cache_init' -k 'not netcdf' --cov=. --cov-report=xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02bd3dbad..292aff4a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: types: [opened, reopened, synchronize] workflow_dispatch: schedule: - - cron: "28 4 * * *" + - cron: "58 3 * * *" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} @@ -48,7 +48,7 @@ jobs: with: client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} - repositories: atlas,cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fckit,fdb,findlibs,gribjump,metkit,mir,multiurl,odc,pdbufr,pyodc,stack-dependencies + repositories: earthkit-data,earthkit-utils,multiurl permissions: contents:read actions:read - uses: actions/checkout@v6 with: @@ -77,7 +77,7 @@ jobs: uses: ecmwf/ci-infrastructure/actions/dispatch-producers@main with: dispatch-plans: ${{ needs.resolve.outputs.dispatch-plans }} - repositories: atlas,cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fckit,fdb,findlibs,gribjump,metkit,mir,multiurl,odc,pdbufr,pyodc,stack-dependencies + repositories: earthkit-data,earthkit-utils,multiurl client-id: ${{ vars.CI_DISPATCHER_APP_CLIENT_ID }} app-private-key: ${{ secrets.CI_DISPATCHER_APP_PRIVATE_KEY }} @@ -98,7 +98,7 @@ jobs: with: client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} - repositories: atlas,cfgrib,earthkit-data,earthkit-utils,ecbuild,eccodes,eccodes-python,eckit,fckit,fdb,findlibs,gribjump,metkit,mir,multiurl,odc,pdbufr,pyodc,stack-dependencies + repositories: earthkit-data,earthkit-utils,multiurl permissions: contents:read actions:read - uses: actions/checkout@v6 with: From 17445cfed7a14a75b6740ceca5f70a36d279c4f7 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Mon, 30 Nov 2026 15:54:36 +0100 Subject: [PATCH 14/15] ci: Depend on earthkit-geo instead of triggering it Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 13 +++++++++---- .github/workflows/ci.yml | 8 ++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 368b0ccea..80b6ca890 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -17,6 +17,15 @@ python-version-input = "python-version" ref = "develop" repo = "ecmwf/earthkit-utils" +[[deps]] +build-type-input = "python-build-type" +compiler-inputs = [] +package = "earthkit-geo" +platform-input = "python-platform" +python-version-input = "python-version" +ref = "develop" +repo = "ecmwf/earthkit-geo" + [matrix.test] triggers = ["upstream-change", "rebuild-request"] @@ -55,10 +64,6 @@ repo = "ecmwf/earthkit-workflows" ref = "develop" repo = "ecmwf/earthkit-hydro" -[[trigger-downstream]] -ref = "develop" -repo = "ecmwf/earthkit-geo" - [[trigger-downstream]] ref = "develop" repo = "ecmwf/earthkit-meteo" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 292aff4a9..78f12c317 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: types: [opened, reopened, synchronize] workflow_dispatch: schedule: - - cron: "58 3 * * *" + - cron: "13 4 * * *" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} @@ -48,7 +48,7 @@ jobs: with: client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} - repositories: earthkit-data,earthkit-utils,multiurl + repositories: earthkit-data,earthkit-geo,earthkit-utils,multiurl permissions: contents:read actions:read - uses: actions/checkout@v6 with: @@ -77,7 +77,7 @@ jobs: uses: ecmwf/ci-infrastructure/actions/dispatch-producers@main with: dispatch-plans: ${{ needs.resolve.outputs.dispatch-plans }} - repositories: earthkit-data,earthkit-utils,multiurl + repositories: earthkit-data,earthkit-geo,earthkit-utils,multiurl client-id: ${{ vars.CI_DISPATCHER_APP_CLIENT_ID }} app-private-key: ${{ secrets.CI_DISPATCHER_APP_PRIVATE_KEY }} @@ -98,7 +98,7 @@ jobs: with: client-id: ${{ vars.CI_READER_APP_CLIENT_ID }} private-key: ${{ secrets.CI_READER_APP_PRIVATE_KEY }} - repositories: earthkit-data,earthkit-utils,multiurl + repositories: earthkit-data,earthkit-geo,earthkit-utils,multiurl permissions: contents:read actions:read - uses: actions/checkout@v6 with: From 668ae39cf62a0d178fb9c59fb895f4169dd45412 Mon Sep 17 00:00:00 2001 From: Oskar Weser Date: Wed, 2 Dec 2026 12:34:17 +0100 Subject: [PATCH 15/15] ci: Run the tests in the ubuntu24.04 base image Co-Authored-By: Claude Opus 5.5 --- .ci/manifest.toml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.ci/manifest.toml b/.ci/manifest.toml index 80b6ca890..0d43b2a37 100644 --- a/.ci/manifest.toml +++ b/.ci/manifest.toml @@ -3,7 +3,6 @@ build-type-input = "python-build-type" compiler-inputs = [] package = "multiurl" -platform-input = "python-platform" python-version-input = "python-version" ref = "develop" repo = "ecmwf/multiurl" @@ -12,7 +11,6 @@ repo = "ecmwf/multiurl" build-type-input = "python-build-type" compiler-inputs = [] package = "earthkit-utils" -platform-input = "python-platform" python-version-input = "python-version" ref = "develop" repo = "ecmwf/earthkit-utils" @@ -21,7 +19,6 @@ repo = "ecmwf/earthkit-utils" build-type-input = "python-build-type" compiler-inputs = [] package = "earthkit-geo" -platform-input = "python-platform" python-version-input = "python-version" ref = "develop" repo = "ecmwf/earthkit-geo" @@ -30,11 +27,11 @@ repo = "ecmwf/earthkit-geo" triggers = ["upstream-change", "rebuild-request"] [matrix.test.defaults] +container = "eccr.ecmwf.int/public-ci-images/ubuntu24.04-base:latest" extras = "all,test,ci" job-script = "./.ci/test.sh.j2" -platform = "gh-ubuntu-26.04" +platform = "ubuntu-24.04" python-build-type = "Release" -python-platform = "gh-ubuntu-26.04" runs-on = "ubuntu-latest" [[matrix.test.include]]