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 support for Matplotlib 3.0.0 #1130

Merged
merged 5 commits into from
Nov 8, 2018
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Sep 25, 2018

This fixes one straightforward issue wrt Matplotlib 3.0.0 compatibility. Two issues still exist in Matplotlib (cf matplotlib/matplotlib#12288), so I don't think we will be able to support 3.0.0, but 3.0.1 should be okay.

Once those issues are fixed, there are only 2 or 3 image failures that I need to go through to see if they're okay.

@QuLogic QuLogic added this to the 0.17 milestone Sep 25, 2018
@QuLogic
Copy link
Member Author

QuLogic commented Sep 26, 2018

This is now okay with the v3.0.x branch of Matplotlib, with a slight patch to fix the above issues. So when 3.0.1 is out and added to the conda-forge testing label, this should be good to go.

@QuLogic
Copy link
Member Author

QuLogic commented Sep 26, 2018

Hmm, these new images should probably use the new default style since they will only be used by mpl>=2. I can add that, but we probably want to squash to remove the extra images.

Edit: This is what that might look like: 973a07a

.travis.yml Outdated
@@ -11,10 +11,10 @@ env:
# New FreeType causes changes in text output.
- NAME="Latest everything."
PYTHON_VERSION=3.6
PACKAGES="numpy matplotlib freetype<2.8 scipy"
PACKAGES="numpy matplotlib scipy"
Copy link
Member

Choose a reason for hiding this comment

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

How come no freetype?

Copy link
Member Author

Choose a reason for hiding this comment

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

The Matplotlib from the testing label uses a fixed copy of FreeType bundled into Matplotlib, so it will never change (at least until Matplotlib rebuilds all its images with a new version, which is unlikely unless some new comparison method is used.)

https://github.com/matplotlib/matplotlib/pull/1314
This function contains patches for Cartopy-specific behaviour, such as
using the transform for limit checks, applying longitude wrapping, etc.
See PATCH comments below.
Copy link
Member

Choose a reason for hiding this comment

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

Nice detail. It is appreciated.

@@ -46,6 +46,7 @@ install:
# Customise the testing environment
# ---------------------------------
- conda config --add channels conda-forge
- conda config --add channels conda-forge/label/testing
Copy link
Member

Choose a reason for hiding this comment

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

Can you send me a link to this please @QuLogic? I'm curious.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I see. That all makes a bit more sense now. Well This looks good to me, I guess we are just waiting for mpl 3.0.1.

Thanks for this @QuLogic, ping me when this can be merged and I'll press the button.

Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

Pending addressing the .travis.yml conflicts.

@dopplershift
Copy link
Contributor

@QuLogic So this is waiting on me to get the matplotlib 3.0.1 conda-forge testing packages up?

@QuLogic
Copy link
Member Author

QuLogic commented Oct 30, 2018

Yep; let me know when it's done and I'll push a rebase and some fixes.

@dopplershift
Copy link
Contributor

@QuLogic Packages should be up.

This bundles a fixed version of FreeType, so we won't need to worry
about those changes in test images.
_pcolormesh_patched is no longer used as a workaround for anything.

Closes SciTools#992.
This is due to an indexing error in previous versions,
cf. matplotlib/matplotlib#11455.
These changes are intended, with better selection of contour levels,
cf. matplotlib/matplotlib#11412.
@QuLogic QuLogic changed the title WIP: Fix support for Matplotlib 3.0.0 Fix support for Matplotlib 3.0.0 Nov 8, 2018
@QuLogic
Copy link
Member Author

QuLogic commented Nov 8, 2018

@corinnebosley @dopplershift OK, all set; we're just failing on #1171 now.

@dopplershift
Copy link
Contributor

I'll merge over CI and we can fix #1171 elsewhere.

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

Successfully merging this pull request may close these issues.

3 participants