Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to micromamba 2 #9732

Merged
merged 7 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/benchmarks-last-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Set up conda environment
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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- name: Set up conda environment
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
Expand Down
27 changes: 10 additions & 17 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

env:
FORCE_COLOR: 3
MICROMAMBA_VERSION: "2.0.2-2"

jobs:
detect-ci-trigger:
Expand Down Expand Up @@ -57,11 +58,11 @@ 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: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"

Expand All @@ -70,8 +71,6 @@ jobs:
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Run doctests
run: |
Expand Down Expand Up @@ -105,20 +104,18 @@ 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: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install mypy
run: |
Expand Down Expand Up @@ -159,20 +156,18 @@ 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: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install mypy
run: |
Expand Down Expand Up @@ -218,20 +213,18 @@ 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: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install pyright
run: |
Expand Down Expand Up @@ -277,20 +270,18 @@ 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: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install pyright
run: |
Expand All @@ -313,7 +304,8 @@ jobs:
name: Minimum Version Policy
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false'
# disabled until `conda` is compatible with the new `libmambapy`
if: false && needs.detect-ci-trigger.outputs.triggered == 'false'
defaults:
run:
shell: bash -l {0}
Expand All @@ -326,12 +318,13 @@ jobs:
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: ${{env.MICROMAMBA_VERSION}}
environment-name: xarray-tests
create-args: >-
python=3.12
pyyaml
conda
python-dateutil
libmambapy

- name: All-deps minimum versions policy
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

env:
FORCE_COLOR: 3
micromamba_version: 2

jobs:
detect-ci-trigger:
Expand Down Expand Up @@ -110,13 +111,13 @@ 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
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
conda

# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
Expand All @@ -131,8 +132,6 @@ jobs:

- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py

- name: Import xarray
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/hypothesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ 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: >-
Expand All @@ -76,8 +77,6 @@ jobs:
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py

# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ concurrency:

env:
FORCE_COLOR: 3
MICROMAMBA_VERSION: "2.0.2-2"

jobs:
detect-ci-trigger:
Expand Down Expand Up @@ -63,12 +64,12 @@ 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: >-
python=${{ matrix.python-version }}
pytest-reportlog
conda
- name: Install upstream versions
run: |
bash ci/install-upstream-wheels.sh
Expand All @@ -77,8 +78,6 @@ jobs:
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Import xarray
run: |
Expand Down Expand Up @@ -122,12 +121,12 @@ 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: >-
python=${{ matrix.python-version }}
pytest-reportlog
conda
- name: Install upstream versions
run: |
bash ci/install-upstream-wheels.sh
Expand All @@ -136,8 +135,6 @@ jobs:
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install mypy
run: |
Expand Down
4 changes: 2 additions & 2 deletions ci/min_deps_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from collections.abc import Iterator
from datetime import datetime

import conda.api # type: ignore[import]
import libmambapy # type: ignore[import]
import yaml
from dateutil.relativedelta import relativedelta

Expand Down Expand Up @@ -93,7 +93,7 @@ def metadata(entry):

return (major, minor), time

raw_data = conda.api.SubdirData.query_all(pkg, channels=CHANNELS)
raw_data = libmambapy.SubdirData.query_all(pkg, channels=CHANNELS)
data = sorted(metadata(entry) for entry in raw_data if entry.timestamp != 0)

release_dates = {
Expand Down
Loading