-
Notifications
You must be signed in to change notification settings - Fork 37
Description
In relation to #126 could testthat support compressed svgs produced by {svglite}? It seems that it should be pretty simple to decompress the svg in testthat::compare_file_text using gzfile() of gzcon(), so {brio} doesn't need to support gz compressed files natively. I haven't looked what might be required in the shiny app to review snapshots.
The main use case for this is massively reducing the filesize of SVG snapshots produced by {vdiffr}. This is causing issues with the size of the tarball produced by R CMD build, which are being flagged by CRAN's incoming checks.
Why do we have such large SVGs? Checking these images produced from statistical models seems very sensitive to small differences in the fitted model due to OS differences etc, that go away with larger data. But then plotting outputs from these models often involves plotting data, which inflates the sizes of resulting plots. Regardless, reducing the file size of SVG snapshots would be good in terms of CRAN's policy on retention of package sources.
If you agree this is useful, would it be best to limit such a change to supporting only compressed svg or allowing tests of compressed text files more generally? Only gz compression or others? I'd happily produce a PR implementing the above if there is interest.