Closed dill closed 3 days ago
This is a bit of an infelicity with vdiffr; despite using SVG for the comparisons (so it's all just plain text comparisons), a myriad of system differences can cause minor differences (or major ones - sign differences on eigenvectors is one relevant example because I use thin plate splines in a lot of the tests). As such, these tests are most useful for me running tests locally to identify when something changes rather than for general use. However, you can't just do that with R packages (unless I shipped the package with no tests on CRAN). On GitHub I have managed to skip tests that cause problems on Ubuntu, Windows, or their macOS X runners, and likewise for CRAN, but I do this through skip_on_ci()
and skip_on_cran()
and a few skip_on_os()
calls, but I suspect a lot of the skipped tests on CI are failing on Debian for trivial reasons that would need me to add skip_on_os("linux")
.
The first plot comparison you show is a typical example of a failing test that will more than likely be in a decimal place of a coordinate of one of the graphical elements that is just not visible. The second plot comparison you show is most likely differences in the underlying fitted GAM between Debian on an Intel CPU (if you are running this on the laptop you had at ISEC) and my M3 Mac. There's not much I can about either of these kinds of failures.
I could perhaps do something more in https://github.com/gavinsimpson/gratia/blob/d7c32c3e52d152006c7db60eeb03b9f640bc2aa0/tests/testthat/helper-vdiffr.R to simply stop any vdiffr tests from running unless they're on my system (conditional on the system not being CRAN or a CI) but I'm not sure how that would affect checks on CRAN's winbuilder service and Simon Urbanek's MacOS X check server.
Aha! No worries, I was unaware of this issue! That seems like a totally reasonable approach to me given the constraints. I'm happy for this issue to be closed for the purposes of the review.
Running tests for the package on a Debian sid system (details at the bottom), I get failures on visual diffs of the plots.
I'm not familiar with
vdiffr
so not sure if this is expected or not?Looking at these, I don't see any differences in some plots (see below also). I thought it was an
mgcv
/scam
/ggplot2
version issue but re-installed from CRAN and got the following:Example "bad" plots:
old:
new:
another with an actual difference
old:
new:
Finally, some information, about my session (post-running
devtools::test()
):