Skip to content

Commit 94a7652

Browse files
authored
Merge branch 'main' into nanoseconds-resolution
2 parents 8750475 + 83c2919 commit 94a7652

File tree

117 files changed

+7591
-1745
lines changed

Some content is hidden

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

117 files changed

+7591
-1745
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
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

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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: |
@@ -100,15 +100,15 @@ jobs:
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 .
@@ -126,7 +126,7 @@ jobs:
126126
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
127127
128128
- name: Upload mypy coverage to Codecov
129-
uses: codecov/[email protected].3
129+
uses: codecov/[email protected].4
130130
with:
131131
file: mypy_report/cobertura.xml
132132
flags: mypy
@@ -154,15 +154,15 @@ jobs:
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 .
@@ -180,7 +180,7 @@ jobs:
180180
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report
181181
182182
- name: Upload mypy coverage to Codecov
183-
uses: codecov/[email protected].3
183+
uses: codecov/[email protected].4
184184
with:
185185
file: mypy_report/cobertura.xml
186186
flags: mypy39
@@ -210,16 +210,14 @@ jobs:
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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -139,7 +139,7 @@ jobs:
139139
path: pytest.xml
140140

141141
- name: Upload code coverage to Codecov
142-
uses: codecov/[email protected].3
142+
uses: codecov/[email protected].4
143143
with:
144144
file: ./coverage.xml
145145
flags: unittests

.github/workflows/nightly-wheels.yml

Lines changed: 44 additions & 0 deletions
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@v3
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

.github/workflows/parse_logs.py

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

.github/workflows/pypi-release.yaml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,26 @@ jobs:
7070
python -m pip install dist/xarray*.whl
7171
python -m xarray.util.print_versions
7272
73+
upload-to-test-pypi:
74+
needs: test-built-dist
75+
if: github.event_name == 'push'
76+
runs-on: ubuntu-latest
77+
78+
environment:
79+
name: pypi
80+
url: https://test.pypi.org/p/xarray
81+
permissions:
82+
id-token: write
83+
84+
steps:
85+
- uses: actions/download-artifact@v3
86+
with:
87+
name: releases
88+
path: dist
7389
- name: Publish package to TestPyPI
7490
if: github.event_name == 'push'
75-
uses: pypa/[email protected].5
91+
uses: pypa/[email protected].10
7692
with:
77-
user: __token__
78-
password: ${{ secrets.TESTPYPI_TOKEN }}
7993
repository_url: https://test.pypi.org/legacy/
8094
verbose: true
8195

@@ -84,14 +98,19 @@ jobs:
8498
needs: test-built-dist
8599
if: github.event_name == 'release'
86100
runs-on: ubuntu-latest
101+
102+
environment:
103+
name: pypi
104+
url: https://pypi.org/p/xarray
105+
permissions:
106+
id-token: write
107+
87108
steps:
88109
- uses: actions/download-artifact@v3
89110
with:
90111
name: releases
91112
path: dist
92113
- name: Publish package to PyPI
93-
uses: pypa/[email protected].5
114+
uses: pypa/[email protected].10
94115
with:
95-
user: __token__
96-
password: ${{ secrets.PYPI_TOKEN }}
97116
verbose: true

0 commit comments

Comments
 (0)