File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 6
6
import pandas as pd
7
7
import pydantic
8
8
import xarray as xr
9
- import zarr
10
9
from intake .source .base import DataSource , Schema
11
10
12
11
from .cat import Aggregation , DataFormat
@@ -21,15 +20,6 @@ class ESMDataSourceError(Exception):
21
20
pass
22
21
23
22
24
- def _zarr_async () -> bool :
25
- """
26
- Zarr went all async in version 3.0.0. This sets the async flag based on
27
- the zarr version in storage options
28
- """
29
-
30
- return int (zarr .__version__ .split ('.' )[0 ]) > 2
31
-
32
-
33
23
def _get_xarray_open_kwargs (data_format , xarray_open_kwargs = None , storage_options = None ):
34
24
xarray_open_kwargs = (xarray_open_kwargs or {}).copy ()
35
25
_default_open_kwargs = {
Original file line number Diff line number Diff line change 5
5
from collections import defaultdict
6
6
7
7
import polars as pl
8
+ import zarr
8
9
9
10
10
11
def show_versions (file = sys .stdout ): # pragma: no cover
@@ -57,6 +58,15 @@ def show_versions(file=sys.stdout): # pragma: no cover
57
58
print (f'{ k } : { stat } ' , file = file )
58
59
59
60
61
+ def _zarr_async () -> bool :
62
+ """
63
+ Zarr went all async in version 3.0.0. This sets the async flag based on
64
+ the zarr version in storage options
65
+ """
66
+
67
+ return int (zarr .__version__ .split ('.' )[0 ]) > 2
68
+
69
+
60
70
OPTIONS = {
61
71
'attrs_prefix' : 'intake_esm_attrs' ,
62
72
'dataset_key' : 'intake_esm_dataset_key' ,
Original file line number Diff line number Diff line change 14
14
_get_xarray_open_kwargs ,
15
15
_open_dataset ,
16
16
_update_attrs ,
17
- _zarr_async ,
18
17
)
18
+ from intake_esm .utils import _zarr_async
19
19
20
20
dask .config .set (scheduler = 'single-threaded' )
21
21
You can’t perform that action at this time.
0 commit comments