Skip to content
forked from pydata/xarray

Commit 517f195

Browse files
committed
Merge branch 'main' into kvikio
* main: (40 commits) Faq pull request (According to pull request pydata#7604 & issue pydata#1285 (pydata#7638) add timeouts for tests (pydata#7657) Pull Request Labeler - Undo workaround sync-labels bug (pydata#7667) [pre-commit.ci] pre-commit autoupdate (pydata#7651) Allow all integer dtypes in `polyval` (pydata#7619) [skip-ci] dev whats-new (pydata#7660) Redo whats-new for 2023.03.0 (pydata#7659) Set copy=False when calling pd.Series (pydata#7642) Pin pandas < 2 (pydata#7650) Whats-new for release 2023.03.0 (pydata#7643) Bump pypa/gh-action-pypi-publish from 1.7.1 to 1.8.1 (pydata#7648) Use more descriptive link texts (pydata#7625) Fix missing 'dim' argument in _get_nan_block_lengths (pydata#7598) Fix `pcolormesh` with str coords (pydata#7612) [skip-ci] Fix groupby binary ops benchmarks (pydata#7603) Remove incomplete sentence in IO docs (pydata#7631) Allow indexing unindexed dimensions using dask arrays (pydata#5873) Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.7.1 (pydata#7618) [pre-commit.ci] pre-commit autoupdate (pydata#7620) add a test for scatter colorbar extend (pydata#7616) ...
2 parents 77f7059 + a28e9b5 commit 517f195

Some content is hidden

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

77 files changed

+1767
-495
lines changed

.github/workflows/ci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ jobs:
125125
126126
- name: Run tests
127127
run: python -m pytest -n 4
128+
--timeout 180
128129
--cov=xarray
129130
--cov-report=xml
130131
--junitxml=pytest.xml

.github/workflows/label-prs.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ jobs:
99
- uses: actions/labeler@main
1010
with:
1111
repo-token: "${{ secrets.GITHUB_TOKEN }}"
12-
# Workaround for sync-labels bug:
13-
# https://github.com/actions/labeler/issues/112
14-
sync-labels: ""
12+
sync-labels: false

.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.8.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.8.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.8.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.246'
19+
rev: 'v0.0.257'
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.0
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/install-upstream-wheels.sh

-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ python -m pip install \
4848
git+https://github.com/SciTools/nc-time-axis \
4949
git+https://github.com/xarray-contrib/flox \
5050
git+https://github.com/h5netcdf/h5netcdf
51-
python -m pip install pytest-timeout

ci/min_deps_check.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"pytest-cov",
2727
"pytest-env",
2828
"pytest-xdist",
29+
"pytest-timeout",
2930
}
3031

3132
POLICY_MONTHS = {"python": 24, "numpy": 18}

ci/requirements/all-but-dask.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies:
2626
- numbagg
2727
- numpy<1.24
2828
- packaging
29-
- pandas
29+
- pandas<2
3030
- pint
3131
- pip
3232
- pseudonetcdf
@@ -35,6 +35,7 @@ dependencies:
3535
- pytest-cov
3636
- pytest-env
3737
- pytest-xdist
38+
- pytest-timeout
3839
- rasterio
3940
- scipy
4041
- seaborn

ci/requirements/bare-minimum.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- pytest-cov
1111
- pytest-env
1212
- pytest-xdist
13+
- pytest-timeout
1314
- numpy=1.21
1415
- packaging=21.3
1516
- pandas=1.4

ci/requirements/doc.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- conda-forge
55
- nodefaults
66
dependencies:
7-
- python=3.9
7+
- python=3.10
88
- bottleneck
99
- cartopy
1010
- cfgrib>=0.9
@@ -20,21 +20,21 @@ dependencies:
2020
- numba
2121
- numpy>=1.21,<1.24
2222
- packaging>=21.3
23-
- pandas>=1.4
23+
- pandas>=1.4,<2
2424
- pooch
2525
- pip
26-
- pydata-sphinx-theme>=0.4.3
26+
- pre-commit
2727
- pyproj
2828
- rasterio>=1.1
2929
- scipy!=1.10.0
3030
- seaborn
3131
- setuptools
3232
- sparse
3333
- sphinx-autosummary-accessors
34-
- sphinx-book-theme >= 0.0.38
34+
- sphinx-book-theme >= 0.3.0
3535
- sphinx-copybutton
3636
- sphinx-design
37-
- sphinx!=4.4.0
37+
- sphinx>=5.0
3838
- zarr>=2.10
3939
- pip:
4040
- sphinxext-rediraffe

ci/requirements/environment-py311.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies:
2828
- numexpr
2929
- numpy
3030
- packaging
31-
- pandas
31+
- pandas<2
3232
- pint
3333
- pip
3434
- pooch
@@ -39,6 +39,7 @@ dependencies:
3939
- pytest-cov
4040
- pytest-env
4141
- pytest-xdist
42+
- pytest-timeout
4243
- rasterio
4344
- scipy
4445
- seaborn

ci/requirements/environment-windows-py311.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
# - numbagg
2626
- numpy
2727
- packaging
28-
- pandas
28+
- pandas<2
2929
- pint
3030
- pip
3131
- pre-commit
@@ -35,6 +35,7 @@ dependencies:
3535
- pytest-cov
3636
- pytest-env
3737
- pytest-xdist
38+
- pytest-timeout
3839
- rasterio
3940
- scipy
4041
- seaborn

ci/requirements/environment-windows.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
- numbagg
2626
- numpy<1.24
2727
- packaging
28-
- pandas
28+
- pandas<2
2929
- pint
3030
- pip
3131
- pre-commit
@@ -35,6 +35,7 @@ dependencies:
3535
- pytest-cov
3636
- pytest-env
3737
- pytest-xdist
38+
- pytest-timeout
3839
- rasterio
3940
- scipy
4041
- seaborn

ci/requirements/environment.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies:
2828
- numexpr
2929
- numpy<1.24
3030
- packaging
31-
- pandas
31+
- pandas<2
3232
- pint
3333
- pip
3434
- pooch
@@ -39,6 +39,7 @@ dependencies:
3939
- pytest-cov
4040
- pytest-env
4141
- pytest-xdist
42+
- pytest-timeout
4243
- rasterio
4344
- scipy
4445
- seaborn

ci/requirements/min-all-deps.yml

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ dependencies:
4444
- pytest-cov
4545
- pytest-env
4646
- pytest-xdist
47+
- pytest-timeout
4748
- rasterio=1.2
4849
- scipy=1.7
4950
- seaborn=0.11

doc/_static/ci.png

-84.7 KB
Loading

doc/_static/dataset-diagram-logo.pdf

13 KB
Binary file not shown.

0 commit comments

Comments
 (0)