Skip to content

Commit ac37672

Browse files
committed
Merge branch 'main' into repr_length_updates
* main: (31 commits) Refactor index vs. coordinate variable(s) (pydata#5636) pre-commit: autoupdate hook versions (pydata#5685) Flexible Indexes: Avoid len(index) in map_blocks (pydata#5670) Speed up _mapping_repr (pydata#5661) update the link to `scipy`'s intersphinx file (pydata#5665) Bump styfle/cancel-workflow-action from 0.9.0 to 0.9.1 (pydata#5663) pre-commit: autoupdate hook versions (pydata#5660) fix the binder environment (pydata#5650) Update api.rst (pydata#5639) Kwargs to rasterio open (pydata#5609) Bump codecov/codecov-action from 1 to 2.0.2 (pydata#5633) new blank whats-new for v0.19.1 v0.19.0 release notes (pydata#5632) remove deprecations scheduled for 0.19 (pydata#5630) Make typing-extensions optional (pydata#5624) Plots get labels from pint arrays (pydata#5561) Add to_numpy() and as_numpy() methods (pydata#5568) pin fsspec (pydata#5627) pre-commit: autoupdate hook versions (pydata#5617) Add dataarray scatter with 3d support (pydata#4909) ...
2 parents 3896e8e + 4bb9d9c commit ac37672

Some content is hidden

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

51 files changed

+1979
-752
lines changed

.binder/environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: xarray-examples
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.8
5+
- python=3.9
66
- boto3
77
- bottleneck
88
- cartopy
@@ -26,6 +26,7 @@ dependencies:
2626
- pandas
2727
- pint
2828
- pip
29+
- pooch
2930
- pydap
3031
- pynio
3132
- rasterio

.github/workflows/cancel-duplicate-runs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: github.repository == 'pydata/xarray'
1212
steps:
13-
- uses: styfle/[email protected].0
13+
- uses: styfle/[email protected].1
1414
with:
1515
workflow_id: ${{ github.event.workflow.id }}

.github/workflows/ci-additional.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
$PYTEST_EXTRA_FLAGS
104104
105105
- name: Upload code coverage to Codecov
106-
uses: codecov/codecov-action@v1
106+
uses: codecov/codecov-action@v2.0.2
107107
with:
108108
file: ./coverage.xml
109109
flags: unittests,${{ matrix.env }}

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
path: pytest.xml
101101

102102
- name: Upload code coverage to Codecov
103-
uses: codecov/codecov-action@v1
103+
uses: codecov/codecov-action@v2.0.2
104104
with:
105105
file: ./coverage.xml
106106
flags: unittests

.github/workflows/sync_linter_versions.py

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

.pre-commit-config.yaml

Lines changed: 4 additions & 4 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.9.1
11+
rev: 5.9.3
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,7 +30,6 @@ 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
3433
rev: v0.910
3534
hooks:
3635
- id: mypy
@@ -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

asv_bench/benchmarks/repr.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
1+
import numpy as np
12
import pandas as pd
23

34
import xarray as xr
45

56

7+
class Repr:
8+
def setup(self):
9+
a = np.arange(0, 100)
10+
data_vars = dict()
11+
for i in a:
12+
data_vars[f"long_variable_name_{i}"] = xr.DataArray(
13+
name=f"long_variable_name_{i}",
14+
data=np.arange(0, 20),
15+
dims=[f"long_coord_name_{i}_x"],
16+
coords={f"long_coord_name_{i}_x": np.arange(0, 20) * 2},
17+
)
18+
self.ds = xr.Dataset(data_vars)
19+
self.ds.attrs = {f"attr_{k}": 2 for k in a}
20+
21+
def time_repr(self):
22+
repr(self.ds)
23+
24+
def time_repr_html(self):
25+
self.ds._repr_html_()
26+
27+
628
class ReprMultiIndex:
729
def setup(self):
830
index = pd.MultiIndex.from_product(

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

ci/requirements/environment-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- cftime
1111
- dask
1212
- distributed
13+
- fsspec!=2021.7.0
1314
- h5netcdf
1415
- h5py
1516
- hdf5

0 commit comments

Comments
 (0)