Skip to content

Commit

Permalink
Merge branch 'main' into apply-to-dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Jul 23, 2021
2 parents b59dd1e + 12810c2 commit 12400cb
Show file tree
Hide file tree
Showing 70 changed files with 2,398 additions and 867 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci-pre-commit-autoupdate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EXECUTE_COMMANDS: |
python -m pre_commit autoupdate
python .github/workflows/sync_linter_versions.py .pre-commit-config.yaml ci/requirements/mypy_only
python -m pre_commit run --all-files
COMMIT_MESSAGE: 'pre-commit: autoupdate hook versions'
COMMIT_NAME: 'github-actions[bot]'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ jobs:
run: python -m pytest -n 4
--cov=xarray
--cov-report=xml
--junitxml=test-results/${{ runner.os }}-${{ matrix.python-version }}.xml
--junitxml=pytest.xml

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

- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
Expand All @@ -123,4 +123,4 @@ jobs:
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: test-results/*.xml
files: test-results/**/*.xml
44 changes: 44 additions & 0 deletions .github/workflows/publish-test-results.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copied from https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.18/README.md#support-fork-repositories-and-dependabot-branches

name: Publish test results

on:
workflow_run:
workflows: ["CI"]
types:
- completed

jobs:
publish-test-results:
name: Publish test results
runs-on: ubuntu-latest
if: >
github.event.workflow_run.conclusion != 'skipped' && (
github.event.sender.login == 'dependabot[bot]' ||
github.event.workflow_run.head_repository.full_name != github.repository
)
steps:
- name: Download and extract artifacts
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mkdir artifacts && cd artifacts
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
artifacts=$(gh api $artifacts_url -q '.artifacts[] | {name: .name, url: .archive_download_url}')
IFS=$'\n'
for artifact in $artifacts
do
name=$(jq -r .name <<<$artifact)
url=$(jq -r .url <<<$artifact)
gh api $url > "$name.zip"
unzip -d "$name" "$name.zip"
done
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
commit: ${{ github.event.workflow_run.head_sha }}
files: "artifacts/**/*.xml"
76 changes: 0 additions & 76 deletions .github/workflows/sync_linter_versions.py

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI Upstream
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
schedule:
- cron: "0 0 * * *" # Daily “At 00:00” UTC
workflow_dispatch: # allows you to trigger the workflow run manually
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ repos:
- id: check-yaml
# isort should run before black as black sometimes tweaks the isort output
- repo: https://github.com/PyCQA/isort
rev: 5.8.0
rev: 5.9.2
hooks:
- id: isort
# https://github.com/python/black#version-control-integration
- repo: https://github.com/psf/black
rev: 21.6b0
rev: 21.7b0
hooks:
- id: black
- repo: https://github.com/keewis/blackdoc
rev: v0.3.3
rev: v0.3.4
hooks:
- id: blackdoc
- repo: https://gitlab.com/pycqa/flake8
Expand All @@ -30,8 +30,7 @@ repos:
# - id: velin
# args: ["--write", "--compact"]
- repo: https://github.com/pre-commit/mirrors-mypy
# version must correspond to the one in .github/workflows/ci-additional.yaml
rev: v0.902
rev: v0.910
hooks:
- id: mypy
# Copied from setup.cfg
Expand All @@ -44,6 +43,7 @@ repos:
types-pytz,
# Dependencies that are typed
numpy,
typing-extensions==3.10.0.0,
]
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194
# - repo: https://github.com/asottile/pyupgrade
Expand Down
22 changes: 11 additions & 11 deletions HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ upstream https://github.com/pydata/xarray (push)

<!-- markdownlint-disable MD031 -->

