Skip to content

Commit 74db88f

Browse files
authored
Merge branch 'main' into vlen-string-coding
2 parents a9baa60 + 828ea08 commit 74db88f

File tree

138 files changed

+8579
-2632
lines changed

Some content is hidden

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

138 files changed

+8579
-2632
lines changed

.codecov.yml

+28-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,38 @@
11
codecov:
2-
ci:
3-
# by default, codecov doesn't recognize azure as a CI provider
4-
- dev.azure.com
5-
require_ci_to_pass: yes
2+
require_ci_to_pass: true
63

74
coverage:
85
status:
96
project:
107
default:
118
# Require 1% coverage, i.e., always succeed
12-
target: 1
9+
target: 1%
10+
flags:
11+
- unittests
12+
paths:
13+
- "!xarray/tests/"
14+
unittests:
15+
target: 90%
16+
flags:
17+
- unittests
18+
paths:
19+
- "!xarray/tests/"
20+
mypy:
21+
target: 20%
22+
flags:
23+
- mypy
1324
patch: false
1425
changes: false
1526

16-
comment: off
27+
comment: false
28+
29+
flags:
30+
unittests:
31+
paths:
32+
- "xarray"
33+
- "!xarray/tests"
34+
carryforward: false
35+
mypy:
36+
paths:
37+
- "xarray"
38+
carryforward: false

.github/workflows/benchmarks-last-release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717
steps:
1818
# We need the full repo to avoid this issue
1919
# https://github.com/actions/checkout/issues/23
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323

2424
- name: Set up conda environment
25-
uses: mamba-org/provision-with-micromamba@v15
25+
uses: mamba-org/setup-micromamba@v1
2626
with:
2727
environment-file: ${{env.CONDA_ENV_FILE}}
2828
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: |
29+
cache-environment: true
30+
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
31+
create-args: >-
3232
asv
3333
3434
- name: 'Get Previous tag'

.github/workflows/benchmarks.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717
steps:
1818
# We need the full repo to avoid this issue
1919
# https://github.com/actions/checkout/issues/23
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323

2424
- name: Set up conda environment
25-
uses: mamba-org/provision-with-micromamba@v15
25+
uses: mamba-org/setup-micromamba@v1
2626
with:
2727
environment-file: ${{env.CONDA_ENV_FILE}}
2828
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: |
29+
cache-environment: true
30+
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
31+
create-args: >-
3232
asv
3333
3434

.github/workflows/ci-additional.yaml

+21-23
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
outputs:
2323
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 2
2828
- uses: xarray-contrib/ci-trigger@v1
@@ -44,7 +44,7 @@ jobs:
4444
PYTHON_VERSION: "3.10"
4545

4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4848
with:
4949
fetch-depth: 0 # Fetch all history for all branches and tags.
5050

@@ -53,15 +53,15 @@ jobs:
5353
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
5454
5555
- name: Setup micromamba
56-
uses: mamba-org/provision-with-micromamba@v15
56+
uses: mamba-org/setup-micromamba@v1
5757
with:
5858
environment-file: ${{env.CONDA_ENV_FILE}}
5959
environment-name: xarray-tests
60-
extra-specs: |
60+
create-args: >-
6161
python=${{env.PYTHON_VERSION}}
6262
conda
63-
cache-env: true
64-
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
63+
cache-environment: true
64+
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
6565

6666
- name: Install xarray
6767
run: |
@@ -92,23 +92,23 @@ jobs:
9292
PYTHON_VERSION: "3.10"
9393

9494
steps:
95-
- uses: actions/checkout@v3
95+
- uses: actions/checkout@v4
9696
with:
9797
fetch-depth: 0 # Fetch all history for all branches and tags.
9898

9999
- name: set environment variables
100100
run: |
101101
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
102102
- name: Setup micromamba
103-
uses: mamba-org/provision-with-micromamba@v15
103+
uses: mamba-org/setup-micromamba@v1
104104
with:
105105
environment-file: ${{env.CONDA_ENV_FILE}}
106106
environment-name: xarray-tests
107-
extra-specs: |
107+
create-args: >-
108108
python=${{env.PYTHON_VERSION}}
109109
conda
110-
cache-env: true
111-
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
110+
cache-environment: true
111+
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
112112
- name: Install xarray
113113
run: |
114114
python -m pip install --no-deps -e .
@@ -123,7 +123,7 @@ jobs:
123123
124124
- name: Run mypy
125125
run: |
126-
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
126+
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
127127
128128
- name: Upload mypy coverage to Codecov
129129
uses: codecov/[email protected]
@@ -146,23 +146,23 @@ jobs:
146146
PYTHON_VERSION: "3.9"
147147

