Skip to content

Commit

Permalink
Merge branch 'main' into update-readthedocs-config
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 authored Jan 16, 2025
2 parents 3430437 + cb9181b commit 1d37b93
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 23 deletions.
10 changes: 5 additions & 5 deletions ci/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ channels:
- nodefaults
dependencies:
- cftime
- dask[complete]>=2022.02.0
- dask>=2024.12
- distributed
- ecgtools >=2022.10.7
- fsspec>=2023.05
- gcsfs >=2023.05
- fsspec>=2024.12
- gcsfs >=2024.12
- intake>=2.0
- jupyterlab
- matplotlib
Expand All @@ -19,13 +19,13 @@ dependencies:
- pydantic>=2.0
- python-graphviz
- python=3.11
- s3fs >=2023.05
- s3fs >=2024.12
- sphinx<6.0
- sphinx-copybutton
- sphinx-design
- watermark
- xarray-datatree>=0.0.9
- xarray>=2023.05
- xarray>=2024.10
- zarr>=2.12
- furo>=2022.09.15
- pip:
Expand Down
6 changes: 3 additions & 3 deletions ci/environment-upstream-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ dependencies:
- cartopy
- cftime
- codecov
- dask>=2022.02.0
- dask>=2024.12
- fastprogress>=1.0.0
- gcsfs >=2022.11.0
- gcsfs >=2024.12
- h5netcdf>=0.8.1
- ipython
- matplotlib
Expand All @@ -28,7 +28,7 @@ dependencies:
- pytest-sugar
- pytest-xdist
- regionmask
- s3fs >=2022.11.0
- s3fs >=2024.12
- scipy
- xarray-datatree
- xgcm
Expand Down
10 changes: 5 additions & 5 deletions ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ channels:
dependencies:
- cftime
- codecov
- dask[complete]>=2022.02.0
- dask>=2024.12
- fastprogress>=1.0.0
- fsspec>=2022.11.0
- gcsfs >=2022.11.0
- fsspec>=2024.12
- gcsfs >=2024.12
- h5netcdf>=0.8.1
- intake>=2.0
- ipython
Expand All @@ -25,9 +25,9 @@ dependencies:
- pytest-sugar
- pytest-xdist
- pytest-mock
- s3fs >=2022.11.0
- s3fs >=2024.12
- scipy
- xarray>=2022.06, !=2024.10
- xarray>=2024.10
- xarray-datatree
- zarr>=2.12
# - pytest-icdiff
15 changes: 9 additions & 6 deletions intake_esm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
from copy import deepcopy

import dask
import packaging.version
import xarray as xr

try:
from datatree import DataTree

if packaging.version.Version(xr.__version__) < packaging.version.Version('2024.10'):
from datatree import DataTree
else:
from xarray import DataTree
_DATATREE_AVAILABLE = True
except ImportError:
_DATATREE_AVAILABLE = False
import pandas as pd
import pydantic
import xarray as xr
from fastprogress.fastprogress import progress_bar
from intake.catalog import Catalog

Expand Down Expand Up @@ -81,9 +84,9 @@ def __init__(
progressbar: bool = True,
sep: str = '.',
registry: DerivedVariableRegistry | None = None,
read_csv_kwargs: dict[str, typing.Any] = None,
columns_with_iterables: list[str] = None,
storage_options: dict[str, typing.Any] = None,
read_csv_kwargs: dict[str, typing.Any] | None = None,
columns_with_iterables: list[str] | None = None,
storage_options: dict[str, typing.Any] | None = None,
**intake_kwargs: dict[str, typing.Any],
):
"""Intake Catalog representing an ESM Collection."""
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dask[complete]>=2022.02.0
dask[complete]>=2024.12
fastprogress>=1.0.0
fsspec>=2022.11.0
fsspec>=2024.12
intake>=2.0.0
netCDF4>=1.5.5
pandas>=2.1.0
requests>=2.24.0
xarray>=2022.06
xarray>=2024.10
zarr>=2.12
pydantic>=2.0
7 changes: 6 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
import os

import intake
import packaging.version
import pandas as pd
import pydantic
import pytest
import xarray as xr
from datatree import DataTree

if packaging.version.Version(xr.__version__) < packaging.version.Version('2024.10'):
from datatree import DataTree
else:
from xarray import DataTree

import intake_esm

Expand Down

0 comments on commit 1d37b93

Please sign in to comment.