csdaw / ggprism

ggplot2 extension inspired by GraphPad Prism
https://csdaw.github.io/ggprism/
169 stars 21 forks source link

Issue with the next release of ggplot2 #8

Closed thomasp85 closed 3 years ago

thomasp85 commented 3 years ago

Hi

We are preparing the next version of ggplot2 and our tests show that ggprism is having issues with it. Specifically we now store the computed params in computed_geom_params and computed_stat_params. This means that these are the field you should be expecting in your tests if you feel it necessary to peek into the ggplot object.

The failing tests are:

----- FAILED[data]: test-annotation_ticks.R<66--66>
call| expect_true(g1$layers[[2]]$geom_params$colour == "red")
diff| Expected TRUE, got 'logical' of length 0
----- FAILED[data]: test-annotation_ticks.R<69--69>
call| expect_true(g2$layers[[2]]$geom_params$colour == "red")
diff| Expected TRUE, got 'logical' of length 0

where you should look at g1$layers[[2]]$computed_geom_params$colour instead

we plan to release the next version of ggplot2 on May 31st

csdaw commented 3 years ago

Thanks for the heads up 😄
Should be easy enough to write some alternative tests that don't require peeking into params, which will work with the current and next version of ggplot2.