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

Render mpl test images without text #246

Merged
merged 1 commit into from
Jun 24, 2017
Merged

Conversation

TimoRoth
Copy link
Member

@TimoRoth TimoRoth commented Jun 24, 2017

Can't really think of any automatic approach for this.
matplotlib can even come with its own statically linked version, so checking the system version is pointless.

@fmaussion
Copy link
Member

I'm not very enthusiastic about this. When we add a new test we'll have to generate the baselines for the two versions, which seems complicated.

I see another way out: we could also generate the images without text (https://github.com/matplotlib/pytest-mpl#removing-text) and put them in a no-text baseline directory. When required, the tests should then compare without text.

@TimoRoth
Copy link
Member Author

The weird thing about this is that this change happened with freetype 2.7, which is around for quite a while. Ubuntu just never bothered to update from 2.6.3. Even 17.10 will still have 2.6.3.

Just not rendering test seems a good solution to me. Should the no-text version be the default then? It's not really possible to detect which version of freetype is being used.

@TimoRoth TimoRoth changed the title Add baseline images for freetype >=2.7.0 Render mpl test images without text Jun 24, 2017
@TimoRoth
Copy link
Member Author

Hm, this is bad. Even though the text is gone, the freetype version still changes the layout of things, breaking a lot of the tests. This is a horrible mess, and I'm not sure how to approach this. Freetype 2.6.3 is ancient by now and should really not be around anymore, but Ubuntu keeps it for some reason.

I guess this was the original intention, and also actually works?
@TimoRoth
Copy link
Member Author

I need to think about this some more, just merging the trivial duplicate-file sample-data fix for now.

@fmaussion
Copy link
Member

Maybe we should see if the mpl folks are aware of the problem.

Could we avoid using freetype altogether, by selecting another font for the plots?

@TimoRoth
Copy link
Member Author

TimoRoth commented Jun 25, 2017 via email

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.

2 participants