diff --git a/NEWS.md b/NEWS.md index 850b8c9..300ec58 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,10 @@ The paramater `outline.type` from `ggplot2::geom_ribbon()` has been adapted to `geom_alluvium()` and `geom_flow()` with the same options and default. +## remove test dependency on {alluvial} + +The tests that use the `Refugees` data set from **alluvial** are now only run if that package is installed; see #131 and thanks to @MichaelChirico. + # ggalluvial 0.12.5 This patch fixes a bug involving the {dplyr} functions `first()` and `last()` that was shifted but not fixed in 0.12.4. Rather than being imported during build, they are accessed internally and thus imported during use. See issues #107 and #108 on GitHub for details. @@ -12,7 +16,7 @@ This patch fixes a bug involving the {dplyr} functions `first()` and `last()` th ## `linewidth` aesthetic (breaking change) -An upcoming release of *ggplot2* controls stroke width using the new `linewidth` aesthetic rather than `size`. This release adapts to this change internally by updating row and column layers as recommended here: +An upcoming release of **ggplot2** controls stroke width using the new `linewidth` aesthetic rather than `size`. This release adapts to this change internally by updating row and column layers as recommended here: ## Curve constructors diff --git a/tests/testthat/_snaps/geom-lode/geom-lode-one-axis.svg b/tests/testthat/_snaps/geom-lode/geom-lode-one-axis.svg index 278a646..cb8ab96 100644 --- a/tests/testthat/_snaps/geom-lode/geom-lode-one-axis.svg +++ b/tests/testthat/_snaps/geom-lode/geom-lode-one-axis.svg @@ -75,28 +75,28 @@ Class Freq - -Class + +Survived - + - - - - - -1st -2nd -3rd -Crew - -Survived + +No +Yes + +Class + + + + - + - -No -Yes + +1st +2nd +3rd +Crew `geom_lode`: one axis diff --git a/tests/testthat/test-geom-alluvium.r b/tests/testthat/test-geom-alluvium.r index 82a4735..864f16d 100644 --- a/tests/testthat/test-geom-alluvium.r +++ b/tests/testthat/test-geom-alluvium.r @@ -3,14 +3,10 @@ test_that("`geom_alluvium` draws correctly", { skip_on_cran() skip_if_not_installed("vdiffr") - skip_if_not_installed("alluvial") d1 <- as.data.frame(Titanic) a1 <- aes(y = Freq, axis1 = Class, axis2 = Sex, axis3 = Age, fill = Survived) a2 <- aes(y = Freq, axis1 = Class, axis2 = Sex) - d2 <- alluvial::Refugees - a3 <- aes(y = refugees, x = year, alluvium = country) - vdiffr::expect_doppelganger( "`geom_alluvium`: basic", ggplot(d1, a1) + geom_alluvium() @@ -21,6 +17,11 @@ test_that("`geom_alluvium` draws correctly", { geom_alluvium(aes(fill = Age), width = .4) + facet_wrap(~ Survived, scales = "fixed") ) + + skip_if_not_installed("alluvial") + + d2 <- alluvial::Refugees + a3 <- aes(y = refugees, x = year, alluvium = country) vdiffr::expect_doppelganger( "`geom_alluvium`: bump plot", ggplot(d2, a3) +