Skip to content

Commit

Permalink
Merge branch 'main' into dtree-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaS11 authored Oct 17, 2024
2 parents 716871a + b9780e7 commit dbf1791
Show file tree
Hide file tree
Showing 227 changed files with 10,665 additions and 7,171 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: numfocus
custom: http://numfocus.org/donate-to-xarray
custom: https://numfocus.org/donate-to-xarray
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks-last-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 0

- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
types: [opened, reopened, synchronize, labeled]
workflow_dispatch:

env:
PR_HEAD_LABEL: ${{ github.event.pull_request.head.label }}

jobs:
benchmark:
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
Expand All @@ -22,7 +25,7 @@ jobs:
fetch-depth: 0

- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
Expand All @@ -31,7 +34,7 @@ jobs:
# add "build" because of https://github.com/airspeed-velocity/asv/issues/1385
create-args: >-
asv
build
python-build
mamba
Expand All @@ -49,7 +52,7 @@ jobs:
# ID this runner
asv machine --yes
echo "Baseline: ${{ github.event.pull_request.base.sha }} (${{ github.event.pull_request.base.label }})"
echo "Contender: ${GITHUB_SHA} (${{ github.event.pull_request.head.label }})"
echo "Contender: ${GITHUB_SHA} ($PR_HEAD_LABEL)"
# Run benchmarks for current commit against base
ASV_OPTIONS="--split --show-stderr --factor $ASV_FACTOR"
asv continuous $ASV_OPTIONS ${{ github.event.pull_request.base.sha }} ${GITHUB_SHA} \
Expand Down
63 changes: 29 additions & 34 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
Expand All @@ -81,8 +81,7 @@ jobs:
#
# 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
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
mypy:
name: Mypy
Expand All @@ -104,7 +103,7 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
Expand All @@ -123,31 +122,31 @@ jobs:
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install "mypy<1.9" --force-reinstall
python -m pip install "mypy==1.11.2" --force-reinstall
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
file: mypy_report/cobertura.xml
flags: mypy
env_vars: PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false

mypy39:
name: Mypy 3.9
mypy-min:
name: Mypy 3.10
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
defaults:
run:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.10"

steps:
- uses: actions/checkout@v4
Expand All @@ -158,7 +157,7 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
Expand All @@ -177,32 +176,30 @@ jobs:
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install "mypy<1.9" --force-reinstall
python -m pip install "mypy==1.11.2" --force-reinstall
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
file: mypy_report/cobertura.xml
flags: mypy39
flags: mypy-min
env_vars: PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false



pyright:
name: Pyright
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
if: |
always()
&& (
contains( github.event.pull_request.labels.*.name, 'run-pyright')
)
always()
&& (
contains( github.event.pull_request.labels.*.name, 'run-pyright')
)
defaults:
run:
shell: bash -l {0}
Expand All @@ -219,7 +216,7 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
Expand All @@ -245,7 +242,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
file: pyright_report/cobertura.xml
flags: pyright
Expand All @@ -254,20 +251,20 @@ jobs:
fail_ci_if_error: false

pyright39:
name: Pyright 3.9
name: Pyright 3.10
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
if: |
always()
&& (
contains( github.event.pull_request.labels.*.name, 'run-pyright')
)
always()
&& (
contains( github.event.pull_request.labels.*.name, 'run-pyright')
)
defaults:
run:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/requirements/environment.yml
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.10"

steps:
- uses: actions/checkout@v4
Expand All @@ -278,7 +275,7 @@ jobs:
run: |
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
Expand All @@ -304,16 +301,14 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
file: pyright_report/cobertura.xml
flags: pyright39
env_vars: PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false



min-version-policy:
name: Minimum Version Policy
runs-on: "ubuntu-latest"
Expand All @@ -329,7 +324,7 @@ jobs:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-name: xarray-tests
create-args: >-
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,20 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
# Bookend python versions
python-version: ["3.9", "3.12"]
python-version: ["3.10", "3.12"]
env: [""]
include:
# Minimum python version:
- env: "bare-minimum"
python-version: "3.9"
python-version: "3.10"
os: ubuntu-latest
- env: "min-all-deps"
python-version: "3.9"
python-version: "3.10"
os: ubuntu-latest
# Latest python version:
- env: "all-but-numba"
python-version: "3.12"
os: ubuntu-latest
- env: "all-but-dask"
# Not 3.12 because of pint
python-version: "3.11"
Expand Down Expand Up @@ -105,7 +108,7 @@ jobs:
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{ env.CONDA_ENV_FILE }}
environment-name: xarray-tests
Expand Down Expand Up @@ -159,7 +162,7 @@ jobs:
path: pytest.xml

- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
file: ./coverage.xml
flags: unittests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hypothesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
if: |
github.repository == 'pydata/xarray'
&& (github.event_name == 'push' || github.event_name == 'pull_request')
&& (github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule')
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ci/requirements/environment.yml
environment-name: xarray-tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install dependencies
run: |
Expand All @@ -38,7 +38,7 @@ jobs:
fi
- name: Upload wheel
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # 0.5.0
uses: scientific-python/upload-nightly-action@82396a2ed4269ba06c6b2988bb4fd568ef3c3d6b # 0.6.1
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.9.0
uses: pypa/gh-action-pypi-publish@v1.10.3
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.9.0
uses: pypa/gh-action-pypi-publish@v1.10.3
with:
verbose: true
6 changes: 3 additions & 3 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ci/requirements/environment.yml
environment-name: xarray-tests
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ci/requirements/environment.yml
environment-name: xarray-tests
Expand All @@ -146,7 +146,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@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down
Loading

0 comments on commit dbf1791

Please sign in to comment.