Skip to content
forked from pydata/xarray

Commit

Permalink
Merge branch 'main' into kvikio
Browse files Browse the repository at this point in the history
* 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)
  ...
  • Loading branch information
dcherian committed Mar 26, 2023
2 parents 77f7059 + a28e9b5 commit 517f195
Show file tree
Hide file tree
Showing 77 changed files with 1,767 additions and 495 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
- name: Run tests
run: python -m pytest -n 4
--timeout 180
--cov=xarray
--cov-report=xml
--junitxml=pytest.xml
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/label-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ jobs:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# Workaround for sync-labels bug:
# https://github.com/actions/labeler/issues/112
sync-labels: ""
sync-labels: false
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.6.4
uses: pypa/gh-action-pypi-publish@v1.8.1
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
Expand All @@ -90,7 +90,7 @@ jobs:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.6.4
uses: pypa/gh-action-pypi-publish@v1.8.1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testpypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.6.4
uses: pypa/gh-action-pypi-publish@v1.8.1
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
files: ^xarray/
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.246'
rev: 'v0.0.257'
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -34,7 +34,7 @@ repos:
additional_dependencies: ["black==23.1.0"]
- id: blackdoc-autoupdate-black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.0
rev: v1.1.1
hooks:
- id: mypy
# Copied from setup.cfg
Expand Down
36 changes: 12 additions & 24 deletions asv_bench/benchmarks/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ def time_agg_large_num_groups(self, method, ndim):
ds = getattr(self, f"ds{ndim}d")
getattr(ds.groupby("b"), method)()

def time_groupby_binary_op_1d(self):
self.ds1d - self.ds1d_mean
def time_binary_op_1d(self):
self.ds1d.groupby("b") - self.ds1d_mean

def time_groupby_binary_op_2d(self):
self.ds2d - self.ds2d_mean
def time_binary_op_2d(self):
self.ds2d.groupby("b") - self.ds2d_mean

def peakmem_groupby_binary_op_1d(self):
self.ds1d - self.ds1d_mean
def peakmem_binary_op_1d(self):
self.ds1d.groupby("b") - self.ds1d_mean

def peakmem_groupby_binary_op_2d(self):
self.ds2d - self.ds2d_mean
def peakmem_binary_op_2d(self):
self.ds2d.groupby("b") - self.ds2d_mean


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

def time_groupby_binary_op_2d(self):
def time_binary_op_2d(self):
raise NotImplementedError

def peakmem_groupby_binary_op_2d(self):
def peakmem_binary_op_2d(self):
raise NotImplementedError


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

def time_groupby_binary_op_2d(self):
def time_binary_op_2d(self):
raise NotImplementedError

def peakmem_groupby_binary_op_2d(self):
def peakmem_binary_op_2d(self):
raise NotImplementedError


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

def time_groupby_binary_op_1d(self):
self.ds1d - self.ds1d_mean

def time_groupby_binary_op_2d(self):
self.ds2d - self.ds2d_mean

def peakmem_groupby_binary_op_1d(self):
self.ds1d - self.ds1d_mean

def peakmem_groupby_binary_op_2d(self):
self.ds2d - self.ds2d_mean


class ResampleDask(Resample):
def setup(self, *args, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion ci/install-upstream-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ python -m pip install \
git+https://github.com/SciTools/nc-time-axis \
git+https://github.com/xarray-contrib/flox \
git+https://github.com/h5netcdf/h5netcdf
python -m pip install pytest-timeout
1 change: 1 addition & 0 deletions ci/min_deps_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"pytest-cov",
"pytest-env",
"pytest-xdist",
"pytest-timeout",
}

POLICY_MONTHS = {"python": 24, "numpy": 18}
Expand Down
3 changes: 2 additions & 1 deletion ci/requirements/all-but-dask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
- numbagg
- numpy<1.24
- packaging
- pandas
- pandas<2
- pint
- pip
- pseudonetcdf
Expand All @@ -35,6 +35,7 @@ dependencies:
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- rasterio
- scipy
- seaborn
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/bare-minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- numpy=1.21
- packaging=21.3
- pandas=1.4
10 changes: 5 additions & 5 deletions ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.9
- python=3.10
- bottleneck
- cartopy
- cfgrib>=0.9
Expand All @@ -20,21 +20,21 @@ dependencies:
- numba
- numpy>=1.21,<1.24
- packaging>=21.3
- pandas>=1.4
- pandas>=1.4,<2
- pooch
- pip
- pydata-sphinx-theme>=0.4.3
- pre-commit
- pyproj
- rasterio>=1.1
- scipy!=1.10.0
- seaborn
- setuptools
- sparse
- sphinx-autosummary-accessors
- sphinx-book-theme >= 0.0.38
- sphinx-book-theme >= 0.3.0
- sphinx-copybutton
- sphinx-design
- sphinx!=4.4.0
- sphinx>=5.0
- zarr>=2.10
- pip:
- sphinxext-rediraffe
Expand Down
3 changes: 2 additions & 1 deletion ci/requirements/environment-py311.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
- numexpr
- numpy
- packaging
- pandas
- pandas<2
- pint
- pip
- pooch
Expand All @@ -39,6 +39,7 @@ dependencies:
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- rasterio
- scipy
- seaborn
Expand Down
3 changes: 2 additions & 1 deletion ci/requirements/environment-windows-py311.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:
# - numbagg
- numpy
- packaging
- pandas
- pandas<2
- pint
- pip
- pre-commit
Expand All @@ -35,6 +35,7 @@ dependencies:
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- rasterio
- scipy
- seaborn
Expand Down
3 changes: 2 additions & 1 deletion ci/requirements/environment-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:
- numbagg
- numpy<1.24
- packaging
- pandas
- pandas<2
- pint
- pip
- pre-commit
Expand All @@ -35,6 +35,7 @@ dependencies:
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- rasterio
- scipy
- seaborn
Expand Down
3 changes: 2 additions & 1 deletion ci/requirements/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
- numexpr
- numpy<1.24
- packaging
- pandas
- pandas<2
- pint
- pip
- pooch
Expand All @@ -39,6 +39,7 @@ dependencies:
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- rasterio
- scipy
- seaborn
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/min-all-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies:
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- rasterio=1.2
- scipy=1.7
- seaborn=0.11
Expand Down
Binary file modified doc/_static/ci.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/dataset-diagram-logo.pdf
Binary file not shown.
Loading

0 comments on commit 517f195

Please sign in to comment.