Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI failures following Xarray 2024.11.0 #627

Closed
kafitzgerald opened this issue Dec 2, 2024 · 2 comments · Fixed by #628
Closed

CI failures following Xarray 2024.11.0 #627

kafitzgerald opened this issue Dec 2, 2024 · 2 comments · Fixed by #628
Assignees

Comments

@kafitzgerald
Copy link
Collaborator

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:

../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.

@kafitzgerald
Copy link
Collaborator Author

Yeah, it looks like this was fixed here, but hasn't yet been released: pydata/xarray#9835

@kafitzgerald
Copy link
Collaborator Author

I'm thinking it probably makes the most sense to address this here by updating our environment file(s) to avoid using this particular version of Xarray. This issue should be addressed in the next release, but that will allow our CI to pass in the meantime and hopefully avoid the issue for anyone trying to run these locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant