Skip to content

Commit

Permalink
Merge branch 'main' into namedarray-parallelcompat
Browse files Browse the repository at this point in the history
* main: (153 commits)
  Add overloads to get_axis_num (pydata#8547)
  Fix CI: temporary pin pytest version to 7.4.* (pydata#8682)
  Bump the actions group with 1 update (pydata#8678)
  [namedarray] split `.set_dims()` into `.expand_dims()` and `broadcast_to()` (pydata#8380)
  Add chunk-friendly code path to `encode_cf_datetime` and `encode_cf_timedelta` (pydata#8575)
  Fix NetCDF4 C version detection (pydata#8675)
  groupby: Don't set `method` by default on flox>=0.9 (pydata#8657)
  Fix automatic broadcasting when wrapping array api class (pydata#8669)
  Fix unstack method when wrapping array api class (pydata#8668)
  Fix `variables` arg typo in `Dataset.sortby()` docstring (pydata#8670)
  dt.weekday_name - removal of function (pydata#8664)
  Add `dev` dependencies to `pyproject.toml` (pydata#8661)
  CI: Pin scientific-python/upload-nightly-action to release sha (pydata#8662)
  Update HOW_TO_RELEASE.md by clarifying where RTD build can be found (pydata#8655)
  ruff: use extend-exclude (pydata#8649)
  new whats-new section (pydata#8652)
  xfail another test on windows (pydata#8648)
  use first element of residual in _nonpolyfit_1d (pydata#8647)
  whatsnew for v2024.01.1
  implement `isnull` using `full_like` instead of `zeros_like` (pydata#7395)
  ...
  • Loading branch information
andersy005 committed Jan 30, 2024
2 parents 8a87810 + 81f38f3 commit 53906e4
Show file tree
Hide file tree
Showing 160 changed files with 8,131 additions and 4,629 deletions.
8 changes: 3 additions & 5 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ name: xarray-examples
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.10
- boto3
- bottleneck
- cartopy
- cdms2
- cfgrib
- cftime
- coveralls
Expand All @@ -25,7 +24,7 @@ dependencies:
- numpy
- packaging
- pandas
- pint
- pint>=0.22
- pip
- pooch
- pydap
Expand All @@ -38,5 +37,4 @@ dependencies:
- toolz
- xarray
- zarr
- pip:
- numbagg
- numbagg
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ updates:
schedule:
# Check for updates once a week
interval: 'weekly'
groups:
actions:
patterns:
- "*"
85 changes: 0 additions & 85 deletions .github/labeler.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/benchmarks-last-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
cp benchmarks/README_CI.md benchmarks.log .asv/results/
working-directory: ${{ env.ASV_DIR }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
benchmark:
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || contains( github.event.pull_request.labels.*.name, 'topic-performance') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
name: Linux
runs-on: ubuntu-20.04
env:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
cp benchmarks/README_CI.md benchmarks.log .asv/results/
working-directory: ${{ env.ASV_DIR }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: asv-benchmark-results-${{ runner.os }}
Expand Down
38 changes: 20 additions & 18 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI Additional
on:
push:
branches:
- "*"
- "main"
pull_request:
branches:
- "*"
- "main"
workflow_dispatch: # allows you to trigger manually

concurrency:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:

env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.11"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -76,6 +76,9 @@ jobs:
# Raise an error if there are warnings in the doctests, with `-Werror`.
# This is a trial; if it presents an problem, feel free to remove.
# See https://github.com/pydata/xarray/issues/7164 for more info.
#
# If dependencies emit warnings we can't do anything about, add ignores to
# `xarray/tests/__init__.py`.
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
mypy:
Expand All @@ -87,7 +90,7 @@ jobs:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.11"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -117,14 +120,14 @@ jobs:
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install mypy --force-reinstall
python -m pip install "mypy<1.9" --force-reinstall
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
- name: Upload mypy coverage to Codecov
uses: codecov/[email protected].4
uses: codecov/[email protected].5
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down Expand Up @@ -171,14 +174,14 @@ jobs:
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install mypy --force-reinstall
python -m pip install "mypy<1.9" --force-reinstall
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
- name: Upload mypy coverage to Codecov
uses: codecov/[email protected].4
uses: codecov/[email protected].5
with:
file: mypy_report/cobertura.xml
flags: mypy39
Expand Down Expand Up @@ -239,7 +242,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/[email protected].4
uses: codecov/[email protected].5
with:
file: pyright_report/cobertura.xml
flags: pyright
Expand Down Expand Up @@ -298,7 +301,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/[email protected].4
uses: codecov/[email protected].5
with:
file: pyright_report/cobertura.xml
flags: pyright39
Expand All @@ -317,11 +320,6 @@ jobs:
run:
shell: bash -l {0}

strategy:
matrix:
environment-file: ["bare-minimum", "min-all-deps"]
fail-fast: false

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -332,11 +330,15 @@ jobs:
with:
environment-name: xarray-tests
create-args: >-
python=3.10
python=3.11
pyyaml
conda
python-dateutil
- name: minimum versions policy
- name: All-deps minimum versions policy
run: |
python ci/min_deps_check.py ci/requirements/min-all-deps.yml
- name: Bare minimum versions policy
run: |
python ci/min_deps_check.py ci/requirements/${{ matrix.environment-file }}.yml
python ci/min_deps_check.py ci/requirements/bare-minimum.yml
34 changes: 19 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI
on:
push:
branches:
- "*"
- "main"
pull_request:
branches:
- "*"
- "main"
workflow_dispatch: # allows you to trigger manually

concurrency:
Expand Down Expand Up @@ -34,6 +34,8 @@ jobs:
runs-on: ${{ matrix.os }}
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false'
env:
ZARR_V3_EXPERIMENTAL_API: 1
defaults:
run:
shell: bash -l {0}
Expand All @@ -42,7 +44,7 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
# Bookend python versions
python-version: ["3.9", "3.11"]
python-version: ["3.9", "3.11", "3.12"]
env: [""]
include:
# Minimum python version:
Expand All @@ -67,15 +69,13 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if [[ "${{matrix.python-version}}" == "3.11" ]]; then
if [[ ${{matrix.os}} == windows* ]]; then
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-py311.yml" >> $GITHUB_ENV
if [[ ${{ matrix.os }} == windows* ]] ;
then
if [[ ${{ matrix.python-version }} != "3.12" ]]; then
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
else
echo "CONDA_ENV_FILE=ci/requirements/environment-py311.yml" >> $GITHUB_ENV
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.12.yml" >> $GITHUB_ENV
fi
elif [[ ${{ matrix.os }} == windows* ]] ;
then
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
elif [[ "${{ matrix.env }}" != "" ]] ;
then
if [[ "${{ matrix.env }}" == "flaky" ]] ;
Expand All @@ -86,7 +86,11 @@ jobs:
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
fi
else
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
if [[ ${{ matrix.python-version }} != "3.12" ]]; then
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
else
echo "CONDA_ENV_FILE=ci/requirements/environment-3.12.yml" >> $GITHUB_ENV
fi
fi
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -133,13 +137,13 @@ jobs:

- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Test results for ${{ runner.os }}-${{ matrix.python-version }}
name: Test results for ${{ runner.os }}-${{ matrix.python-version }} ${{ matrix.env }}
path: pytest.xml

- name: Upload code coverage to Codecov
uses: codecov/[email protected].4
uses: codecov/[email protected].5
with:
file: ./coverage.xml
flags: unittests
Expand All @@ -153,7 +157,7 @@ jobs:
if: github.repository == 'pydata/xarray'
steps:
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
14 changes: 0 additions & 14 deletions .github/workflows/label-all.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/label-prs.yml

This file was deleted.

Loading

0 comments on commit 53906e4

Please sign in to comment.