Skip to content

Fig test slice #113

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

Merged
merged 7 commits into from
May 17, 2023
Merged

Fig test slice #113

merged 7 commits into from
May 17, 2023

Conversation

ruaridhg
Copy link
Collaborator

@ruaridhg ruaridhg commented May 15, 2023

Towards #8

  • Added baseline folder with test images to gitignore
  • test_slice used 3D brain data from ski image
  • needed to change backend_qt5agg to backend_qtagg (not sure if this is something we want in the base.py since the change was just for testing)

@ruaridhg ruaridhg marked this pull request as ready for review May 15, 2023 14:17
@ruaridhg ruaridhg requested review from dstansby and samcunliffe May 15, 2023 14:17
Copy link
Member

@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.

The test is now skipped during testing, and it shouldn't be skipped. (e.g. see https://github.com/matplotlib/napari-matplotlib/actions/runs/4981454254/jobs/8915726820?pr=113#step:7:42)

I suspect this is because there aren't any baseline images? Instead of gitignoring the test image folder, I think we decided to upload the test images to the repo, so the gitignore needs changing, and the baseline test images adding.

@ruaridhg
Copy link
Collaborator Author

The test is now skipped during testing, and it shouldn't be skipped. (e.g. see https://github.com/matplotlib/napari-matplotlib/actions/runs/4981454254/jobs/8915726820?pr=113#step:7:42)

I suspect this is because there aren't any baseline images? Instead of gitignoring the test image folder, I think we decided to upload the test images to the repo, so the gitignore needs changing, and the baseline test images adding.

Locally it seems to skip the first time when creating the baseline image and then it works as expected the 2nd time, but clearly is not the case for tox so will investigate further. Yes, I remember now and I've found a 3D image that works then makes sense to remove from gitignore.

@dstansby
Copy link
Member

👍 - I think the two things that need doing then are:

  • Commit the test images to the git repository
  • Make sure the test images are available to tox. It might be you need to copy them from the root of the repostiory to the tox environment with a command in the tox file that looks like:
    cp {toxinidir}/path/to/figures/in/repo {envdir}/path/to/figures/in/repo
    (I got the tox variables in curly brackets from https://tox.wiki/en/latest/config.html)

Copy link
Member

@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.

The test is still being skipped, I'm guessing because it still isn't finding the test image?

@ruaridhg
Copy link
Collaborator Author

The test is still being skipped, I'm guessing because it still isn't finding the test image?

Yes, I've not got it quite working yet as using tox locally, the test_slice is being skipped due to Unable to download data/brain.tiff so I need to locate that and copy it over to tox

@ruaridhg
Copy link
Collaborator Author

@dstansby Turns out python -c 'from skimage import data; data.brain()' was the command needed to make the data available to tox. Should be fine to merge now, however Read the Docs build failed

@dstansby dstansby added this pull request to the merge queue May 17, 2023
@dstansby dstansby mentioned this pull request May 17, 2023
6 tasks
Merged via the queue into matplotlib:main with commit e8c276c May 17, 2023
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