GeoCAT-examples provides a gallery of visualization examples demonstrating how to reproduce plots from NCL Applications scripts with packages in Python. It also includes some longer form examples demonstrating how to use functionality from various GeoCAT packages.
The failures are only on runs using the new 2024.11.0 Xarray release and the errors look something like this:
../Gallery/Contours/NCL_color_1.py failed leaving traceback:
Traceback (most recent call last):
File "/Users/runner/work/geocat-examples/geocat-examples/Gallery/Contours/NCL_color_1.py", line 68, in <module>
U.plot.contour(ax=ax,
File "/Users/runner/micromamba/envs/geocat-examples/lib/python3.10/site-packages/xarray/plot/accessor.py", line 542, in contour
return dataarray_plot.contour(self._da, *args, **kwargs)
File "/Users/runner/micromamba/envs/geocat-examples/lib/python3.10/site-packages/xarray/plot/dataarray_plot.py", line 1577, in newplotfunc
cmap_params, cbar_kwargs = _process_cmap_cbar_kwargs(
File "/Users/runner/micromamba/envs/geocat-examples/lib/python3.10/site-packages/xarray/plot/utils.py", line 967, in _process_cmap_cbar_kwargs
cmap_params = _determine_cmap_params(**cmap_kwargs)
File "/Users/runner/micromamba/envs/geocat-examples/lib/python3.10/site-packages/xarray/plot/utils.py", line 315, in _determine_cmap_params
cmap, newnorm = _build_discrete_cmap(cmap, levels, extend, filled)
File "/Users/runner/micromamba/envs/geocat-examples/lib/python3.10/site-packages/xarray/plot/utils.py", line 95, in _build_discrete_cmap
pal = _color_palette(cmap, n_colors)
File "/Users/runner/micromamba/envs/geocat-examples/lib/python3.10/site-packages/xarray/plot/utils.py", line 149, in _color_palette
sns = attempt_import("seaborn")
File "/Users/runner/micromamba/envs/geocat-examples/lib/python3.10/site-packages/xarray/core/utils.py", line 1245, in attempt_import
raise ImportError(
ImportError: The seaborn package is required but could not be imported. Please install it with your package manager (e.g. conda or pip).
I suspect this is a bug that got introduced upstream and not actually that we're leveraging seaborn and missing an import, but want to double check before reporting this as an issue.
I didn't catch this until the pre-commit update PR failed, but it looks like CI has been failing since last week: https://github.com/NCAR/geocat-examples/actions/workflows/ci.yml
The failures are only on runs using the new 2024.11.0 Xarray release and the errors look something like this:
I suspect this is a bug that got introduced upstream and not actually that we're leveraging seaborn and missing an import, but want to double check before reporting this as an issue.