From fbd4ad09da48d2e4246cdc1b9abdf0bbb3e2c00e Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 28 Aug 2023 16:02:53 +0200 Subject: [PATCH 1/8] migrate the ci to `setup-micromamba` --- .github/workflows/ci.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2d65e9d1d..d182e63f6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,12 +34,13 @@ jobs: run: | echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV - name: Set up conda environment - uses: mamba-org/provision-with-micromamba@v15 + uses: mamba-org/setup-micromamba@v1 with: environment-file: ci/environment.yml environment-name: flox-tests - cache-env: true - extra-specs: | + init-shell: bash + cache-environment: true + create-args: | python="${{ matrix.python-version }}" - name: Install flox run: | @@ -77,12 +78,13 @@ jobs: with: fetch-depth: 0 # Fetch all history for all branches and tags. - name: Set up conda environment - uses: mamba-org/provision-with-micromamba@v15 + uses: mamba-org/setup-micromamba@v1 with: - environment-file: ci/${{ matrix.env }}.yml + environment-file: ci/environment.yml environment-name: flox-tests - cache-env: true - extra-specs: | + init-shell: bash + cache-environment: true + create-args: | python="${{ matrix.python-version }}" - name: Install flox run: | @@ -111,12 +113,13 @@ jobs: repository: 'pydata/xarray' fetch-depth: 0 # Fetch all history for all branches and tags. - name: Set up conda environment - uses: mamba-org/provision-with-micromamba@v15 + uses: mamba-org/setup-micromamba@v1 with: environment-file: ci/requirements/environment.yml environment-name: xarray-tests - cache-env: true - extra-specs: | + init-shell: bash + cache-environment: true + create-args: | python="3.10" - name: Install xarray run: | From d60a3e5fb156386ba5e4eb6c6b19be46cc0a3960 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 28 Aug 2023 16:05:39 +0200 Subject: [PATCH 2/8] migrate additional ci to `setup-micromamba` --- .github/workflows/ci-additional.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index 38fba5d88..cd3d76a45 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -53,14 +53,15 @@ jobs: echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Setup micromamba - uses: mamba-org/provision-with-micromamba@v15 + uses: mamba-org/setup-micromamba@v1 with: environment-file: ${{env.CONDA_ENV_FILE}} environment-name: flox-tests - extra-specs: | - python=${{env.PYTHON_VERSION}} - cache-env: true + init-shell: bash + cache-environment: true cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" + create-args: | + python="${{ env.PYTHON_VERSION }}" - name: Install flox run: | @@ -102,14 +103,15 @@ jobs: run: | echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Setup micromamba - uses: mamba-org/provision-with-micromamba@v15 + uses: mamba-org/setup-micromamba@v1 with: environment-file: ${{env.CONDA_ENV_FILE}} environment-name: flox-tests - extra-specs: | - python=${{env.PYTHON_VERSION}} - cache-env: true + init-shell: bash + cache-environment: true cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" + create-args: | + python=${{env.PYTHON_VERSION}} - name: Install flox run: | python -m pip install --no-deps -e . From 0ef5376e001d7d4e7e6e7c9ff5c0bc6edd561afd Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 28 Aug 2023 16:07:46 +0200 Subject: [PATCH 3/8] migrate the benchmarks to `setup-micromamba` --- .github/workflows/benchmarks.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index c18eb162f..9521b7b68 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -22,12 +22,13 @@ jobs: fetch-depth: 0 - name: Set up conda environment - uses: mamba-org/provision-with-micromamba@v15 + uses: mamba-org/setup-micromamba@v1 with: environment-file: ci/environment.yml environment-name: flox-tests - cache-env: true - # extra-specs: | + init-shell: bash + cache-environment: true + # create-args: | # python="${{ matrix.python-version }}" # - name: Setup some dependencies From 870d2129e4308880e38e8e25f6033b1a6fb3aa37 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 28 Aug 2023 16:08:38 +0200 Subject: [PATCH 4/8] migrate the upstream-dev ci to `setup-micromamba` --- .github/workflows/upstream-dev-ci.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upstream-dev-ci.yaml b/.github/workflows/upstream-dev-ci.yaml index 7bd271928..8ef25e49b 100644 --- a/.github/workflows/upstream-dev-ci.yaml +++ b/.github/workflows/upstream-dev-ci.yaml @@ -35,11 +35,13 @@ jobs: run: | echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV - name: Set up conda environment - uses: mamba-org/provision-with-micromamba@v15 + uses: mamba-org/setup-micromamba@v1 with: environment-file: ci/upstream-dev-env.yml environment-name: flox-tests - extra-specs: | + init-shell: bash + cache-environment: true + create-args: | python="${{ matrix.python-version }}" pytest-reportlog - name: Install flox From 7330b482708b094ba7e0f3cb99747649474e7ec7 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 28 Aug 2023 16:11:49 +0200 Subject: [PATCH 5/8] fix the new-ish `mypy` error --- flox/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flox/core.py b/flox/core.py index f821df9bc..5dbba5442 100644 --- a/flox/core.py +++ b/flox/core.py @@ -1622,7 +1622,7 @@ def _convert_expected_groups_to_index( out.append(ex) elif ex is not None: if isbin_: - out.append(pd.IntervalIndex.from_breaks(ex)) # type: ignore [arg-type] # TODO: what do we want here? + out.append(pd.IntervalIndex.from_breaks(ex)) # type: ignore [arg-type,unused-ignore] # TODO: what do we want here? else: if sort: ex = np.sort(ex) From 667b69587359af4faa6a36e377a58c917589195f Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 28 Aug 2023 16:15:33 +0200 Subject: [PATCH 6/8] remove the apparently harmful quotes --- .github/workflows/ci-additional.yaml | 4 ++-- .github/workflows/ci.yaml | 6 +++--- .github/workflows/upstream-dev-ci.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-additional.yaml b/.github/workflows/ci-additional.yaml index cd3d76a45..9449d9290 100644 --- a/.github/workflows/ci-additional.yaml +++ b/.github/workflows/ci-additional.yaml @@ -61,7 +61,7 @@ jobs: cache-environment: true cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" create-args: | - python="${{ env.PYTHON_VERSION }}" + python=${{ env.PYTHON_VERSION }} - name: Install flox run: | @@ -111,7 +111,7 @@ jobs: cache-environment: true cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}" create-args: | - python=${{env.PYTHON_VERSION}} + python=${{ env.PYTHON_VERSION }} - name: Install flox run: | python -m pip install --no-deps -e . diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d182e63f6..75aafc4b6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,7 +41,7 @@ jobs: init-shell: bash cache-environment: true create-args: | - python="${{ matrix.python-version }}" + python=${{ matrix.python-version }} - name: Install flox run: | python -m pip install --no-deps -e . @@ -85,7 +85,7 @@ jobs: init-shell: bash cache-environment: true create-args: | - python="${{ matrix.python-version }}" + python=${{ matrix.python-version }} - name: Install flox run: | python -m pip install --no-deps -e . @@ -120,7 +120,7 @@ jobs: init-shell: bash cache-environment: true create-args: | - python="3.10" + python=3.10 - name: Install xarray run: | python -m pip install --no-deps . diff --git a/.github/workflows/upstream-dev-ci.yaml b/.github/workflows/upstream-dev-ci.yaml index 8ef25e49b..81799d9c7 100644 --- a/.github/workflows/upstream-dev-ci.yaml +++ b/.github/workflows/upstream-dev-ci.yaml @@ -42,7 +42,7 @@ jobs: init-shell: bash cache-environment: true create-args: | - python="${{ matrix.python-version }}" + python=${{ matrix.python-version }} pytest-reportlog - name: Install flox run: | From d0edf93ce23fafb5ad47dd7f8f0e1414f33f0306 Mon Sep 17 00:00:00 2001 From: Justus Magin Date: Mon, 28 Aug 2023 16:18:18 +0200 Subject: [PATCH 7/8] change the yaml block used to specify multiple lines of arguments --- .github/workflows/upstream-dev-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upstream-dev-ci.yaml b/.github/workflows/upstream-dev-ci.yaml index 81799d9c7..62645707e 100644 --- a/.github/workflows/upstream-dev-ci.yaml +++ b/.github/workflows/upstream-dev-ci.yaml @@ -41,7 +41,7 @@ jobs: environment-name: flox-tests init-shell: bash cache-environment: true - create-args: | + create-args: >- python=${{ matrix.python-version }} pytest-reportlog - name: Install flox From f8ab972a53d96fe6ca5a210fe208ae4a96d7165e Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Wed, 30 Aug 2023 20:44:57 -0600 Subject: [PATCH 8/8] Update flox/core.py --- flox/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flox/core.py b/flox/core.py index 5dbba5442..f8f700f99 100644 --- a/flox/core.py +++ b/flox/core.py @@ -1622,7 +1622,7 @@ def _convert_expected_groups_to_index( out.append(ex) elif ex is not None: if isbin_: - out.append(pd.IntervalIndex.from_breaks(ex)) # type: ignore [arg-type,unused-ignore] # TODO: what do we want here? + out.append(pd.IntervalIndex.from_breaks(ex)) else: if sort: ex = np.sort(ex)