Skip to content

Commit 12400cb

Browse files
committed
Merge branch 'main' into apply-to-dataset
2 parents b59dd1e + 12810c2 commit 12400cb

Some content is hidden

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

70 files changed

+2398
-867
lines changed

.github/workflows/ci-pre-commit-autoupdate.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3636
EXECUTE_COMMANDS: |
3737
python -m pre_commit autoupdate
38-
python .github/workflows/sync_linter_versions.py .pre-commit-config.yaml ci/requirements/mypy_only
3938
python -m pre_commit run --all-files
4039
COMMIT_MESSAGE: 'pre-commit: autoupdate hook versions'
4140
COMMIT_NAME: 'github-actions[bot]'

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ jobs:
9090
run: python -m pytest -n 4
9191
--cov=xarray
9292
--cov-report=xml
93-
--junitxml=test-results/${{ runner.os }}-${{ matrix.python-version }}.xml
93+
--junitxml=pytest.xml
9494

9595
- name: Upload test results
9696
if: always()
9797
uses: actions/upload-artifact@v2
9898
with:
9999
name: Test results for ${{ runner.os }}-${{ matrix.python-version }}
100-
path: test-results/${{ runner.os }}-${{ matrix.python-version }}.xml
100+
path: pytest.xml
101101

102102
- name: Upload code coverage to Codecov
103103
uses: codecov/codecov-action@v1
@@ -123,4 +123,4 @@ jobs:
123123
- name: Publish Unit Test Results
124124
uses: EnricoMi/publish-unit-test-result-action@v1
125125
with:
126-
files: test-results/*.xml
126+
files: test-results/**/*.xml
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copied from https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.18/README.md#support-fork-repositories-and-dependabot-branches
2+
3+
name: Publish test results
4+
5+
on:
6+
workflow_run:
7+
workflows: ["CI"]
8+
types:
9+
- completed
10+
11+
jobs:
12+
publish-test-results:
13+
name: Publish test results
14+
runs-on: ubuntu-latest
15+
if: >
16+
github.event.workflow_run.conclusion != 'skipped' && (
17+
github.event.sender.login == 'dependabot[bot]' ||
18+
github.event.workflow_run.head_repository.full_name != github.repository
19+
)
20+
21+
steps:
22+
- name: Download and extract artifacts
23+
env:
24+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
25+
run: |
26+
mkdir artifacts && cd artifacts
27+
28+
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
29+
artifacts=$(gh api $artifacts_url -q '.artifacts[] | {name: .name, url: .archive_download_url}')
30+
31+
IFS=$'\n'
32+
for artifact in $artifacts
33+
do
34+
name=$(jq -r .name <<<$artifact)
35+
url=$(jq -r .url <<<$artifact)
36+
gh api $url > "$name.zip"
37+
unzip -d "$name" "$name.zip"
38+
done
39+
40+
- name: Publish Unit Test Results
41+
uses: EnricoMi/publish-unit-test-result-action@v1
42+
with:
43+
commit: ${{ github.event.workflow_run.head_sha }}
44+
files: "artifacts/**/*.xml"

.github/workflows/sync_linter_versions.py

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

.github/workflows/upstream-dev-ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: CI Upstream
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
branches:
8-
- master
8+
- main
99
schedule:
1010
- cron: "0 0 * * *" # Daily “At 00:00” UTC
1111
workflow_dispatch: # allows you to trigger the workflow run manually

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ repos:
88
- id: check-yaml
99
# isort should run before black as black sometimes tweaks the isort output
1010
- repo: https://github.com/PyCQA/isort
11-
rev: 5.8.0
11+
rev: 5.9.2
1212
hooks:
1313
- id: isort
1414
# https://github.com/python/black#version-control-integration
1515
- repo: https://github.com/psf/black
16-
rev: 21.6b0
16+
rev: 21.7b0
1717
hooks:
1818
- id: black
1919
- repo: https://github.com/keewis/blackdoc
20-
rev: v0.3.3
20+
rev: v0.3.4
2121
hooks:
2222
- id: blackdoc
2323
- repo: https://gitlab.com/pycqa/flake8
@@ -30,8 +30,7 @@ repos:
3030
# - id: velin
3131
# args: ["--write", "--compact"]
3232
- repo: https://github.com/pre-commit/mirrors-mypy
33-
# version must correspond to the one in .github/workflows/ci-additional.yaml
34-
rev: v0.902
33+
rev: v0.910
3534
hooks:
3635
- id: mypy
3736
# Copied from setup.cfg
@@ -44,6 +43,7 @@ repos:
4443
types-pytz,
4544
# Dependencies that are typed
4645
numpy,
46+
typing-extensions==3.10.0.0,
4747
]
4848
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194
4949
# - repo: https://github.com/asottile/pyupgrade

