Open neutrinoceros opened 2 hours ago
I also note that datatree was last released in 2011 and that I can't build it on Apple Silicon, so I'd like to ask whether it'd be possible to not depend on it at all ?
@neutrinoceros I can't speak for the maintainers here, but datatree is a major building block of the new CfRadial2/FM301 based datamodel pyart will eventually converge to. The former experimental implementation in https://github.com/xarray-contrib/datatree (which has a recent 0.0.15 version) has been merge/transformed into xarray codebase as of xarray 2024.10.0
as long as there's a portable solution I'm happy to use it
Yes, be sure to use https://pypi.org/project/xarray-datatree/ not https://pypi.org/project/datatree/.
note that adding
diff --git a/requirements.txt b/requirements.txt
index cec08287..edde1d57 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,3 +13,4 @@ mda-xdrlib
xarray
cartopy
pint
+xarray-datatree
I still get an error when running python -c "from pyart import io"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/clm/dev/pyart/pyart/__init__.py", line 29, in <module>
from . import (
File "/Users/clm/dev/pyart/pyart/xradar/__init__.py", line 1, in <module>
from .accessor import Xradar, Xgrid # noqa
File "/Users/clm/dev/pyart/pyart/xradar/accessor.py", line 8, in <module>
import datatree
File "/Users/clm/dev/pyart/.venv/lib/python3.10/site-packages/datatree/__init__.py", line 2, in <module>
from .datatree import DataTree
File "/Users/clm/dev/pyart/.venv/lib/python3.10/site-packages/datatree/datatree.py", line 33, in <module>
from xarray.core.utils import (
ImportError: cannot import name 'HybridMappingProxy' from 'xarray.core.utils' (/Users/clm/dev/pyart/.venv/lib/python3.10/site-packages/xarray/core/utils.py)
Description
installing pyart in a fresh env appears to be currently broken, because some modules depend on
datatree
, which is not declared as an explicit dependency. I'm assuming this is an oversight from #1622What I Did