From d4bfdb996bc1406f9aa7f81cb824fda185a2c319 Mon Sep 17 00:00:00 2001 From: jgabry Date: Thu, 26 Mar 2026 13:56:36 -0400 Subject: [PATCH 1/2] fix long file paths leading to r cmd check NOTE --- .gitignore | 1 + tests/testthat/test-ppc-discrete.R | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 695e6e77..f34560fe 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ release-prep.R # vscode/positron/etc settings .vscode/* +Rplots.pdf diff --git a/tests/testthat/test-ppc-discrete.R b/tests/testthat/test-ppc-discrete.R index 114f4886..7b0a6471 100644 --- a/tests/testthat/test-ppc-discrete.R +++ b/tests/testthat/test-ppc-discrete.R @@ -187,7 +187,7 @@ test_that("ppc_rootogram renders correctly", { ) vdiffr::expect_doppelganger( - title = "ppc_rootogram (style='hanging', prob, size)", + title = "ppc_rootogram (hanging,prob,size)", fig = p_custom_hanging) p_discrete <- ppc_rootogram( @@ -199,7 +199,7 @@ test_that("ppc_rootogram renders correctly", { ) vdiffr::expect_doppelganger( - title = "ppc_rootogram (style='discrete', prob, size)", + title = "ppc_rootogram (discrete,prob,size)", fig = p_discrete) p_discrete_nonbound <- ppc_rootogram( @@ -212,7 +212,7 @@ test_that("ppc_rootogram renders correctly", { ) vdiffr::expect_doppelganger( - title = "ppc_rootogram ('discrete', bound_distinct=FALSE)", + title = "ppc_rootogram (discrete,bound_distinct=FALSE)", fig = p_discrete_nonbound) }) @@ -235,7 +235,7 @@ test_that("ppc_rootogram_grouped renders correctly", { ) vdiffr::expect_doppelganger( - title = "ppc_rootogram_grouped (style='hanging', prob, size, facet_args)", + title = "ppc_rootogram_grouped (hanging,prob,size,facet_args)", fig = p_custom_hanging) p_discrete <- ppc_rootogram_grouped( @@ -248,9 +248,9 @@ test_that("ppc_rootogram_grouped renders correctly", { ) vdiffr::expect_doppelganger( - title = "ppc_rootogram_grouped (style='discrete', prob, size)", + title = "ppc_rootogram_grouped (discrete,prob,size)", fig = p_discrete) - + p_discrete_multirow <- ppc_rootogram_grouped( y = vdiff_y2, yrep = vdiff_yrep2, @@ -262,9 +262,9 @@ test_that("ppc_rootogram_grouped renders correctly", { ) vdiffr::expect_doppelganger( - title = "ppc_rootogram_grouped (style='discrete', facet_args=list(nrow=2))", + title = "ppc_rootogram_grouped (discrete,facet_args)", fig = p_discrete_multirow) - + p_discrete_multirow_freescale <- ppc_rootogram_grouped( y = vdiff_y2, yrep = vdiff_yrep2, @@ -276,7 +276,7 @@ test_that("ppc_rootogram_grouped renders correctly", { ) vdiffr::expect_doppelganger( - title = "ppc_rootogram_grouped (style='discrete', facet_args=list(nrow=2, scales='free'))", + title = "ppc_rootogram_grouped (discrete,nrow=2,scales=free)", fig = p_discrete_multirow_freescale) }) From 8ce2187c5476ad6bb21fab09e32561c63032af76 Mon Sep 17 00:00:00 2001 From: jgabry Date: Thu, 26 Mar 2026 14:17:47 -0400 Subject: [PATCH 2/2] update snapshots --- ...ootogram-discrete-bound-distinct-false.svg | 2 +- ...g => ppc-rootogram-discrete-prob-size.svg} | 2 +- ...-rootogram-grouped-discrete-facet-args.svg | 159 +++++++++++++++++ ...am-grouped-discrete-nrow-2-scales-free.svg | 165 ++++++++++++++++++ ...c-rootogram-grouped-discrete-prob-size.svg | 161 +++++++++++++++++ ...m-grouped-hanging-prob-size-facet-args.svg | 127 ++++++++++++++ ...vg => ppc-rootogram-hanging-prob-size.svg} | 2 +- 7 files changed, 615 insertions(+), 3 deletions(-) rename tests/testthat/_snaps/ppc-discrete/{ppc-rootogram-style-discrete-prob-size.svg => ppc-rootogram-discrete-prob-size.svg} (98%) create mode 100644 tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-facet-args.svg create mode 100644 tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-nrow-2-scales-free.svg create mode 100644 tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-prob-size.svg create mode 100644 tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-hanging-prob-size-facet-args.svg rename tests/testthat/_snaps/ppc-discrete/{ppc-rootogram-style-hanging-prob-size.svg => ppc-rootogram-hanging-prob-size.svg} (98%) diff --git a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-discrete-bound-distinct-false.svg b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-discrete-bound-distinct-false.svg index 515ea491..2b1d8a20 100644 --- a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-discrete-bound-distinct-false.svg +++ b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-discrete-bound-distinct-false.svg @@ -78,6 +78,6 @@ r e p -ppc_rootogram ('discrete', bound_distinct=FALSE) +ppc_rootogram (discrete,bound_distinct=FALSE) diff --git a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-style-discrete-prob-size.svg b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-discrete-prob-size.svg similarity index 98% rename from tests/testthat/_snaps/ppc-discrete/ppc-rootogram-style-discrete-prob-size.svg rename to tests/testthat/_snaps/ppc-discrete/ppc-rootogram-discrete-prob-size.svg index 8df07504..4901cd37 100644 --- a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-style-discrete-prob-size.svg +++ b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-discrete-prob-size.svg @@ -92,6 +92,6 @@ r e p -ppc_rootogram (style='discrete', prob, size) +ppc_rootogram (discrete,prob,size) diff --git a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-facet-args.svg b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-facet-args.svg new file mode 100644 index 00000000..2ba1d181 --- /dev/null +++ b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-facet-args.svg @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 + + + + + + + + + +1 + + + + + + + + + +0 +1 +2 +3 +4 +5 + + + + + + + + +0.0 +2.5 +5.0 +7.5 + + + + + +0.0 +2.5 +5.0 +7.5 + + + + +y +Count +y + +w +i +t +h +i +n + +b +o +u +n +d +s + + +In +Out + + +y +r +e +p +ppc_rootogram_grouped (discrete,facet_args) + + diff --git a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-nrow-2-scales-free.svg b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-nrow-2-scales-free.svg new file mode 100644 index 00000000..345b3f63 --- /dev/null +++ b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-nrow-2-scales-free.svg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 + + + + + + + + + +1 + + + + + + + + +0 +1 +2 +3 +4 + + + + + + + +0 +1 +2 +3 +4 +5 + +0.0 +2.5 +5.0 +7.5 + + + + + +0 +2 +4 +6 +8 + + + + + +y +Count +y + +w +i +t +h +i +n + +b +o +u +n +d +s + + +In +Out + + +y +r +e +p +ppc_rootogram_grouped (discrete,nrow=2,scales=free) + + diff --git a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-prob-size.svg b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-prob-size.svg new file mode 100644 index 00000000..dfc34db8 --- /dev/null +++ b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-discrete-prob-size.svg @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 + + + + + + + + + +2 + + + + + + + + + +0 +1 +2 +3 +4 +5 + + + + + + + +0 +1 +2 +3 +4 +5 + + + + + + +0.0 +2.5 +5.0 +7.5 + + + + +y +Count +y + +w +i +t +h +i +n + +b +o +u +n +d +s + + +In +Out + + +y +r +e +p +ppc_rootogram_grouped (discrete,prob,size) + + diff --git a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-hanging-prob-size-facet-args.svg b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-hanging-prob-size-facet-args.svg new file mode 100644 index 00000000..3a6cc1ad --- /dev/null +++ b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-grouped-hanging-prob-size-facet-args.svg @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 + + + + + + + + + +1 + + + + + + +0 +2 +4 + +-1 +0 +1 +2 +3 + + + + + + +-1 +0 +1 +2 +3 + + + + + +y + +C +o +u +n +t + +Observed + + +Expected +ppc_rootogram_grouped (hanging,prob,size,facet_args) + + diff --git a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-style-hanging-prob-size.svg b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-hanging-prob-size.svg similarity index 98% rename from tests/testthat/_snaps/ppc-discrete/ppc-rootogram-style-hanging-prob-size.svg rename to tests/testthat/_snaps/ppc-discrete/ppc-rootogram-hanging-prob-size.svg index c9cfa081..97eb38fc 100644 --- a/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-style-hanging-prob-size.svg +++ b/tests/testthat/_snaps/ppc-discrete/ppc-rootogram-hanging-prob-size.svg @@ -68,6 +68,6 @@ Expected -ppc_rootogram (style='hanging', prob, size) +ppc_rootogram (hanging,prob,size)