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
Output figure diff in test figure page #2681
Conversation
Hello @dstansby! Thanks for updating the PR.
Comment last updated on October 01, 2018 at 19:50 Hours UTC |
Thanks for the pull request @dstansby! Everything looks great! |
How would you feel about switching the other of the plots? Either old, new, diff or old, diff, new? |
Happy to change the order, maybe old diff new works best. |
As it stands in this PR doing |
Yes, I do think we want to be able to at least run the figure tests offline. |
@Cadair is there a way to work out when running the tests if the |
@dstansby I mean pytest will know, where do you want to do the check? |
@dstansby I worked out how to do it: def pytest_unconfigure(config):
try:
rd = config.getoption('remote_data')
except ValueError:
rd = 'none'
remotedata = rd == 'any' However, I think it's silly that we have to specify |
A general question about this: What happens if the baseline image hasn't been uploaded to the repo yet? It looks like in that case it might explode in quite a few places? |
I've added some code to handle baseline images not being available. |
.circleci/config.yml
Outdated
@@ -23,7 +23,7 @@ image-run: &image-tests | |||
command: | | |||
conda env list | |||
source activate sunpy-figure-tests-3.6 | |||
python setup.py test --figure-only --coverage | |||
python setup.py test --figure-only --coverage --online |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is needed any more.
I think this is basically good to go. It would be good to have a test or two for the HTML page comparison function? |
oh also a changelog |
@Cadair do your changes mean that the |
Yes, it will now connect to the internet irrespective of the online flag. Specifically for building the comparison page. (So the building should fail gracefully if the machine is offline) |
Hmm, but that seems a bit dishonest, if I don't pass the |
The idea of the Can we not just have the comparison builder attempt to download the images and fail gracefully, is this not the same effect as respecting |
👍 okay, I'm happy for this to go in as is. This is a gentle nudge that now Matplotlib 3.0 has just been released it would be nice to have this PR merged so we can see the differences in Sunpy test images with the new release. |
@dstansby Any chance of a changelog entry? I think this PR does warrant one. Also do we want to still add |
Requires remote data to download the baseline images to generate a diff, but I'm not sure if there's a way to avoid that?