Skip to content

CI add visual regression tests - #672

Draft
kroq-gar78 wants to merge 2 commits into
gallantlab:mainfrom
kroq-gar78:visual-regression-tests
Draft

CI add visual regression tests#672
kroq-gar78 wants to merge 2 commits into
gallantlab:mainfrom
kroq-gar78:visual-regression-tests

Conversation

@kroq-gar78

@kroq-gar78 kroq-gar78 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Previously the render test only asserted a PNG got written; a rendering regression could only be caught by a human looking at it. Now it compares all twelve dataview renders (quickflat + headless WebGL) against stored reference images, with tolerances validated by injecting a real regression (R/B channel swap), and runs by default.

References images (700 KiB, lossless WebP) were generated on main at 5af26a8 and are byte-identical to this branch's output.

Right now the reference images are prefixed with qs_ and wg_ , but this can be changed to match the renderers' actual names.

Test plan

  • pytest cortex/tests/test_webgl_headless.py
  • Confirmed tolerances catch an injected R/B channel swap regression
  • Confirmed references are byte-identical between main and this branch

Previously the test only asserted a PNG got written; a rendering
regression could only be caught by a human looking at it. Now it
compares all twelve dataview renders (quickflat + headless WebGL)
against stored references, with tolerances validated by injecting a
real regression (R/B channel swap), and runs by default.

Reference images are added in the next commit; a missing reference
skips rather than fails, checked before rendering.
700 KiB of lossless WebP: the six dataview classes rendered via
cortex.quickshow and cortex.export.plot_panels. Generated on main at
5af26a8 -- byte-identical to this branch's output, confirming the
dataset restructure changed nothing about what gets drawn.
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