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

Upstream CI failures #620

Closed
kafitzgerald opened this issue Oct 16, 2024 · 4 comments · Fixed by #630
Closed

Upstream CI failures #620

kafitzgerald opened this issue Oct 16, 2024 · 4 comments · Fixed by #630
Assignees

Comments

@kafitzgerald
Copy link
Collaborator

We have several failures right now in Upstream CI. It's looks like they're coming from Matplotlib updates.

In particular the following examples are impacted:

  • NCL_xy_16.py
  • NCL_overlay_11b.py
  • NCL_hov_3.py
  • NCL_coneff_11.py
Log Unexpected failing examples (4):
../Gallery/XY/NCL_xy_16.py failed leaving traceback:

Traceback (most recent call last):
  File "/home/runner/work/geocat-examples/geocat-examples/Gallery/XY/NCL_xy_16.py", line 102, in <module>
    plt.legend(handles,
  File "/home/runner/micromamba/envs/geocat-examples/lib/python3.11/site-packages/matplotlib/pyplot.py", line 3593, in legend
    return gca().legend(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/geocat-examples/lib/python3.11/site-packages/matplotlib/axes/_axes.py", line 335, in legend
    self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/geocat-examples/lib/python3.11/site-packages/matplotlib/legend.py", line 462, in __init__
    if len(handles) < 2:
       ^^^^^^^^^^^^
TypeError: object of type 'list_reverseiterator' has no len()

../Gallery/Overlays/NCL_overlay_11b.py failed leaving traceback:

Traceback (most recent call last):
  File "/home/runner/work/geocat-examples/geocat-examples/Gallery/Overlays/NCL_overlay_11b.py", line 185, in <module>
    for col in cf.collections:
               ^^^^^^^^^^^^^^
AttributeError: 'GeoContourSet' object has no attribute 'collections'

../Gallery/Contours/NCL_hov_3.py failed leaving traceback:

Traceback (most recent call last):
  File "/home/runner/work/geocat-examples/geocat-examples/Gallery/Contours/NCL_hov_3.py", line 52, in <module>
    for i, collection in enumerate(cf.collections):
                                   ^^^^^^^^^^^^^^
AttributeError: 'QuadContourSet' object has no attribute 'collections'

../Gallery/Contours/NCL_coneff_11.py failed leaving traceback:

Traceback (most recent call last):
  File "/home/runner/work/geocat-examples/geocat-examples/Gallery/Contours/NCL_coneff_11.py", line 62, in <module>
    for i, collection in enumerate(p.collections):
                                   ^^^^^^^^^^^^^
AttributeError: 'QuadContourSet' object has no attribute 'collections'

@kafitzgerald kafitzgerald self-assigned this Oct 16, 2024
@kafitzgerald
Copy link
Collaborator Author

kafitzgerald commented Oct 16, 2024

I suspect it's because of these changes:

@kafitzgerald kafitzgerald added the blocked Work got blocked waiting the output of some other source/work label Oct 21, 2024
@kafitzgerald
Copy link
Collaborator Author

kafitzgerald commented Oct 21, 2024

This is blocked while we wait for the Matplotlib fix for different colored hatching to be backported to v3.9.x or until we do something like leverage packaging to check Matplotlib versions for us so we can support a broader range of Matplotlib versions. I'm starting to think we should just do this. I'll open a new issue to discuss / outline my thoughts.

@kafitzgerald
Copy link
Collaborator Author

It looks like like I missed the usage of collections in NCL_hov_3.py here:

cs.collections[3].set_linewidth(1)

That can get fixed along with the hatching and linewidth items below after the Matplotlib 3.9.3 release

for i, collection in enumerate(p.collections):
collection.set_edgecolor(colors[i % len(colors)])
collection.set_linewidth(0.)

@kafitzgerald kafitzgerald removed the blocked Work got blocked waiting the output of some other source/work label Dec 9, 2024
@kafitzgerald
Copy link
Collaborator Author

Looks like the matplotlib 3.9.3 release is out 🎉 so we should be able to more easily / robustly fix the rest of this.

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