Closed rolyp closed 3 years ago
@edwardchalstrey1 I'm finding comparing outputs as .json (Vega Lite) files a bit suboptimal. When we change our code, and the Vega Lite code changes as a result, it's not clear when the resulting image actually changes too. I'm going to experiment with generating .png or .svg (the latter would be better as it's a text format, and so can be more easily diffed), but I'll probably also retain the ability to generate/compare Vega Lite. (Comparing images will be problematic for other reasons, e.g. the actual change will often be much more obscure than a Vega Lite change.)
altair_saver
(locally) to save.png
brew install chromedriver
chromedriver
to be opened.png
file from chart.svg
instead of.png
.svg
saved previously.new.svg
files when they compare equalalt.renderers.enable('mimetype')
git
aliasesgit approve
git reject
[x] install
chromedriver
intomacos-10.15
GitHub runnerJSON-based (Vega-Lite) image comparison is nice and human-readable but the JSON encoding has too much intensional information. For example, adding an unused data transformation to an Altair image generates a different Vega-Lite specification, even though the image output is unchanged. Similarly if you rename a variable in the data transformation pipeline.
It might be worth reverting to PNG-based comparisons (as we used for Backfillz) for a more extensional notion of equivalence.