Skip to content

Move the figure test builds away from tox-conda#4271

Merged
Cadair merged 3 commits intosunpy:masterfrom
Cadair:pip_figure_tests
Jun 12, 2020
Merged

Move the figure test builds away from tox-conda#4271
Cadair merged 3 commits intosunpy:masterfrom
Cadair:pip_figure_tests

Conversation

@Cadair
Copy link
Member

@Cadair Cadair commented Jun 10, 2020

This hopefully makes it a lot easier for people to run the figure tests locally.

The reason we can now do this is that because matplotlib build binary wheels, they statically link the version of freetype in the wheel. This means that as long as tox installs matplotlib from wheels (which it should normally) we can be reasonably confident we get the right version of freetype. To make sure this is always the case, we have now put the version of freetype in the hash lib filename which means that if for some reason the wrong version of freetype is used it will fail to run the figure tests with "hash lib not found".

@dstansby pointed out that the hashes should be independant of python version, so we have removed that from the hash lib name, which means that you can now always run tox -e pyXX-figure and the correct version of mpl and astropy will be installed and then picked up in the name of the hash lib.

The only exception to this is the devdeps build, which will link against whatever freetype is available. I am half expecting this to fail on CI as soon as I push it.

matplotlib also neatly handles the freetype issue for installations from git. By default when building from git, it will download a tarball of freetype and compile against that, which is (currently?) the same version of freetype as the wheels. Therefore our freetype version checking should be sufficient for both the wheels and the dev build.

@pep8speaks
Copy link

pep8speaks commented Jun 10, 2020

Hello @Cadair! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 16:101: E501 line too long (102 > 100 characters)

Comment last updated at 2020-06-12 11:49:56 UTC

@Cadair Cadair force-pushed the pip_figure_tests branch from c845521 to 83fac5d Compare June 10, 2020 15:07
@nabobalis nabobalis added this to the 2.0 milestone Jun 10, 2020
@nabobalis nabobalis added backport 2.0 Infrastructure Issues or PRs that affect the CI or packaging. labels Jun 10, 2020
@nabobalis nabobalis self-requested a review June 10, 2020 16:07
@nabobalis nabobalis modified the milestones: 2.0, 2.1 Jun 10, 2020
@Cadair Cadair force-pushed the pip_figure_tests branch 3 times, most recently from 72e8dc9 to 7205253 Compare June 10, 2020 18:05
@Cadair Cadair added the No Changelog Entry Needed Skip all changelog checks. label Jun 10, 2020
@Cadair Cadair requested a review from dstansby June 10, 2020 18:21
@Cadair
Copy link
Member Author

Cadair commented Jun 10, 2020

I think this is ready for review.

Copy link
Contributor

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@dstansby
Copy link
Contributor

Could you give it a rebase just to check that the doc build works fine?

@Cadair Cadair force-pushed the pip_figure_tests branch from 382d160 to 0d9cf1d Compare June 12, 2020 11:27
@Cadair Cadair force-pushed the pip_figure_tests branch from 0d9cf1d to 5a57bcf Compare June 12, 2020 11:49
@Cadair
Copy link
Member Author

Cadair commented Jun 12, 2020

I am not confident in the stability of the devdeps figure hashes at the moment. I have therefore pulled the backport label until we have this in master for a while and see how it goes. We can add the label back and have this be backported at any point.

@Cadair Cadair added the Merge When CI Passes Hit that merge button when it's all green. label Jun 12, 2020
@Cadair Cadair merged commit 7260887 into sunpy:master Jun 12, 2020
@Cadair Cadair deleted the pip_figure_tests branch June 12, 2020 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Issues or PRs that affect the CI or packaging. Merge When CI Passes Hit that merge button when it's all green. No Changelog Entry Needed Skip all changelog checks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants