Skip to content

Commit

Permalink
Merge branch 'main' into issue4926
Browse files Browse the repository at this point in the history
  • Loading branch information
VeckoTheGecko authored Dec 25, 2024
2 parents 34c754d + 6875c64 commit 62c5853
Show file tree
Hide file tree
Showing 192 changed files with 7,192 additions and 3,479 deletions.
2 changes: 1 addition & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
- h5py
- hdf5
- iris
- lxml # Optional dep of pydap
- lxml # Optional dep of pydap
- matplotlib
- nc-time-axis
- netcdf4
Expand Down
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ coverage:
flags:
- unittests
paths:
- "!xarray/tests/"
- "!xarray/tests/"
unittests:
target: 90%
flags:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bugreport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ body:
Please confirm that the bug report is in an excellent state, so we can understand & fix it quickly & efficiently. For more details, check out:
- [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve)
- [Craft Minimal Bug Reports](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
- [Craft Minimal Bug Reports](https://matthewrocklin.com/minimal-bug-reports)
options:
- label: Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
Expand Down
2 changes: 1 addition & 1 deletion .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ newIssueWelcomeComment: >
newPRWelcomeComment: >
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our [contributing guidelines](http://docs.xarray.dev/en/stable/contributing.html).
If you have questions, some answers may be found in our [contributing guidelines](https://docs.xarray.dev/en/stable/contributing.html).
# Comment to be posted to on pull requests merged by a first time user
firstPRMergeComment: >
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates once a week
interval: 'weekly'
interval: "weekly"
groups:
actions:
patterns:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/benchmarks-last-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ jobs:
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: "1.5.10-0"
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
create-args: >-
asv
- name: 'Get Previous tag'
- name: "Get Previous tag"
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
# with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: "1.5.10-0"
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
cache-environment: true
Expand All @@ -35,8 +36,7 @@ jobs:
create-args: >-
asv
python-build
mamba
mamba<=1.5.10
- name: Run benchmarks
shell: bash -l {0}
Expand Down
39 changes: 15 additions & 24 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
environment-name: xarray-tests
create-args: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"

Expand All @@ -70,8 +69,6 @@ jobs:
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Run doctests
run: |
Expand Down Expand Up @@ -109,27 +106,24 @@ jobs:
environment-name: xarray-tests
create-args: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install "mypy==1.11.2" --force-reinstall
python -m pip install "mypy==1.13" --force-reinstall
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v4.6.0
uses: codecov/codecov-action@v5.1.2
with:
file: mypy_report/cobertura.xml
flags: mypy
Expand Down Expand Up @@ -163,27 +157,24 @@ jobs:
environment-name: xarray-tests
create-args: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install mypy
run: |
python -m pip install "mypy==1.11.2" --force-reinstall
python -m pip install "mypy==1.13" --force-reinstall
- name: Run mypy
run: |
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
- name: Upload mypy coverage to Codecov
uses: codecov/codecov-action@v4.6.0
uses: codecov/codecov-action@v5.1.2
with:
file: mypy_report/cobertura.xml
flags: mypy-min
Expand Down Expand Up @@ -222,16 +213,13 @@ jobs:
environment-name: xarray-tests
create-args: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install pyright
run: |
Expand All @@ -242,7 +230,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v4.6.0
uses: codecov/codecov-action@v5.1.2
with:
file: pyright_report/cobertura.xml
flags: pyright
Expand Down Expand Up @@ -281,16 +269,13 @@ jobs:
environment-name: xarray-tests
create-args: >-
python=${{env.PYTHON_VERSION}}
conda
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
- name: Install xarray
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Install pyright
run: |
Expand All @@ -301,7 +286,7 @@ jobs:
python -m pyright xarray/
- name: Upload pyright coverage to Codecov
uses: codecov/codecov-action@v4.6.0
uses: codecov/codecov-action@v5.1.2
with:
file: pyright_report/cobertura.xml
flags: pyright39
Expand All @@ -318,6 +303,9 @@ jobs:
run:
shell: bash -l {0}

env:
COLUMNS: 120

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -330,13 +318,16 @@ jobs:
create-args: >-
python=3.12
pyyaml
conda
python-dateutil
cytoolz
rich
rich-click
py-rattler
- name: All-deps minimum versions policy
run: |
python ci/min_deps_check.py ci/requirements/min-all-deps.yml
python ci/minimum_versions.py ci/requirements/min-all-deps.yml
- name: Bare minimum versions policy
run: |
python ci/min_deps_check.py ci/requirements/bare-minimum.yml
python ci/minimum_versions.py ci/requirements/bare-minimum.yml
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ jobs:
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
conda
# We only want to install this on one run, because otherwise we'll have
# duplicate annotations.
Expand All @@ -131,8 +130,6 @@ jobs:
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
- name: Import xarray
Expand Down Expand Up @@ -162,7 +159,9 @@ jobs:
path: pytest.xml

- name: Upload code coverage to Codecov
uses: codecov/[email protected]
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml
flags: unittests
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/hypothesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
if: |
always()
&& (
needs.detect-ci-trigger.outputs.triggered == 'false'
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
)
always()
&& (
needs.detect-ci-trigger.outputs.triggered == 'false'
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
)
defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -76,8 +76,6 @@ jobs:
python -m pip install --no-deps -e .
- name: Version info
run: |
conda info -a
conda list
python xarray/util/print_versions.py
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
Expand All @@ -94,8 +92,8 @@ jobs:
if: success()
id: status
run: |
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
--report-log output-${{ matrix.python-version }}-log.jsonl
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
--report-log output-${{ matrix.python-version }}-log.jsonl
# explicitly save the cache so it gets updated, also do this even if it fails.
- name: Save cached hypothesis directory
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- published
push:
tags:
- 'v*'
- "v*"

jobs:
build-artifacts:
Expand Down Expand Up @@ -88,12 +88,11 @@ jobs:
path: dist
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.10.3
uses: pypa/gh-action-pypi-publish@v1.12.3
with:
repository_url: https://test.pypi.org/legacy/
verbose: true


upload-to-pypi:
needs: test-built-dist
if: github.event_name == 'release'
Expand All @@ -111,6 +110,6 @@ jobs:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.10.3
uses: pypa/gh-action-pypi-publish@v1.12.3
with:
verbose: true
Loading

0 comments on commit 62c5853

Please sign in to comment.