HOW_TO_RELEASE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ upstream https://github.com/pydata/xarray (push)
1313

1414
<!-- markdownlint-disable MD031 -->
1515

16-
1. Ensure your master branch is synced to upstream:
16+
1. Ensure your main branch is synced to upstream:
1717
```sh
18-
git switch master
19-
git pull upstream master
18+
git switch main
19+
git pull upstream main
2020
```
2121
2. Confirm there are no commits on stable that are not yet merged
2222
([ref](https://github.com/pydata/xarray/pull/4440)):
@@ -44,9 +44,9 @@ upstream https://github.com/pydata/xarray (push)
4444
release.
4545
6. Open a PR with the release summary and whatsnew changes; in particular the
4646
release headline should get feedback from the team on what's important to include.
47-
7. After merging, again ensure your master branch is synced to upstream:
47+
7. After merging, again ensure your main branch is synced to upstream:
4848
```sh
49-
git pull upstream master
49+
git pull upstream main
5050
```
5151
8. If you have any doubts, run the full test suite one final time!
5252
```sh
@@ -59,12 +59,12 @@ upstream https://github.com/pydata/xarray (push)
5959
11. This should automatically trigger an upload of the new build to PyPI via GitHub Actions.
6060
Check this has run [here](https://github.com/pydata/xarray/actions/workflows/pypi-release.yaml),
6161
and that the version number you expect is displayed [on PyPI](https://pypi.org/project/xarray/)
62-
12. Update the stable branch (used by ReadTheDocs) and switch back to master:
62+
12. Update the stable branch (used by ReadTheDocs) and switch back to main:
6363
```sh
6464
git switch stable
65-
git rebase master
65+
git rebase main
6666
git push --force upstream stable
67-
git switch master
67+
git switch main
6868
```
6969
You may need to first fetch it with `git fetch upstream`,
7070
and check out a local version with `git checkout -b stable upstream/stable`.
@@ -103,12 +103,12 @@ upstream https://github.com/pydata/xarray (push)
103103
~~~~~~~~~~~~~~~~
104104
105105
```
106-
14. Commit your changes and push to master again:
106+
14. Commit your changes and push to main again:
107107
```sh
108108
git commit -am 'New whatsnew section'
109-
git push upstream master
109+
git push upstream main
110110
```
111-
You're done pushing to master!
111+
You're done pushing to main!
112112
113113
15. Update the docs. Login to <https://readthedocs.org/projects/xray/versions/>
114114
and switch your new release tag (at the bottom) from "Inactive" to "Active".

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
xarray: N-D labeled arrays and datasets
22
=======================================
33

4-
.. image:: https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=master
4+
.. image:: https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=main
55
:target: https://github.com/pydata/xarray/actions?query=workflow%3ACI
6-
.. image:: https://codecov.io/gh/pydata/xarray/branch/master/graph/badge.svg
6+
.. image:: https://codecov.io/gh/pydata/xarray/branch/main/graph/badge.svg
77
:target: https://codecov.io/gh/pydata/xarray
88
.. image:: https://readthedocs.org/projects/xray/badge/?version=latest
99
:target: https://xarray.pydata.org/

asv_bench/asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
// List of branches to benchmark. If not provided, defaults to "master"
1717
// (for git) or "default" (for mercurial).
18-
"branches": ["master"], // for git
18+
"branches": ["main"], // for git
1919
// "branches": ["default"], // for mercurial
2020

2121
// The DVCS being used. If not set, it will be automatically

ci/install-upstream-wheels.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ conda uninstall -y --force \
77
matplotlib \
88
dask \
99
distributed \
10+
fsspec \
1011
zarr \
1112
cftime \
1213
rasterio \
@@ -40,4 +41,5 @@ python -m pip install \
4041
git+https://github.com/mapbox/rasterio \
4142
git+https://github.com/hgrecco/pint \
4243
git+https://github.com/pydata/bottleneck \
43-
git+https://github.com/pydata/sparse
44+
git+https://github.com/pydata/sparse \
45+
git+https://github.com/intake/filesystem_spec

0 commit comments

Comments
 (0)