Skip to content

Commit

Permalink
Merge branch 'main' into opt-out-auto-create-index-variables
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed Mar 15, 2024
2 parents a3116f7 + fbcac76 commit 0f70805
Show file tree
Hide file tree
Showing 151 changed files with 5,825 additions and 4,296 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v3.1.5
uses: codecov/codecov-action@v4.1.0
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v3.1.5
uses: codecov/codecov-action@v4.1.0
with:
file: mypy_report/cobertura.xml
flags: mypy39
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v3.1.5
uses: codecov/codecov-action@v4.1.0
with:
file: pyright_report/cobertura.xml
flags: pyright
Expand Down Expand Up @@ -302,7 +302,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v3.1.5
uses: codecov/codecov-action@v4.1.0
with:
file: pyright_report/cobertura.xml
flags: pyright39
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
path: pytest.xml

- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3.1.5
uses: codecov/codecov-action@v4.1.0
with:
file: ./coverage.xml
flags: unittests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fi
- name: Upload wheel
uses: scientific-python/upload-nightly-action@6e9304f7a3a5501c6f98351537493ec898728299 # 0.3.0
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # 0.5.0
with:
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_NIGHTLY }}
artifacts_path: dist
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
path: dist
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.8.11
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
repository_url: https://test.pypi.org/legacy/
verbose: true
Expand All @@ -111,6 +111,6 @@ jobs:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.11
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
verbose: true
4 changes: 2 additions & 2 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v3.1.5
uses: codecov/codecov-action@v4.1.0
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ repos:
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.1.9'
rev: 'v0.2.0'
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
# https://github.com/python/black#version-control-integration
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black-jupyter
- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
- id: blackdoc
exclude: "generate_aggregations.py"
additional_dependencies: ["black==23.12.1"]
additional_dependencies: ["black==24.1.1"]
- id: blackdoc-autoupdate-black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
Expand Down
22 changes: 17 additions & 5 deletions ci/install-upstream-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# install cython for building cftime without build isolation
micromamba install "cython>=0.29.20" py-cpuinfo
# temporarily (?) remove numbagg and numba
micromamba remove -y numba numbagg
micromamba remove -y numba numbagg sparse
# temporarily remove numexpr
micromamba remove -y numexpr
# temporarily remove backends
micromamba remove -y cf_units h5py hdf5 netcdf4
micromamba remove -y cf_units hdf5 h5py netcdf4
# forcibly remove packages to avoid artifacts
conda uninstall -y --force \
micromamba remove -y --force \
numpy \
scipy \
pandas \
Expand All @@ -30,8 +32,17 @@ python -m pip install \
scipy \
matplotlib \
pandas
# for some reason pandas depends on pyarrow already.
# Remove once a `pyarrow` version compiled with `numpy>=2.0` is on `conda-forge`
python -m pip install \
-i https://pypi.fury.io/arrow-nightlies/ \
--prefer-binary \
--no-deps \
--pre \
--upgrade \
pyarrow
# without build isolation for packages compiling against numpy
# TODO: remove once there are `numpy>=2.0` builds for numcodecs and cftime
# TODO: remove once there are `numpy>=2.0` builds for these
python -m pip install \
--no-deps \
--upgrade \
Expand All @@ -51,13 +62,14 @@ python -m pip install \
--no-deps \
--upgrade \
git+https://github.com/dask/dask \
git+https://github.com/dask/dask-expr \
git+https://github.com/dask/distributed \
git+https://github.com/zarr-developers/zarr \
git+https://github.com/pypa/packaging \
git+https://github.com/hgrecco/pint \
git+https://github.com/pydata/sparse \
git+https://github.com/intake/filesystem_spec \
git+https://github.com/SciTools/nc-time-axis \
git+https://github.com/xarray-contrib/flox \
git+https://github.com/dgasmith/opt_einsum
# git+https://github.com/pydata/sparse
# git+https://github.com/h5netcdf/h5netcdf
1 change: 1 addition & 0 deletions ci/requirements/all-but-dask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ channels:
dependencies:
- black
- aiobotocore
- array-api-strict
- boto3
- bottleneck
- cartopy
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
- cartopy
- cfgrib
- dask-core>=2022.1
- dask-expr
- hypothesis>=6.75.8
- h5netcdf>=0.13
- ipykernel
Expand Down
6 changes: 4 additions & 2 deletions ci/requirements/environment-3.12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ channels:
- nodefaults
dependencies:
- aiobotocore
- array-api-strict
- boto3
- bottleneck
- cartopy
- cftime
- dask-core
- dask-expr
- distributed
- flox
- fsspec!=2021.7.0
- fsspec
- h5netcdf
- h5py
- hdf5
- hypothesis
- iris
- lxml # Optional dep of pydap
- lxml # Optional dep of pydap
- matplotlib-base
- nc-time-axis
- netcdf4
Expand Down
6 changes: 4 additions & 2 deletions ci/requirements/environment-windows-3.12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ name: xarray-tests
channels:
- conda-forge
dependencies:
- array-api-strict
- boto3
- bottleneck
- cartopy
- cftime
- dask-core
- dask-expr
- distributed
- flox
- fsspec!=2021.7.0
- fsspec
- h5netcdf
- h5py
- hdf5
- hypothesis
- iris
- lxml # Optional dep of pydap
- lxml # Optional dep of pydap
- matplotlib-base
- nc-time-axis
- netcdf4
Expand Down
6 changes: 4 additions & 2 deletions ci/requirements/environment-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ name: xarray-tests
channels:
- conda-forge
dependencies:
- array-api-strict
- boto3
- bottleneck
- cartopy
- cftime
- dask-core
- dask-expr
- distributed
- flox
- fsspec!=2021.7.0
- fsspec
- h5netcdf
- h5py
- hdf5
- hypothesis
- iris
- lxml # Optional dep of pydap
- lxml # Optional dep of pydap
- matplotlib-base
- nc-time-axis
- netcdf4
Expand Down
6 changes: 4 additions & 2 deletions ci/requirements/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ channels:
- nodefaults
dependencies:
- aiobotocore
- array-api-strict
- boto3
- bottleneck
- cartopy
- cftime
- dask-core
- dask-expr # dask raises a deprecation warning without this, breaking doctests
- distributed
- flox
- fsspec!=2021.7.0
- fsspec
- h5netcdf
- h5py
- hdf5
Expand All @@ -32,7 +34,7 @@ dependencies:
- pip
- pooch
- pre-commit
- pyarrow # pandas makes a deprecation warning without this, breaking doctests
- pyarrow # pandas raises a deprecation warning without this, breaking doctests
- pydap
- pytest
- pytest-cov
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 @@ -8,6 +8,7 @@ dependencies:
# When upgrading python, numpy, or pandas, must also change
# doc/user-guide/installing.rst, doc/user-guide/plotting.rst and setup.py.
- python=3.9
- array-api-strict=1.0 # dependency for testing the array api compat
- boto3=1.24
- bottleneck=1.3
- cartopy=0.21
Expand Down
8 changes: 8 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ def add_standard_imports(doctest_namespace, tmpdir):

# always switch to the temporary directory, so files get written there
tmpdir.chdir()

# Avoid the dask deprecation warning, can remove if CI passes without this.
try:
import dask
except ImportError:
pass
else:
dask.config.set({"dataframe.query-planning": True})
Loading

0 comments on commit 0f70805

Please sign in to comment.