Skip to content

Commit

Permalink
Merge branch 'main' into backend-set-indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas authored Feb 3, 2024
2 parents f77aac7 + c9ba2be commit eae983b
Show file tree
Hide file tree
Showing 211 changed files with 17,608 additions and 4,457 deletions.
4 changes: 1 addition & 3 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies:
- boto3
- bottleneck
- cartopy
- cdms2
- cfgrib
- cftime
- coveralls
Expand Down Expand Up @@ -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
41 changes: 22 additions & 19 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,7 +76,11 @@ 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.
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
#
# If dependencies emit warnings we can't do anything about, add ignores to
# `xarray/tests/__init__.py`.
# [MHS, 01/25/2024] Skip datatree_ documentation remove after #8572
python -m pytest --doctest-modules xarray --ignore xarray/tests --ignore xarray/datatree_ -Werror
mypy:
name: Mypy
Expand All @@ -87,7 +91,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 +121,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/codecov-action@v3.1.4
uses: codecov/codecov-action@v3.1.5
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down Expand Up @@ -171,14 +175,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/codecov-action@v3.1.4
uses: codecov/codecov-action@v3.1.5
with:
file: mypy_report/cobertura.xml
flags: mypy39
Expand Down Expand Up @@ -239,7 +243,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v3.1.5
with:
file: pyright_report/cobertura.xml
flags: pyright
Expand Down Expand Up @@ -298,7 +302,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v3.1.5
with:
file: pyright_report/cobertura.xml
flags: pyright39
Expand All @@ -317,11 +321,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 +331,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/codecov-action@v3.1.4
uses: codecov/codecov-action@v3.1.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.

4 changes: 2 additions & 2 deletions .github/workflows/nightly-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"

Expand All @@ -38,7 +38,7 @@ jobs:
fi
- name: Upload wheel
uses: scientific-python/upload-nightly-action@main
uses: scientific-python/upload-nightly-action@6e9304f7a3a5501c6f98351537493ec898728299 # 0.3.0
with:
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_NIGHTLY }}
artifacts_path: dist
Loading

0 comments on commit eae983b

Please sign in to comment.