From 61596a79a1119c27d0a2a7ffc3ce9a992b93108d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20M=C3=BChlbauer?= Date: Fri, 8 Nov 2024 12:08:06 +0100 Subject: [PATCH] Use micromamba 1.5.10 where conda is needed (#9737) * Use micromamba 1.5.10 together with conda for min-version-policy, since conda.api and libmambapy are not API compatible * use micromamba 1.5.10-0 for benchmark, since micromamba 2 does not work with `asv`, yet * pin mamba to <=1.5.10 in benchmark * revert setting explicit micromamba-version --- .github/workflows/benchmarks-last-release.yml | 2 +- .github/workflows/benchmarks.yml | 4 ++-- .github/workflows/ci-additional.yaml | 15 +++++---------- .github/workflows/ci.yaml | 2 -- .github/workflows/hypothesis.yaml | 1 - .github/workflows/upstream-dev-ci.yaml | 3 --- ci/min_deps_check.py | 4 ++-- 7 files changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/benchmarks-last-release.yml b/.github/workflows/benchmarks-last-release.yml index 1df14dcc50c..5e36613368d 100644 --- a/.github/workflows/benchmarks-last-release.yml +++ b/.github/workflows/benchmarks-last-release.yml @@ -24,7 +24,7 @@ jobs: - name: Set up conda environment uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: '2.0.2-2' + micromamba-version: '1.5.10-0' environment-file: ${{env.CONDA_ENV_FILE}} environment-name: xarray-tests cache-environment: true diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 9daf042bd5e..e2cde27532d 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -27,7 +27,7 @@ jobs: - name: Set up conda environment uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: '2.0.2-2' + micromamba-version: '1.5.10-0' environment-file: ${{env.CONDA_ENV_FILE}} environment-name: xarray-tests cache-environment: true @@ -36,7 +36,7 @@ jobs: create-args: >- asv python-build - mamba + mamba<=1.5.10 - name: Run benchmarks diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index d4a0141a673..b665d20b40a 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -14,7 +14,6 @@ concurrency: env: FORCE_COLOR: 3 - MICROMAMBA_VERSION: "2.0.2-2" jobs: detect-ci-trigger: @@ -58,7 +57,6 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: ${{env.MICROMAMBA_VERSION}} environment-file: ${{env.CONDA_ENV_FILE}} environment-name: xarray-tests create-args: >- @@ -104,7 +102,6 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: ${{env.MICROMAMBA_VERSION}} environment-file: ${{env.CONDA_ENV_FILE}} environment-name: xarray-tests create-args: >- @@ -156,7 +153,6 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: ${{env.MICROMAMBA_VERSION}} environment-file: ${{env.CONDA_ENV_FILE}} environment-name: xarray-tests create-args: >- @@ -213,7 +209,6 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: ${{env.MICROMAMBA_VERSION}} environment-file: ${{env.CONDA_ENV_FILE}} environment-name: xarray-tests create-args: >- @@ -270,7 +265,6 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: ${{env.MICROMAMBA_VERSION}} environment-file: ${{env.CONDA_ENV_FILE}} environment-name: xarray-tests create-args: >- @@ -304,8 +298,7 @@ jobs: name: Minimum Version Policy runs-on: "ubuntu-latest" needs: detect-ci-trigger - # disabled until `conda` is compatible with the new `libmambapy` - if: false && needs.detect-ci-trigger.outputs.triggered == 'false' + if: needs.detect-ci-trigger.outputs.triggered == 'false' defaults: run: shell: bash -l {0} @@ -318,13 +311,15 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: ${{env.MICROMAMBA_VERSION}} + # run with micromamba 1.5.10 together with conda + # conda.api is not API compatible with libmambapy + micromamba-version: "1.5.10-0" environment-name: xarray-tests create-args: >- python=3.12 pyyaml python-dateutil - libmambapy + conda - name: All-deps minimum versions policy run: | diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1a08b4c5903..fc6d9d0e0b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,6 @@ concurrency: env: FORCE_COLOR: 3 - micromamba_version: 2 jobs: detect-ci-trigger: @@ -111,7 +110,6 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: '2.0.2-2' environment-file: ${{ env.CONDA_ENV_FILE }} environment-name: xarray-tests cache-environment: true diff --git a/.github/workflows/hypothesis.yaml b/.github/workflows/hypothesis.yaml index b90c2f26634..2a904c06824 100644 --- a/.github/workflows/hypothesis.yaml +++ b/.github/workflows/hypothesis.yaml @@ -63,7 +63,6 @@ jobs: - name: Setup micromamba uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: "2.0.2-2" environment-file: ci/requirements/environment.yml environment-name: xarray-tests create-args: >- diff --git a/.github/workflows/upstream-dev-ci.yaml b/.github/workflows/upstream-dev-ci.yaml index 1d2aebab930..db8bd981e51 100644 --- a/.github/workflows/upstream-dev-ci.yaml +++ b/.github/workflows/upstream-dev-ci.yaml @@ -17,7 +17,6 @@ concurrency: env: FORCE_COLOR: 3 - MICROMAMBA_VERSION: "2.0.2-2" jobs: detect-ci-trigger: @@ -64,7 +63,6 @@ jobs: - name: Set up conda environment uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: ${{env.MICROMAMBA_VERSION}} environment-file: ci/requirements/environment.yml environment-name: xarray-tests create-args: >- @@ -121,7 +119,6 @@ jobs: - name: Set up conda environment uses: mamba-org/setup-micromamba@v2 with: - micromamba-version: ${{env.MICROMAMBA_VERSION}} environment-file: ci/requirements/environment.yml environment-name: xarray-tests create-args: >- diff --git a/ci/min_deps_check.py b/ci/min_deps_check.py index a01d82ebfbb..443ab7d5a40 100755 --- a/ci/min_deps_check.py +++ b/ci/min_deps_check.py @@ -11,7 +11,7 @@ from collections.abc import Iterator from datetime import datetime -import libmambapy # type: ignore[import] +import conda.api # type: ignore[import] import yaml from dateutil.relativedelta import relativedelta @@ -93,7 +93,7 @@ def metadata(entry): return (major, minor), time - raw_data = libmambapy.SubdirData.query_all(pkg, channels=CHANNELS) + raw_data = conda.api.SubdirData.query_all(pkg, channels=CHANNELS) data = sorted(metadata(entry) for entry in raw_data if entry.timestamp != 0) release_dates = {