148148
steps:
149-
- uses: actions/checkout@v3
149+
- uses: actions/checkout@v4
150150
with:
151151
fetch-depth: 0 # Fetch all history for all branches and tags.
152152

153153
- name: set environment variables
154154
run: |
155155
echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
156156
- name: Setup micromamba
157-
uses: mamba-org/provision-with-micromamba@v15
157+
uses: mamba-org/setup-micromamba@v1
158158
with:
159159
environment-file: ${{env.CONDA_ENV_FILE}}
160160
environment-name: xarray-tests
161-
extra-specs: |
161+
create-args: >-
162162
python=${{env.PYTHON_VERSION}}
163163
conda
164-
cache-env: true
165-
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
164+
cache-environment: true
165+
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
166166
- name: Install xarray
167167
run: |
168168
python -m pip install --no-deps -e .
@@ -177,7 +177,7 @@ jobs:
177177
178178
- name: Run mypy
179179
run: |
180-
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
180+
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report xarray/
181181
182182
- name: Upload mypy coverage to Codecov
183183
uses: codecov/[email protected]
@@ -205,21 +205,19 @@ jobs:
205205
fail-fast: false
206206

207207
steps:
208-
- uses: actions/checkout@v3
208+
- uses: actions/checkout@v4
209209
with:
210210
fetch-depth: 0 # Fetch all history for all branches and tags.
211211

212212
- name: Setup micromamba
213-
uses: mamba-org/provision-with-micromamba@v15
213+
uses: mamba-org/setup-micromamba@v1
214214
with:
215215
environment-name: xarray-tests
216-
environment-file: false
217-
extra-specs: |
216+
create-args: >-
218217
python=3.10
219218
pyyaml
220219
conda
221220
python-dateutil
222-
channels: conda-forge
223221
224222
- name: minimum versions policy
225223
run: |

.github/workflows/ci.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
outputs:
2323
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 2
2828
- uses: xarray-contrib/ci-trigger@v1
@@ -42,7 +42,7 @@ jobs:
4242
matrix:
4343
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
4444
# Bookend python versions
45-
python-version: ["3.9", "3.10", "3.11"]
45+
python-version: ["3.9", "3.11"]
4646
env: [""]
4747
include:
4848
# Minimum python version:
@@ -60,7 +60,7 @@ jobs:
6060
python-version: "3.10"
6161
os: ubuntu-latest
6262
steps:
63-
- uses: actions/checkout@v3
63+
- uses: actions/checkout@v4
6464
with:
6565
fetch-depth: 0 # Fetch all history for all branches and tags.
6666
- name: Set environment variables
@@ -92,13 +92,13 @@ jobs:
9292
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
9393
9494
- name: Setup micromamba
95-
uses: mamba-org/provision-with-micromamba@v15
95+
uses: mamba-org/setup-micromamba@v1
9696
with:
9797
environment-file: ${{ env.CONDA_ENV_FILE }}
9898
environment-name: xarray-tests
99-
cache-env: true
100-
cache-env-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
101-
extra-specs: |
99+
cache-environment: true
100+
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
101+
create-args: >-
102102
python=${{matrix.python-version}}
103103
conda
104104

.github/workflows/nightly-wheels.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Upload nightly wheels
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
jobs:
7+
cron:
8+
runs-on: ubuntu-latest
9+
if: github.repository == 'pydata/xarray'
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.11"
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
python -m pip install build twine
22+
23+
- name: Build tarball and wheels
24+
run: |
25+
git clean -xdf
26+
git restore -SW .
27+
python -m build
28+
29+
- name: Check built artifacts
30+
run: |
31+
python -m twine check --strict dist/*
32+
pwd
33+
if [ -f dist/xarray-0.0.0.tar.gz ]; then
34+
echo "❌ INVALID VERSION NUMBER"
35+
exit 1
36+
else
37+
echo "✅ Looks good"
38+
fi
39+
40+
- name: Upload wheel
41+
uses: scientific-python/upload-nightly-action@main
42+
with:
43+
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_NIGHTLY }}
44+
artifacts_path: dist

0 commit comments

Comments
 (0)