Skip to content

Commit 77d24de

Browse files
author
Ray Bell
committed
Merge remote-tracking branch 'upstream/main' into to_zarr-storage_options
merge main
2 parents 753c6d4 + 8b95da8 commit 77d24de

37 files changed

+1348
-324
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.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

.pre-commit-config.yaml

Lines changed: 4 additions & 3 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.2
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
@@ -43,6 +43,7 @@ repos:
4343
types-pytz,
4444
# Dependencies that are typed
4545
numpy,
46+
typing-extensions==3.10.0.0,
4647
]
4748
# run this occasionally, ref discussion https://github.com/pydata/xarray/pull/3194
4849
# - 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/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

ci/requirements/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dependencies:
1212
- cftime
1313
- dask
1414
- distributed
15+
- fsspec!=2021.7.0
1516
- h5netcdf
1617
- h5py
1718
- hdf5

doc/api-hidden.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
core.rolling.DatasetCoarsen.var
5555
core.rolling.DatasetCoarsen.boundary
5656
core.rolling.DatasetCoarsen.coord_func
57-
core.rolling.DatasetCoarsen.keep_attrs
5857
core.rolling.DatasetCoarsen.obj
5958
core.rolling.DatasetCoarsen.side
6059
core.rolling.DatasetCoarsen.trim_excess
@@ -120,7 +119,6 @@
120119
core.rolling.DatasetRolling.var
121120
core.rolling.DatasetRolling.center
122121
core.rolling.DatasetRolling.dim
123-
core.rolling.DatasetRolling.keep_attrs
124122
core.rolling.DatasetRolling.min_periods
125123
core.rolling.DatasetRolling.obj
126124
core.rolling.DatasetRolling.rollings
@@ -199,7 +197,6 @@
199197
core.rolling.DataArrayCoarsen.var
200198
core.rolling.DataArrayCoarsen.boundary
201199
core.rolling.DataArrayCoarsen.coord_func
202-
core.rolling.DataArrayCoarsen.keep_attrs
203200
core.rolling.DataArrayCoarsen.obj
204201
core.rolling.DataArrayCoarsen.side
205202
core.rolling.DataArrayCoarsen.trim_excess
@@ -263,7 +260,6 @@
263260
core.rolling.DataArrayRolling.var
264261
core.rolling.DataArrayRolling.center
265262
core.rolling.DataArrayRolling.dim
266-
core.rolling.DataArrayRolling.keep_attrs
267263
core.rolling.DataArrayRolling.min_periods
268264
core.rolling.DataArrayRolling.obj
269265
core.rolling.DataArrayRolling.window

doc/api.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Top-level functions
2424
combine_by_coords
2525
combine_nested
2626
where
27-
set_options
2827
infer_freq
2928
full_like
3029
zeros_like
@@ -686,6 +685,7 @@ Dataset methods
686685
open_zarr
687686
Dataset.to_netcdf
688687
Dataset.to_pandas
688+
Dataset.as_numpy
689689
Dataset.to_zarr
690690
save_mfdataset
691691
Dataset.to_array
@@ -716,6 +716,8 @@ DataArray methods
716716
DataArray.to_pandas
717717
DataArray.to_series
718718
DataArray.to_dataframe
719+
DataArray.to_numpy
720+
DataArray.as_numpy
719721
DataArray.to_index
720722
DataArray.to_masked_array
721723
DataArray.to_cdms2

0 commit comments

Comments
 (0)