Skip to content

Commit 97fa188

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fix/dask_indexing
* upstream/main: (291 commits) Update error message when saving multiindex (pydata#7475) DOC: cross ref the groupby tutorial (pydata#7555) [pre-commit.ci] pre-commit autoupdate (pydata#7543) supress namespace_package deprecation warning (doctests) (pydata#7548) [skip-ci] Add PDF of Xarray logo (pydata#7530) Support complex arrays in xr.corr (pydata#7392) clarification for thresh arg of dataset.dropna() (pydata#7481) [pre-commit.ci] pre-commit autoupdate (pydata#7524) Require to explicitly defining optional dimensions such as hue and markersize (pydata#7277) Use plt.rc_context for default styles (pydata#7318) Update HOW_TO_RELEASE.md (pydata#7512) Update whats-new for dev (pydata#7511) Fix whats-new for 2023.02.0 (pydata#7506) Update apply_ufunc output_sizes error message (pydata#7509) Zarr: drop "source" and "original_shape" from encoding (pydata#7500) [pre-commit.ci] pre-commit autoupdate (pydata#7507) Whats-new for 2023.03.0 Add `inclusive` argument to `cftime_range` and `date_range` and deprecate `closed` argument (pydata#7373) Make text match code example (pydata#7499) Remove Dask single-threaded setting in tests (pydata#7489) ...
2 parents c93b297 + 4194920 commit 97fa188

File tree

196 files changed

+22474
-9285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+22474
-9285
lines changed

.coveragerc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.git_archival.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
14
ref-names: $Format:%D$

.github/labeler.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Automation:
2+
- .github/*
3+
- .github/**/*
4+
5+
CI:
6+
- ci/*
7+
- ci/**/*
8+
9+
dependencies:
10+
- requirements.txt
11+
- ci/requirements/*
12+
13+
topic-arrays:
14+
- xarray/core/duck_array_ops.py
15+
16+
topic-backends:
17+
- xarray/backends/*
18+
- xarray/backends/**/*
19+
20+
topic-cftime:
21+
- xarray/coding/*time*
22+
23+
topic-CF conventions:
24+
- xarray/conventions.py
25+
26+
topic-combine:
27+
- xarray/core/combine.py
28+
29+
topic-dask:
30+
- xarray/core/dask*
31+
- xarray/core/parallel.py
32+
33+
topic-DataTree:
34+
- xarray/core/datatree*
35+
36+
# topic-documentation:
37+
# - ['doc/*', '!doc/whats-new.rst']
38+
# - doc/**/*
39+
40+
topic-faq:
41+
- doc/howdoi.rst
42+
43+
topic-groupby:
44+
- xarray/core/groupby.py
45+
46+
topic-html-repr:
47+
- xarray/core/formatting_html.py
48+
49+
topic-hypothesis:
50+
- xarray/properties/*
51+
- xarray/testing/strategies/*
52+
53+
topic-indexing:
54+
- xarray/core/indexes.py
55+
- xarray/core/indexing.py
56+
57+
topic-performance:
58+
- asv_bench/benchmarks/*
59+
- asv_bench/benchmarks/**/*
60+
61+
topic-plotting:
62+
- xarray/plot/*
63+
- xarray/plot/**/*
64+
65+
topic-rolling:
66+
- xarray/core/rolling.py
67+
- xarray/core/rolling_exp.py
68+
69+
topic-testing:
70+
- conftest.py
71+
- xarray/testing.py
72+
- xarray/testing/*
73+
74+
topic-typing:
75+
- xarray/core/types.py
76+
77+
topic-zarr:
78+
- xarray/backends/zarr.py
79+
80+
io:
81+
- xarray/backends/*
82+
- xarray/backends/**/*

.github/workflows/benchmarks.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ on:
77

88
jobs:
99
benchmark:
10-
if: ${{ contains( github.event.pull_request.labels.*.name, 'run-benchmark') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
10+
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' }}
1111
name: Linux
1212
runs-on: ubuntu-20.04
1313
env:
1414
ASV_DIR: "./asv_bench"
15+
CONDA_ENV_FILE: ci/requirements/environment.yml
1516

1617
steps:
1718
# We need the full repo to avoid this issue
@@ -20,17 +21,16 @@ jobs:
2021
with:
2122
fetch-depth: 0
2223

23-
- name: Setup Miniconda
24-
uses: conda-incubator/setup-miniconda@v2
24+
- name: Set up conda environment
25+
uses: mamba-org/provision-with-micromamba@v15
2526
with:
26-
# installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
27-
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
27+
environment-file: ${{env.CONDA_ENV_FILE}}
28+
environment-name: xarray-tests
29+
cache-env: true
30+
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
31+
extra-specs: |
32+
asv
2833
29-
- name: Setup some dependencies
30-
shell: bash -l {0}
31-
run: |
32-
pip install asv
33-
sudo apt-get update -y
3434
3535
- name: Run benchmarks
3636
shell: bash -l {0}

.github/workflows/ci-additional.yaml

Lines changed: 77 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v3
2626
with:
2727
fetch-depth: 2
28-
- uses: xarray-contrib/ci-trigger@v1.1
28+
- uses: xarray-contrib/ci-trigger@v1
2929
id: detect-trigger
3030
with:
3131
keyword: "[skip-ci]"
@@ -53,12 +53,13 @@ jobs:
5353
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
5454
5555
- name: Setup micromamba
56-
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
56+
uses: mamba-org/provision-with-micromamba@v15
5757
with:
5858
environment-file: ${{env.CONDA_ENV_FILE}}
5959
environment-name: xarray-tests
6060
extra-specs: |
6161
python=${{env.PYTHON_VERSION}}
62+
conda
6263
cache-env: true
6364
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
6465

@@ -72,7 +73,10 @@ jobs:
7273
python xarray/util/print_versions.py
7374
- name: Run doctests
7475
run: |
75-
python -m pytest --doctest-modules xarray --ignore xarray/tests
76+
# Raise an error if there are warnings in the doctests, with `-Werror`.
77+
# This is a trial; if it presents an problem, feel free to remove.
78+
# See https://github.com/pydata/xarray/issues/7164 for more info.
79+
python -m pytest --doctest-modules xarray --ignore xarray/tests -Werror
7680
7781
mypy:
7882
name: Mypy
@@ -96,12 +100,67 @@ jobs:
96100
run: |
97101
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
98102
- name: Setup micromamba
99-
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
103+
uses: mamba-org/provision-with-micromamba@v15
104+
with:
105+
environment-file: ${{env.CONDA_ENV_FILE}}
106+
environment-name: xarray-tests
107+
extra-specs: |
108+
python=${{env.PYTHON_VERSION}}
109+
conda
110+
cache-env: true
111+
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
112+
- name: Install xarray
113+
run: |
114+
python -m pip install --no-deps -e .
115+
- name: Version info
116+
run: |
117+
conda info -a
118+
conda list
119+
python xarray/util/print_versions.py
120+
- name: Install mypy
121+
run: |
122+
python -m pip install 'mypy<0.990'
123+
124+
- name: Run mypy
125+
run: |
126+
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
127+
128+
- name: Upload mypy coverage to Codecov
129+
uses: codecov/codecov-action@v3.1.1
130+
with:
131+
file: mypy_report/cobertura.xml
132+
flags: mypy
133+
env_vars: PYTHON_VERSION
134+
name: codecov-umbrella
135+
fail_ci_if_error: false
136+
137+
mypy39:
138+
name: Mypy 3.9
139+
runs-on: "ubuntu-latest"
140+
needs: detect-ci-trigger
141+
defaults:
142+
run:
143+
shell: bash -l {0}
144+
env:
145+
CONDA_ENV_FILE: ci/requirements/environment.yml
146+
PYTHON_VERSION: "3.9"
147+
148+
steps:
149+
- uses: actions/checkout@v3
150+
with:
151+
fetch-depth: 0 # Fetch all history for all branches and tags.
152+
153+
- name: set environment variables
154+
run: |
155+
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
156+
- name: Setup micromamba
157+
uses: mamba-org/provision-with-micromamba@v15
100158
with:
101159
environment-file: ${{env.CONDA_ENV_FILE}}
102160
environment-name: xarray-tests
103161
extra-specs: |
104162
python=${{env.PYTHON_VERSION}}
163+
conda
105164
cache-env: true
106165
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
107166
- name: Install xarray
@@ -114,11 +173,22 @@ jobs:
114173
python xarray/util/print_versions.py
115174
- name: Install mypy
116175
run: |
117-
python -m pip install mypy
176+
python -m pip install 'mypy<0.990'
118177
119178
- name: Run mypy
120179
run: |
121-
python -m mypy --install-types --non-interactive
180+
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
181+
182+
- name: Upload mypy coverage to Codecov
183+
uses: codecov/codecov-action@v3.1.1
184+
with:
185+
file: mypy_report/cobertura.xml
186+
flags: mypy39
187+
env_vars: PYTHON_VERSION
188+
name: codecov-umbrella
189+
fail_ci_if_error: false
190+
191+
122192

123193
min-version-policy:
124194
name: Minimum Version Policy
@@ -140,7 +210,7 @@ jobs:
140210
fetch-depth: 0 # Fetch all history for all branches and tags.
141211

142212
- name: Setup micromamba
143-
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
213+
uses: mamba-org/provision-with-micromamba@v15
144214
with:
145215
environment-name: xarray-tests
146216
environment-file: false

.github/workflows/ci.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v3
2626
with:
2727
fetch-depth: 2
28-
- uses: xarray-contrib/ci-trigger@v1.1
28+
- uses: xarray-contrib/ci-trigger@v1
2929
id: detect-trigger
3030
with:
3131
keyword: "[skip-ci]"
@@ -42,15 +42,15 @@ jobs:
4242
matrix:
4343
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
4444
# Bookend python versions
45-
python-version: ["3.8", "3.10"]
45+
python-version: ["3.9", "3.10", "3.11"]
4646
env: [""]
4747
include:
4848
# Minimum python version:
4949
- env: "bare-minimum"
50-
python-version: "3.8"
50+
python-version: "3.9"
5151
os: ubuntu-latest
5252
- env: "min-all-deps"
53-
python-version: "3.8"
53+
python-version: "3.9"
5454
os: ubuntu-latest
5555
# Latest python version:
5656
- env: "all-but-dask"
@@ -67,7 +67,13 @@ jobs:
6767
run: |
6868
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
6969
70-
if [[ ${{ matrix.os }} == windows* ]] ;
70+
if [[ "${{matrix.python-version}}" == "3.11" ]]; then
71+
if [[ ${{matrix.os}} == windows* ]]; then
72+
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-py311.yml" >> $GITHUB_ENV
73+
else
74+
echo "CONDA_ENV_FILE=ci/requirements/environment-py311.yml" >> $GITHUB_ENV
75+
fi
76+
elif [[ ${{ matrix.os }} == windows* ]] ;
7177
then
7278
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
7379
elif [[ "${{ matrix.env }}" != "" ]] ;
@@ -86,12 +92,15 @@ jobs:
8692
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
8793
8894
- name: Setup micromamba
89-
uses: mamba-org/provision-with-micromamba@de032af7fb3675649f3d4bbdda85178ba412ee41
95+
uses: mamba-org/provision-with-micromamba@v15
9096
with:
9197
environment-file: ${{ env.CONDA_ENV_FILE }}
9298
environment-name: xarray-tests
9399
cache-env: true
94100
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
101+
extra-specs: |
102+
python=${{matrix.python-version}}
103+
conda
95104
96105
# We only want to install this on one run, because otherwise we'll have
97106
# duplicate annotations.
@@ -129,7 +138,7 @@ jobs:
129138
path: pytest.xml
130139

131140
- name: Upload code coverage to Codecov
132-
uses: codecov/codecov-action@v3.1.0
141+
uses: codecov/codecov-action@v3.1.1
133142
with:
134143
file: ./coverage.xml
135144
flags: unittests

.github/workflows/label-all.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Issue and PR Labeler"
2+
on:
3+
pull_request:
4+
types: [opened]
5+
issues:
6+
types: [opened, reopened]
7+
jobs:
8+
label-all-on-open:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: andymckay/labeler@1.0.4
12+
with:
13+
add-labels: "needs triage"
14+
ignore-if-labeled: false

.github/workflows/label-prs.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "PR Labeler"
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
label:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/labeler@main
10+
with:
11+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
12+
# Workaround for sync-labels bug:
13+
# https://github.com/actions/labeler/issues/112
14+
sync-labels: ""

.github/workflows/publish-test-results.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
done
3636
3737
- name: Publish Unit Test Results
38-
uses: EnricoMi/publish-unit-test-result-action@v1
38+
uses: EnricoMi/publish-unit-test-result-action@v2
3939
with:
4040
commit: ${{ github.event.workflow_run.head_sha }}
4141
event_file: artifacts/Event File/event.json

0 commit comments

Comments
 (0)