-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use CRAN vdiffr #3054
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
Use CRAN vdiffr #3054
Conversation
It is not necessary to set |
Thanks, I need to learn about vdiffr more...
I set ggplot2/tests/testthat/helper-vdiffr.R Lines 1 to 2 in 2b00ea7
|
Confirmed the visual changes are detected properly with the new settings. https://travis-ci.org/tidyverse/ggplot2/builds/475155850 |
LGTM! But let's wait until Claus has time to take another look, since he worked on the Travis settings last time. |
tests/testthat/helper-vdiffr.R
Outdated
} | ||
# vdiffr ignores failures when | ||
# - VDIFFR_RUN_TESTS is "false" (on Travis CI with older versions and dev version of R) | ||
# - CI is not set (on CRAN) | ||
|
||
# disable vdiffr if version is old | ||
if (!requireNamespace("vdiffr", quietly = TRUE) || | ||
utils::packageVersion("vdiffr") < "0.2.3.9001") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be < "0.3.0"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this if
can be removed entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, maybe I was too defensive.
Looks good to me to. @lionel- When vdiffr is disabled, does |
Yup that's how it works. The SVGs are always generated no matter what, so we still get hard failures when the plot doesn't build properly, and we can still use |
I removed the |
Thanks for reviewing! |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Since vdiffr 0.3.0 is released, let's
switch vdiffr from the GitHub version to the CRAN version and(Travis already uses CRAN version of vdiffr since this commit: 9f1904d)VDIFFR_RUN_TESTS
envvar, which vdiffr checks directly, instead ofUSE_VDIFFR
envvarNote that it seems still better to check the version of vdiffr since we ignore the installation failure of suggested packages by_R_CHECK_FORCE_SUGGESTS_=false
.