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

Add infrastructure for visual tests and first test(s) #360

Merged
merged 22 commits into from
Jun 23, 2023

Conversation

astrofrog
Copy link
Member

@astrofrog astrofrog commented Jun 22, 2023

This adds infrastructure to do visual tests using Solara

I've also made use of pytest-mpl which gives the following benefits:

  • Nice gallery generated for each PR showing any differences in reference images
  • Ability to store only the hashes in this repo and have reference images be automatically pushed to glue-jupyter-visual-tests

Note that we use CircleCI as in astropy because it allows the gallery to be hosted/rendered directly.

At the moment this requires a small hack which is to show the generated image in a Matplotlib figure but hopefully we can simplify things as mentioned in matplotlib/pytest-mpl#201

For now I also need to use a fork of Solara with widgetti/solara#167

Gallery preview: https://output.circle-artifacts.com/output/job/6d90ef24-a6a1-49e4-a7d0-fc5ac19e4b36/artifacts/0/results/fig_comparison.html

@astrofrog astrofrog force-pushed the visual-testing branch 4 times, most recently from 8028e87 to 170a9a8 Compare June 22, 2023 13:41
@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Patch coverage: 47.61% and project coverage change: -0.57 ⚠️

Comparison is base (9d44ed5) 89.58% compared to head (286f513) 89.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #360      +/-   ##
==========================================
- Coverage   89.58%   89.02%   -0.57%     
==========================================
  Files          86       88       +2     
  Lines        4697     4757      +60     
==========================================
+ Hits         4208     4235      +27     
- Misses        489      522      +33     
Impacted Files Coverage Δ
glue_jupyter/bqplot/scatter/tests/test_visual.py 27.27% <27.27%> (ø)
glue_jupyter/tests/helpers.py 55.26% <55.26%> (ø)
glue_jupyter/app.py 87.09% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@astrofrog astrofrog marked this pull request as ready for review June 23, 2023 10:42
@astrofrog astrofrog merged commit 07420ba into glue-viz:main Jun 23, 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.

1 participant