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

fix(export_contours/f): support matplotlib 3.8+ #1951

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Sep 16, 2023

See this comment for context

@codecov
Copy link

codecov bot commented Sep 16, 2023

Codecov Report

Merging #1951 (5a41f5c) into develop (2fa32da) will increase coverage by 0.0%.
Report is 1 commits behind head on develop.
The diff coverage is 92.0%.

@@           Coverage Diff            @@
##           develop   #1951    +/-   ##
========================================
  Coverage     72.6%   72.6%            
========================================
  Files          257     257            
  Lines        57711   57812   +101     
========================================
+ Hits         41927   42020    +93     
- Misses       15784   15792     +8     
Files Changed Coverage Δ
flopy/export/utils.py 66.4% <92.0%> (+1.7%) ⬆️

... and 1 file with indirect coverage changes

@wpbonelli wpbonelli force-pushed the mpl-contours branch 2 times, most recently from c3c95ea to a9f7c94 Compare September 19, 2023 03:13
* ContourSet.get_paths() returns one path per level
* path may contain multiple disconnected components
* walk contour components to determine connectivity
@wpbonelli wpbonelli changed the title test(export_contours): debug mpl 3.8 issue fix(export_contours/f): support matplotlib 3.8+ Sep 19, 2023
@wpbonelli wpbonelli marked this pull request as ready for review September 19, 2023 03:44
Copy link
Contributor

@langevin-usgs langevin-usgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @wpbonelli, this looks good. Too bad about having to handle versions differently, but seems appropriate for now, at least until pre-matplotlib 3.8 is deprecated. Only real comment is the string check on the matplotlib version. We should keep our eyes out for a lightweight generic python package that can create contours from regularly and irregularly spaced data. I poked around but no luck.

@wpbonelli
Copy link
Member Author

wpbonelli commented Sep 19, 2023

@langevin-usgs it looks like MPL uses contourpy, maybe we could drop down to that directly in the longer term?

In the meantime, a patch release seems in order after this merges, for interim support for all MPL versions

@wpbonelli wpbonelli merged commit 9e9d730 into modflowpy:develop Sep 19, 2023
21 checks passed
@wpbonelli wpbonelli deleted the mpl-contours branch September 19, 2023 15:45
@langevin-usgs
Copy link
Contributor

@wpbonelli, seems like considering contourpy for this in the future would be worth exploring, but not a high priority. Agree with a patch release. Thanks for fixing.

wpbonelli added a commit that referenced this pull request Sep 30, 2023
* ContourSet.get_paths() returns one path per level
* path may contain multiple disconnected components
* walk contour components to determine connectivity
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 this pull request may close these issues.

bug: export_contours broken with matplotlib 3.8
2 participants