You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're in the process of preparing a ggplot2 release. As part of the release process, we run the R CMD check on packages that use ggplot2 to make sure we don't accidentally break code for downstream packages.
In running the R CMD check on MTLR, we identified the following issue:
checking tests ...
ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
Component "theme": Component 20: target is NULL, current is margin
Component "theme": Component 21: target is NULL, current is unit
Component "theme": Component 22: Modes: list, NULL
...
══ testthat results ═══════════════════════════════════════════════════════════
OK: 84 SKIPPED: 2 WARNINGS: 35 FAILED: 5
1. Failure: print and plot functions are consistent for basic survival dataset (@test-method.R#15)
2. Failure: plotcurves function is consistent (@test-plotcurves.R#13)
3. Failure: plotcurves function is consistent (@test-plotcurves.R#14)
4. Failure: plotcurves function is consistent (@test-plotcurves.R#15)
5. Failure: plotcurves function is consistent (@test-plotcurves.R#16)
Error: testthat unit tests failed
Execution halted
These failures are because MTLR is testing the internal structure of ggplot object. This is, in short, a bad idea. In particular, this practice makes it difficult for us to improve ggplot2 without causing your tests to fail.
We suggest testing the output of ggplot2 in using the vdiffr package, which is a tool to manage visual test cases (this is how we test ggplot2). If changes in ggplot2 or your code introduce a change in the visual output of a ggplot, tests will fail when you run them locally. You can use vdiffr as follows:
test_that("output of ggplot() is stable", {
vdiffr::expect_doppelganger("A blank plot", ggplot())
})
Let me know if I can help! We are hoping to release the next version of ggplot2 in the next two weeks.
The text was updated successfully, but these errors were encountered:
Thanks for letting me know about vdiffr! That is a much more elegant solution for checking the consistency of my plots. Sorry for not getting to this sooner. I changed all the tests to use vdiffr now when testing against the plots.
We're in the process of preparing a ggplot2 release. As part of the release process, we run the R CMD check on packages that use ggplot2 to make sure we don't accidentally break code for downstream packages.
In running the R CMD check on MTLR, we identified the following issue:
These failures are because MTLR is testing the internal structure of ggplot object. This is, in short, a bad idea. In particular, this practice makes it difficult for us to improve ggplot2 without causing your tests to fail.
We suggest testing the output of ggplot2 in using the vdiffr package, which is a tool to manage visual test cases (this is how we test ggplot2). If changes in ggplot2 or your code introduce a change in the visual output of a ggplot, tests will fail when you run them locally. You can use vdiffr as follows:
Let me know if I can help! We are hoping to release the next version of ggplot2 in the next two weeks.
The text was updated successfully, but these errors were encountered: