Skip to content
forked from pydata/xarray

Commit 511415f

Browse files
authored
Merge branch 'main' into groupby-save-codes-new
2 parents f30da34 + e7b4930 commit 511415f

21 files changed

+377
-168
lines changed

.github/workflows/pypi-release.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
7373
- name: Publish package to TestPyPI
7474
if: github.event_name == 'push'
75-
uses: pypa/gh-action-pypi-publish@v1.6.4
75+
uses: pypa/gh-action-pypi-publish@v1.7.1
7676
with:
7777
user: __token__
7878
password: ${{ secrets.TESTPYPI_TOKEN }}
@@ -90,7 +90,7 @@ jobs:
9090
name: releases
9191
path: dist
9292
- name: Publish package to PyPI
93-
uses: pypa/gh-action-pypi-publish@v1.6.4
93+
uses: pypa/gh-action-pypi-publish@v1.7.1
9494
with:
9595
user: __token__
9696
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/testpypi-release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
7979
- name: Publish package to TestPyPI
8080
if: github.event_name == 'push'
81-
uses: pypa/gh-action-pypi-publish@v1.6.4
81+
uses: pypa/gh-action-pypi-publish@v1.7.1
8282
with:
8383
user: __token__
8484
password: ${{ secrets.TESTPYPI_TOKEN }}

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
files: ^xarray/
1717
- repo: https://github.com/charliermarsh/ruff-pre-commit
1818
# Ruff version.
19-
rev: 'v0.0.253'
19+
rev: 'v0.0.254'
2020
hooks:
2121
- id: ruff
2222
args: ["--fix"]
@@ -34,7 +34,7 @@ repos:
3434
additional_dependencies: ["black==23.1.0"]
3535
- id: blackdoc-autoupdate-black
3636
- repo: https://github.com/pre-commit/mirrors-mypy
37-
rev: v1.0.1
37+
rev: v1.1.1
3838
hooks:
3939
- id: mypy
4040
# Copied from setup.cfg

asv_bench/benchmarks/groupby.py

+12-24
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ def time_agg_large_num_groups(self, method, ndim):
3434
ds = getattr(self, f"ds{ndim}d")
3535
getattr(ds.groupby("b"), method)()
3636

37-
def time_groupby_binary_op_1d(self):
38-
self.ds1d - self.ds1d_mean
37+
def time_binary_op_1d(self):
38+
self.ds1d.groupby("b") - self.ds1d_mean
3939

40-
def time_groupby_binary_op_2d(self):
41-
self.ds2d - self.ds2d_mean
40+
def time_binary_op_2d(self):
41+
self.ds2d.groupby("b") - self.ds2d_mean
4242

43-
def peakmem_groupby_binary_op_1d(self):
44-
self.ds1d - self.ds1d_mean
43+
def peakmem_binary_op_1d(self):
44+
self.ds1d.groupby("b") - self.ds1d_mean
4545

46-
def peakmem_groupby_binary_op_2d(self):
47-
self.ds2d - self.ds2d_mean
46+
def peakmem_binary_op_2d(self):
47+
self.ds2d.groupby("b") - self.ds2d_mean
4848

4949

5050
class GroupByDask(GroupBy):
@@ -71,10 +71,10 @@ def setup(self, *args, **kwargs):
7171
self.ds1d = self.ds1d.to_dataframe()
7272
self.ds1d_mean = self.ds1d.groupby("b").mean()
7373

74-
def time_groupby_binary_op_2d(self):
74+
def time_binary_op_2d(self):
7575
raise NotImplementedError
7676

77-
def peakmem_groupby_binary_op_2d(self):
77+
def peakmem_binary_op_2d(self):
7878
raise NotImplementedError
7979

8080

@@ -90,10 +90,10 @@ def setup(self, *args, **kwargs):
9090
self.ds1d = self.ds1d.chunk({"dim_0": 50}).to_dataframe()
9191
self.ds1d_mean = self.ds1d.groupby("b").mean()
9292

93-
def time_groupby_binary_op_2d(self):
93+
def time_binary_op_2d(self):
9494
raise NotImplementedError
9595

96-
def peakmem_groupby_binary_op_2d(self):
96+
def peakmem_binary_op_2d(self):
9797
raise NotImplementedError
9898

9999

@@ -123,18 +123,6 @@ def time_agg_large_num_groups(self, method, ndim):
123123
ds = getattr(self, f"ds{ndim}d")
124124
getattr(ds.resample(time="48H"), method)()
125125

126-
def time_groupby_binary_op_1d(self):
127-
self.ds1d - self.ds1d_mean
128-
129-
def time_groupby_binary_op_2d(self):
130-
self.ds2d - self.ds2d_mean
131-
132-
def peakmem_groupby_binary_op_1d(self):
133-
self.ds1d - self.ds1d_mean
134-
135-
def peakmem_groupby_binary_op_2d(self):
136-
self.ds2d - self.ds2d_mean
137-
138126

139127
class ResampleDask(Resample):
140128
def setup(self, *args, **kwargs):

ci/requirements/doc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies:
2323
- pandas>=1.4
2424
- pooch
2525
- pip
26+
- pre-commit
2627
- pyproj
2728
- rasterio>=1.1
2829
- scipy!=1.10.0

doc/_static/ci.png

-84.7 KB
Loading

doc/_static/view-docs.png

648 KB
Loading

0 commit comments

Comments
 (0)