Skip to content

Commit eb81f56

Browse files
committed
Merge branch 'main' into cupy
* main: (24 commits) Add `packaging` as dependency use engine flox for ordered groups (#266) Update pyproject.toml: py3.12 Bump numpy to >=1.22 (#278) Cleanups (#276) benchmarks updates (#273) repo-review comments (#270) Significantly faster cohorts detection. (#272) Add engine="numbagg" (#72) Support quantile, median, mode with method="blockwise". (#269) Add multidimensional binning demo (#203) [pre-commit.ci] pre-commit autoupdate (#268) Drop python 3.8, test python 3.11 (#209) tests: move xfail out of functions (#265) Bump actions/checkout from 3 to 4 (#267) convert datetime: micro-optimizations (#261) compatibility with `numpy>=2.0` (#257) replace the deprecated `provision-with-micromamba` with `setup-micromamba` (#258) Fix some typing errors in asv_bench and tests (#253) [pre-commit.ci] pre-commit autoupdate (#250) ...
2 parents 796dcd2 + c15572e commit eb81f56

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+16532
-795
lines changed

.github/workflows/benchmarks.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
benchmark:
1010
# if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} # Run if the PR has been labelled correctly.
11-
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} # Always run.
11+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} # Always run.
1212
name: Linux
1313
runs-on: ubuntu-20.04
1414
env:
@@ -17,24 +17,20 @@ jobs:
1717
steps:
1818
# We need the full repo to avoid this issue
1919
# https://github.com/actions/checkout/issues/23
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323

2424
- name: Set up conda environment
25-
uses: mamba-org/provision-with-micromamba@v15
25+
uses: mamba-org/setup-micromamba@v1
2626
with:
27-
environment-file: ci/environment.yml
28-
environment-name: flox-tests
29-
cache-env: true
30-
# extra-specs: |
31-
# python="${{ matrix.python-version }}"
32-
33-
# - name: Setup some dependencies
34-
# shell: bash -l {0}
35-
# run: |
36-
# pip install asv
37-
# sudo apt-get update -y
27+
environment-name: flox-bench
28+
create-args: >-
29+
python=3.10
30+
asv
31+
mamba
32+
init-shell: bash
33+
cache-environment: true
3834

3935
- name: Run benchmarks
4036
shell: bash -l {0}
@@ -46,14 +42,11 @@ jobs:
4642
ASV_FACTOR: 1.5
4743
ASV_SKIP_SLOW: 1
4844
run: |
49-
set -x
45+
# set -x
5046
# ID this runner
5147
asv machine --yes
5248
echo "Baseline: ${{ github.event.pull_request.base.sha }} (${{ github.event.pull_request.base.label }})"
5349
echo "Contender: ${GITHUB_SHA} (${{ github.event.pull_request.head.label }})"
54-
# Use mamba for env creation
55-
# export CONDA_EXE=$(which mamba)
56-
export CONDA_EXE=$(which conda)
5750
# Run benchmarks for current commit against base
5851
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
5952
asv continuous $ASV_OPTIONS ${{ github.event.pull_request.base.sha }} ${GITHUB_SHA} \

.github/workflows/ci-additional.yaml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
outputs:
2323
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 2
2828
- uses: xarray-contrib/[email protected]
@@ -41,10 +41,10 @@ jobs:
4141

4242
env:
4343
CONDA_ENV_FILE: ci/environment.yml
44-
PYTHON_VERSION: "3.10"
44+
PYTHON_VERSION: "3.11"
4545

4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4848
with:
4949
fetch-depth: 0 # Fetch all history for all branches and tags.
5050

