diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 875d996..1741648 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -11,7 +11,7 @@ jobs: linux_64_: CONFIG: linux_64_ UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 timeoutInMinutes: 360 variables: {} diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 04c57a4..8fdafbf 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,8 +1,10 @@ cdt_name: -- cos6 +- conda channel_sources: - conda-forge channel_targets: - conda-forge esmvalcore_rc docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 +- quay.io/condaforge/linux-anvil-x86_64:alma9 +python_min: +- '3.9' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ef4b4f1..3617c98 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @bouweandela @nielsdrost @remi-kazeroni @schlunma @sloosvel @valeriupredoi @zklaus \ No newline at end of file +* @bouweandela @ehogan @nielsdrost @remi-kazeroni @schlunma @sloosvel @valeriupredoi @zklaus \ No newline at end of file diff --git a/.gitignore b/.gitignore index 179afe5..bb38536 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ /build_artifacts *.pyc + +# Rattler-build's artifacts are in `output` when not specifying anything. +/output diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 97dc8d9..f8051ab 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,18 +31,20 @@ pkgs_dirs: solver: libmamba CONDARC +mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S) +echo > /opt/conda/conda-meta/history +micromamba install --root-prefix ~/.conda --prefix /opt/conda \ + --yes --override-channels --channel conda-forge --strict-channel-priority \ + pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 -mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" - # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup + + # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -69,11 +71,10 @@ else --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" - ( startgroup "Inspecting artifacts" ) 2> /dev/null - # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 - command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4" ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null diff --git a/README.md b/README.md index b4715ef..07c6909 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ Feedstock Maintainers ===================== * [@bouweandela](https://github.com/bouweandela/) +* [@ehogan](https://github.com/ehogan/) * [@nielsdrost](https://github.com/nielsdrost/) * [@remi-kazeroni](https://github.com/remi-kazeroni/) * [@schlunma](https://github.com/schlunma/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ad85a2c..d309e84 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,5 +2,30 @@ # update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file +stages: +- stage: Check + jobs: + - job: Skip + pool: + vmImage: 'ubuntu-22.04' + variables: + DECODE_PERCENTS: 'false' + RET: 'true' + steps: + - checkout: self + fetchDepth: '2' + - bash: | + git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "` + echo "##vso[task.setvariable variable=log]$git_log" + displayName: Obtain commit message + - bash: echo "##vso[task.setvariable variable=RET]false" + condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))) + displayName: Skip build? + - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" + name: result + displayName: Export result +- stage: Build + condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) + dependsOn: Check + jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index e0d408d..c4a56c6 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,13 +1,16 @@ -#!/usr/bin/env python3 +#!/bin/sh +"""exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on # # This file has been generated by conda-smithy in order to build the recipe # locally. # -import os +# The line above this comment is a bash / sh / zsh guard +# to stop people from running it with the wrong interpreter import glob +import os +import platform import subprocess from argparse import ArgumentParser -import platform def setup_environment(ns): @@ -23,6 +26,13 @@ def setup_environment(ns): os.path.dirname(__file__), "miniforge3" ) + # The default cache location might not be writable using docker on macOS. + if ns.config.startswith("linux") and platform.system() == "Darwin": + os.environ["CONDA_FORGE_DOCKER_RUN_ARGS"] = ( + os.environ.get("CONDA_FORGE_DOCKER_RUN_ARGS", "") + + " -e RATTLER_CACHE_DIR=/tmp/rattler_cache" + ) + def run_docker_build(ns): script = ".scripts/run_docker_build.sh" diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9219d75..db6aa09 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,13 +1,14 @@ +{% set python_min = '3.10' %} {% set name = "ESMValCore" %} -{% set version = "2.11.0rc2" %} +{% set version = "2.12.0rc1" %} package: name: {{ name|lower }} version: {{ version }} source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name|lower }}-{{ version }}.tar.gz - sha256: c6b4dd9aac49d5aff7c35e86ac37c4e803cc067eb93a673fe6d2a77871474186 + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name|lower }}-{{ version }}.tar.gz + sha256: 857789bd1c7fdec57124ae1bc726f62c4b934c728822015aa813dfa881ee5c0d build: # Increment the build number when building a new conda package of the same @@ -19,46 +20,49 @@ build: requirements: host: + - python >={{ python_min }} - git - - python >=3.9 - pip !=21.3 - pytest-runner - - setuptools_scm + - setuptools >=40.6.0 + - setuptools_scm >=6.2 run: + - python >={{ python_min }} - cartopy - cf-units - cftime - - dask + - dask >=2025,<2025.2 # github.com/ESMValGroup/ESMValCore/pull/2663 - dask-jobqueue - distributed - esgf-pyclient >=0.3.1 - - esmpy !=8.1.0,<8.6.0 # https://github.com/SciTools-incubator/iris-esmf-regrid/pull/342#issuecomment-2092921514 + - esmpy - filelock - fiona - fire - geopy - humanfriendly - - importlib_metadata - - iris >3.8.0 - - iris-esmf-regrid >=0.7.0 - - isodate + - importlib-metadata + - iris >=3.11 + - iris-esmf-regrid >=0.11.0 + - iris-grib >=0.20.0 + - isodate >=0.7.0 - jinja2 - libnetcdf !=4.9.1 # to avoid hdf5 warnings - nc-time-axis - nested-lookup - netcdf4 - - numpy !=1.24.3,<2.0.0 # severe bug in masked arrays, avoid pulling 2.0.0rcX + - numpy !=1.24.3 - packaging - - pandas !=2.2.0,!=2.2.1,!=2.2.2 # github.com/ESMValGroup/ESMValCore/pull/2305 and #2349 + - pandas - pillow - prov - psutil - py-cordex - pybtex - - python >=3.9 - python-stratify >=0.3 - pyyaml - requests + - rich - scipy >=1.6 - shapely >=2.0.0 - yamale @@ -69,6 +73,7 @@ test: - setup.cfg requires: # - ESMValTool_sample_data==0.0.3 + - python >={{ python_min }} - flake8 >=7 - mypy >=0.990 - pip @@ -81,11 +86,11 @@ test: - pytest-mypy - pytest-xdist # - types-requests - # - types-pkg_resources # - types-PyYAML commands: - - pip install ESMValTool-sample-data types-requests types-pkg_resources types-PyYAML - - pytest -n 2 --ignore=run_test.py --ignore=tests/unit/documentation/ + - pip install ESMValTool-sample-data types-requests types-PyYAML + # TODO make sure to remove the test_load ignore; see https://github.com/ESMValGroup/ESMValCore/issues/2664 + - pytest -n 2 --ignore=run_test.py --ignore=tests/unit/documentation/ --ignore=tests/integration/preprocessor/_io/test_load.py - esmvaltool -- --help - esmvaltool version imports: @@ -113,6 +118,7 @@ about: extra: recipe-maintainers: + - ehogan - remi-kazeroni - bouweandela - nielsdrost