Skip to content

Commit

Permalink
explain test conditional in news + update one visual regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
corybrunson committed Aug 10, 2024
1 parent ecf582c commit 64f6630
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/corybrunson/ggalluvial/issues/107> and #108 <https://github.com/corybrunson/ggalluvial/issues/108> on GitHub for details.
Expand All @@ -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: <https://www.tidyverse.org/blog/2022/08/ggplot2-3-4-0-size-to-linewidth/>
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: <https://www.tidyverse.org/blog/2022/08/ggplot2-3-4-0-size-to-linewidth/>

## Curve constructors

Expand Down
36 changes: 18 additions & 18 deletions tests/testthat/_snaps/geom-lode/geom-lode-one-axis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions tests/testthat/test-geom-alluvium.r
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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) +
Expand Down

0 comments on commit 64f6630

Please sign in to comment.