@@ -53,14 +53,15 @@ jobs:
5353
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
5454
5555
- name: Setup micromamba
56-
uses: mamba-org/provision-with-micromamba@v15
56+
uses: mamba-org/setup-micromamba@v1
5757
with:
5858
environment-file: ${{env.CONDA_ENV_FILE}}
5959
environment-name: flox-tests
60-
extra-specs: |
61-
python=${{env.PYTHON_VERSION}}
62-
cache-env: true
60+
init-shell: bash
61+
cache-environment: true
6362
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
63+
create-args: |
64+
python=${{ env.PYTHON_VERSION }}
6465
6566
- name: Install flox
6667
run: |
@@ -71,9 +72,12 @@ jobs:
7172
conda list
7273
- name: Run doctests
7374
run: |
74-
python -m pytest --doctest-modules flox --ignore flox/tests --cov=./ --cov-report=xml
75+
python -m pytest --doctest-modules \
76+
flox/aggregations.py flox/core.py flox/xarray.py \
77+
--ignore flox/tests \
78+
--cov=./ --cov-report=xml
7579
- name: Upload code coverage to Codecov
76-
uses: codecov/[email protected].3
80+
uses: codecov/[email protected].4
7781
with:
7882
file: ./coverage.xml
7983
flags: unittests
@@ -91,25 +95,26 @@ jobs:
9195
shell: bash -l {0}
9296
env:
9397
CONDA_ENV_FILE: ci/environment.yml
94-
PYTHON_VERSION: "3.10"
98+
PYTHON_VERSION: "3.11"
9599

96100
steps:
97-
- uses: actions/checkout@v3
101+
- uses: actions/checkout@v4
98102
with:
99103
fetch-depth: 0 # Fetch all history for all branches and tags.
100104

101105
- name: set environment variables
102106
run: |
103107
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
104108
- name: Setup micromamba
105-
uses: mamba-org/provision-with-micromamba@v15
109+
uses: mamba-org/setup-micromamba@v1
106110
with:
107111
environment-file: ${{env.CONDA_ENV_FILE}}
108112
environment-name: flox-tests
109-
extra-specs: |
110-
python=${{env.PYTHON_VERSION}}
111-
cache-env: true
113+
init-shell: bash
114+
cache-environment: true
112115
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
116+
create-args: |
117+
python=${{ env.PYTHON_VERSION }}
113118
- name: Install flox
114119
run: |
115120
python -m pip install --no-deps -e .
@@ -126,7 +131,7 @@ jobs:
126131
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
127132
128133
- name: Upload mypy coverage to Codecov
129-
uses: codecov/[email protected].3
134+
uses: codecov/[email protected].4
130135
with:
131136
file: mypy_report/cobertura.xml
132137
flags: mypy

.github/workflows/ci.yaml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,31 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: ["ubuntu-latest", "windows-latest"]
28-
python-version: ["3.8", "3.10"]
28+
python-version: ["3.9", "3.11"]
2929
steps:
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0 # Fetch all history for all branches and tags.
3333
- name: Set environment variables
3434
run: |
3535
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
3636
- name: Set up conda environment
37-
uses: mamba-org/provision-with-micromamba@v15
37+
uses: mamba-org/setup-micromamba@v1
3838
with:
3939
environment-file: ci/environment.yml
4040
environment-name: flox-tests
41-
cache-env: true
42-
extra-specs: |
43-
python="${{ matrix.python-version }}"
41+
init-shell: bash
42+
cache-environment: true
43+
create-args: |
44+
python=${{ matrix.python-version }}
4445
- name: Install flox
4546
run: |
4647
python -m pip install --no-deps -e .
4748
- name: Run Tests
4849
run: |
4950
pytest -n auto --cov=./ --cov-report=xml
5051
- name: Upload code coverage to Codecov
51-
uses: codecov/[email protected].3
52+
uses: codecov/[email protected].4
5253
with:
5354
file: ./coverage.xml
5455
flags: unittests
@@ -58,40 +59,41 @@ jobs:
5859