1. Ensure your master branch is synced to upstream:
1. Ensure your main branch is synced to upstream:
```sh
git switch master
git pull upstream master
git switch main
git pull upstream main
```
2. Confirm there are no commits on stable that are not yet merged
([ref](https://github.com/pydata/xarray/pull/4440)):
Expand Down Expand Up @@ -44,9 +44,9 @@ upstream https://github.com/pydata/xarray (push)
release.
6. Open a PR with the release summary and whatsnew changes; in particular the
release headline should get feedback from the team on what's important to include.
7. After merging, again ensure your master branch is synced to upstream:
7. After merging, again ensure your main branch is synced to upstream:
```sh
git pull upstream master
git pull upstream main
```
8. If you have any doubts, run the full test suite one final time!
```sh
Expand All @@ -59,12 +59,12 @@ upstream https://github.com/pydata/xarray (push)
11. This should automatically trigger an upload of the new build to PyPI via GitHub Actions.
Check this has run [here](https://github.com/pydata/xarray/actions/workflows/pypi-release.yaml),
and that the version number you expect is displayed [on PyPI](https://pypi.org/project/xarray/)
12. Update the stable branch (used by ReadTheDocs) and switch back to master:
12. Update the stable branch (used by ReadTheDocs) and switch back to main:
```sh
git switch stable
git rebase master
git rebase main
git push --force upstream stable
git switch master
git switch main
```
You may need to first fetch it with `git fetch upstream`,
and check out a local version with `git checkout -b stable upstream/stable`.
Expand Down Expand Up @@ -103,12 +103,12 @@ upstream https://github.com/pydata/xarray (push)
~~~~~~~~~~~~~~~~
```
14. Commit your changes and push to master again:
14. Commit your changes and push to main again:
```sh
git commit -am 'New whatsnew section'
git push upstream master
git push upstream main
```
You're done pushing to master!
You're done pushing to main!
15. Update the docs. Login to <https://readthedocs.org/projects/xray/versions/>
and switch your new release tag (at the bottom) from "Inactive" to "Active".
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
xarray: N-D labeled arrays and datasets
=======================================

.. image:: https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=master
.. image:: https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=main
:target: https://github.com/pydata/xarray/actions?query=workflow%3ACI
.. image:: https://codecov.io/gh/pydata/xarray/branch/master/graph/badge.svg
.. image:: https://codecov.io/gh/pydata/xarray/branch/main/graph/badge.svg
:target: https://codecov.io/gh/pydata/xarray
.. image:: https://readthedocs.org/projects/xray/badge/?version=latest
:target: https://xarray.pydata.org/
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

// List of branches to benchmark. If not provided, defaults to "master"
// (for git) or "default" (for mercurial).
"branches": ["master"], // for git
"branches": ["main"], // for git
// "branches": ["default"], // for mercurial

// The DVCS being used. If not set, it will be automatically
Expand Down
4 changes: 3 additions & 1 deletion ci/install-upstream-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ conda uninstall -y --force \
matplotlib \
dask \
distributed \
fsspec \
zarr \
cftime \
rasterio \
Expand Down Expand Up @@ -40,4 +41,5 @@ python -m pip install \
git+https://github.com/mapbox/rasterio \
git+https://github.com/hgrecco/pint \
git+https://github.com/pydata/bottleneck \
git+https://github.com/pydata/sparse
git+https://github.com/pydata/sparse \
git+https://github.com/intake/filesystem_spec
1 change: 1 addition & 0 deletions ci/requirements/environment-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies:
- cftime
- dask
- distributed
- fsspec!=2021.7.0
- h5netcdf
- h5py
- hdf5
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- cftime
- dask
- distributed
- fsspec!=2021.7.0
- h5netcdf
- h5py
- hdf5
Expand Down
6 changes: 2 additions & 4 deletions doc/api-hidden.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

core.rolling.DatasetCoarsen.all
core.rolling.DatasetCoarsen.any
core.rolling.DatasetCoarsen.construct
core.rolling.DatasetCoarsen.count
core.rolling.DatasetCoarsen.max
core.rolling.DatasetCoarsen.mean
Expand All @@ -53,7 +54,6 @@
core.rolling.DatasetCoarsen.var
core.rolling.DatasetCoarsen.boundary
core.rolling.DatasetCoarsen.coord_func
core.rolling.DatasetCoarsen.keep_attrs
core.rolling.DatasetCoarsen.obj
core.rolling.DatasetCoarsen.side
core.rolling.DatasetCoarsen.trim_excess
Expand Down Expand Up @@ -119,7 +119,6 @@
core.rolling.DatasetRolling.var
core.rolling.DatasetRolling.center
core.rolling.DatasetRolling.dim
core.rolling.DatasetRolling.keep_attrs
core.rolling.DatasetRolling.min_periods
core.rolling.DatasetRolling.obj
core.rolling.DatasetRolling.rollings
Expand Down Expand Up @@ -185,6 +184,7 @@

core.rolling.DataArrayCoarsen.all
core.rolling.DataArrayCoarsen.any
core.rolling.DataArrayCoarsen.construct
core.rolling.DataArrayCoarsen.count
core.rolling.DataArrayCoarsen.max
core.rolling.DataArrayCoarsen.mean
Expand All @@ -197,7 +197,6 @@
core.rolling.DataArrayCoarsen.var
core.rolling.DataArrayCoarsen.boundary
core.rolling.DataArrayCoarsen.coord_func
core.rolling.DataArrayCoarsen.keep_attrs
core.rolling.DataArrayCoarsen.obj
core.rolling.DataArrayCoarsen.side
core.rolling.DataArrayCoarsen.trim_excess
Expand Down Expand Up @@ -261,7 +260,6 @@
core.rolling.DataArrayRolling.var
core.rolling.DataArrayRolling.center
core.rolling.DataArrayRolling.dim
core.rolling.DataArrayRolling.keep_attrs
core.rolling.DataArrayRolling.min_periods
core.rolling.DataArrayRolling.obj
core.rolling.DataArrayRolling.window
Expand Down
3 changes: 3 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ Dataset methods
open_zarr
Dataset.to_netcdf
Dataset.to_pandas
Dataset.as_numpy
Dataset.to_zarr
save_mfdataset
Dataset.to_array
Expand Down Expand Up @@ -717,6 +718,8 @@ DataArray methods
DataArray.to_pandas
DataArray.to_series
DataArray.to_dataframe
DataArray.to_numpy
DataArray.as_numpy
DataArray.to_index
DataArray.to_masked_array
DataArray.to_cdms2
Expand Down
Loading

0 comments on commit 12400cb

Please sign in to comment.