intake / intake-xarray

Intake plugin for xarray
https://intake-xarray.readthedocs.io/
BSD 2-Clause "Simplified" License
74 stars 36 forks source link

fix upstream #119

Closed raybellwaves closed 2 years ago

raybellwaves commented 2 years ago

The attribute error seems simple enough, not sure about the import error. Do you think you can fix these here?

Originally posted by @martindurant in https://github.com/intake/intake-xarray/pull/118#issuecomment-1136036806

aaronspring commented 2 years ago

xarray tests upstream differently: https://github.com/pydata/xarray/blob/main/ci/install-upstream-wheels.sh and they do not have this error

here at intake-xarray: https://github.com/intake/intake-xarray/blob/master/ci/environment-upstream.yml, but yes I am aware that this approach used to work before

aaronspring commented 2 years ago

@martindurant linked here

raybellwaves commented 2 years ago

Copying CI errors from https://github.com/intake/intake-xarray/runs/6648327312?check_suite_focus=true

________________________________ test_discovery ________________________________

    def test_discovery():
        with pytest.warns(None) as record:
>           registry = intake.source.discovery.autodiscover()
E           AttributeError: module 'intake.source.discovery' has no attribute 'autodiscover'

intake_xarray/tests/test_discovery.py:7: AttributeError

Failing test is https://github.com/intake/intake-xarray/blob/master/intake_xarray/tests/test_discovery.py

something changed here: https://github.com/intake/intake/commits/master/intake/source/discovery.py

https://github.com/intake/intake/commit/e72e47d6fd4fa861bdad6adc135bdfccc54af72a#diff-f6106a22ae8739af9b2b81acc422ef97b2b1d439dc15e4386377d5679e33b35bL25

and rasterio stuff...

raybellwaves commented 2 years ago

The rasterio fixes could be discussed here: https://github.com/intake/intake-xarray/issues/87

Notes:

test_http_open_rasterio failing (https://github.com/intake/intake-xarray/blob/master/intake_xarray/tests/test_remote.py#L56) with

/home/runner/work/intake-xarray/intake-xarray/intake_xarray/base.py:69: in to_dask
    return self.read_chunked()
/home/runner/work/intake-xarray/intake-xarray/intake_xarray/base.py:44: in read_chunked
    self._load_metadata()
/usr/share/miniconda/envs/test_env/lib/python3.9/site-packages/intake/source/base.py:285: in _load_metadata
    self._schema = self._get_schema()
/home/runner/work/intake-xarray/intake-xarray/intake_xarray/raster.py:102: in _get_schema
    self._open_dataset()
/home/runner/work/intake-xarray/intake-xarray/intake_xarray/raster.py:90: in _open_dataset
    self._ds = xr.open_rasterio(files, chunks=self.chunks,
/usr/share/miniconda/envs/test_env/lib/python3.9/site-packages/xarray/backends/rasterio_.py:268: in open_rasterio
    import rasterio
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    """Rasterio"""
    from collections import namedtuple
    from contextlib import contextmanager
    import logging
    from logging import NullHandler
    from pathlib import Path
>   from rasterio._base import gdal_version
E   ImportError: /usr/share/miniconda/envs/test_env/lib/python3.9/site-packages/rasterio/../../../libgdal.so.30: undefined symbol: _ZN21GfxICCBasedColorSpace15buildTransformsEP8GfxState
martindurant commented 2 years ago

So close this and focus on the rasterio discussion?

raybellwaves commented 2 years ago

Closing this and moving to https://github.com/intake/intake-xarray/issues/87 for how to proceed for rasterio/rioxarray