5960
optional-deps:
6061
name: ${{ matrix.env }}
61-
runs-on: ${{ matrix.os }}
62+
runs-on: "ubuntu-latest"
6263
defaults:
6364
run:
6465
shell: bash -l {0}
6566
strategy:
6667
fail-fast: false
6768
matrix:
68-
os: ["ubuntu-latest"]
69-
env:
70-
[
71-
"no-xarray",
72-
"no-dask",
73-
"minimal-requirements",
74-
]
69+
python-version: ["3.11"]
70+
env: ["no-xarray", "no-dask"]
71+
include:
72+
- env: "no-numba"
73+
python-version: "3.12"
74+
- env: "minimal-requirements"
75+
python-version: "3.9"
7576
steps:
76-
- uses: actions/checkout@v3
77+
- uses: actions/checkout@v4
7778
with:
7879
fetch-depth: 0 # Fetch all history for all branches and tags.
7980
- name: Set up conda environment
80-
uses: mamba-org/provision-with-micromamba@v15
81+
uses: mamba-org/setup-micromamba@v1
8182
with:
8283
environment-file: ci/${{ matrix.env }}.yml
8384
environment-name: flox-tests
84-
cache-env: true
85-
extra-specs: |
86-
python="${{ matrix.python-version }}"
85+
init-shell: bash
86+
cache-environment: true
87+
create-args: |
88+
python=${{ matrix.python-version }}
8789
- name: Install flox
8890
run: |
8991
python -m pip install --no-deps -e .
9092
- name: Run tests
9193
run: |
9294
python -m pytest -n auto --cov=./ --cov-report=xml
9395
- name: Upload code coverage to Codecov
94-
uses: codecov/[email protected].3
96+
uses: codecov/[email protected].4
9597
with:
9698
file: ./coverage.xml
9799
flags: unittests
@@ -106,18 +108,19 @@ jobs:
106108
run:
107109
shell: bash -l {0}
108110
steps:
109-
- uses: actions/checkout@v3
111+
- uses: actions/checkout@v4
110112
with:
111-
repository: 'pydata/xarray'
113+
repository: "pydata/xarray"
112114
fetch-depth: 0 # Fetch all history for all branches and tags.
113115
- name: Set up conda environment
114-
uses: mamba-org/provision-with-micromamba@v15
116+
uses: mamba-org/setup-micromamba@v1
115117
with:
116118
environment-file: ci/requirements/environment.yml
117119
environment-name: xarray-tests
118-
cache-env: true
119-
extra-specs: |
120-
python="3.10"
120+
init-shell: bash
121+
cache-environment: true
122+
create-args: |
123+
python=3.10
121124
- name: Install xarray
122125
run: |
123126
python -m pip install --no-deps .

.github/workflows/pypi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
- name: Set up Python
1313
uses: actions/setup-python@v4
1414
with:
15-
python-version: '3.x'
15+
python-version: "3.x"
1616
- name: Install dependencies
1717
run: |
1818
python -m pip install --upgrade pip

.github/workflows/testpypi-release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
if: ${{ contains( github.event.pull_request.labels.*.name, 'test-build') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323

2424
- uses: actions/setup-python@v4
2525
name: Install Python
2626
with:
27-
python-version: "3.10"
27+
python-version: "3.11"
2828

2929
- name: Install dependencies
3030
run: |
@@ -65,7 +65,7 @@ jobs:
6565
- uses: actions/setup-python@v4
6666
name: Install Python
6767
with:
68-
python-version: "3.10"
68+
python-version: "3.11"
6969
- uses: actions/download-artifact@v3
7070
with:
7171
name: releases

.github/workflows/upstream-dev-ci.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,30 @@ jobs:
1919
upstream-dev:
2020
name: upstream-dev
2121
runs-on: ubuntu-latest
22-
if: ${{ contains( github.event.pull_request.labels.*.name, 'test-upstream') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
22+
if: ${{ (contains(github.event.pull_request.labels.*.name, 'test-upstream') && github.event_name == 'pull_request') || github.event_name == 'workflow_dispatch' }}
2323
defaults:
2424
run:
2525
shell: bash -l {0}
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
python-version: ["3.10"]
29+
python-version: ["3.11"]
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
with:
3333
fetch-depth: 0 # Fetch all history for all branches and tags.
3434
- name: Set environment variables
3535
run: |
3636
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
3737
- name: Set up conda environment
38-
uses: mamba-org/provision-with-micromamba@v15
38+
uses: mamba-org/setup-micromamba@v1
3939
with:
4040
environment-file: ci/upstream-dev-env.yml
4141
environment-name: flox-tests
42-
extra-specs: |
43-
python="${{ matrix.python-version }}"
42+
init-shell: bash
43+
cache-environment: true
44+
create-args: >-
45+
python=${{ matrix.python-version }}
4446
pytest-reportlog
4547
- name: Install flox
4648
run: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
asv_bench/pkgs/
12
docs/source/generated/
23
html/
34
.asv/
5+
asv_bench/pkgs/
46

57
# Byte-compiled / optimized / DLL files
68
__pycache__/

0 commit comments

Comments
 (0)