Skip to content
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

Unit tests and upcoming ggplot2 3.5.0 #9

Open
teunbrand opened this issue Feb 7, 2024 · 0 comments
Open

Unit tests and upcoming ggplot2 3.5.0 #9

teunbrand opened this issue Feb 7, 2024 · 0 comments

Comments

@teunbrand
Copy link

Hi there,

We have been preparing for a new release of ggplot2 and during a reverse dependency check, it became apparent that the prospective ggplot2 3.5.0 would break ggparallel's units tests.

The main culprit is this pattern of unit testing:

load(system.file("mtcars.rda", package="ggparallel")) # loads object test_mtcars_plot
built_saved <- ggplot2::ggplot_build(test_mtcars_plot)
test <- ggparallel(list("gear", "cyl"), data=mtcars)
build_now <- ggplot2::ggplot_build(test)

We don't recommend saving ggplot objects to disk, as it locks in internal code that may change between versions. While we attempt to keep the user-facing functions somewhat stable, we make no such promises about the internal code. For testing that plots still are the same, we recommend the vdiffr package.

Unfortunately, this issued showed up late on our radar and we plan to release ggplot2 3.5.0 on the 12th of February, so I do realise this is not entirely a timely notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant