From ba80c00c00c2b2a7d84612013166ac91e7d87800 Mon Sep 17 00:00:00 2001 From: Daniel Sjoberg Date: Wed, 21 Jun 2023 15:36:55 -0700 Subject: [PATCH] snap updates (#156) * snap updates * Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- man/ggsurvfit-package.Rd | 4 +- man/survfit2.Rd | 1 + .../cuminc3-ggcuminc-sf-all-outcomes.svg | 50 +++++++++---------- tests/testthat/test-add_censor_mark.R | 12 ++--- tests/testthat/test-add_confidence_interval.R | 4 +- tests/testthat/test-add_quantile.R | 12 ++--- tests/testthat/test-add_risktable.R | 16 +++--- tests/testthat/test-ggcuminc.R | 4 +- tests/testthat/test-ggsurvfit.R | 4 +- tests/testthat/test-stat_stepribbon.R | 4 +- 11 files changed, 57 insertions(+), 56 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 74150353..c6754eb2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,7 +6,7 @@ -------------------------------------------------------------------------------- -Reviewer Checklist (if item does not apply, mark is as complete) +Reviewer Checklist (if item does not apply, mark as complete) - [ ] Ensure all package dependencies are installed by running `renv::install()` - [ ] PR branch has pulled the most recent updates from master branch. Ensure the pull request branch and your local version match and both have the latest updates from the master branch. diff --git a/man/ggsurvfit-package.Rd b/man/ggsurvfit-package.Rd index 2dabc7db..cbd72fce 100644 --- a/man/ggsurvfit-package.Rd +++ b/man/ggsurvfit-package.Rd @@ -13,9 +13,9 @@ Ease the creation of time-to-event (i.e. survival) endpoint figures. The modular \seealso{ Useful links: \itemize{ - \item \url{https://github.com/ddsjoberg/ggsurvfit} + \item \url{https://github.com/pharmaverse/ggsurvfit} \item \url{http://www.danieldsjoberg.com/ggsurvfit/} - \item Report bugs at \url{https://github.com/ddsjoberg/ggsurvfit/issues} + \item Report bugs at \url{https://github.com/ddsjoberg/pharmaverse/issues} } } diff --git a/man/survfit2.Rd b/man/survfit2.Rd index b70bac5f..5d1582b9 100644 --- a/man/survfit2.Rd +++ b/man/survfit2.Rd @@ -59,6 +59,7 @@ survfit2(formula, ...) a variable giving the type of event. This has been superseded by multi-state Surv objects and is deprecated; see example below. } + \item{\code{model}}{include a copy of the model frame in the output} \item{\code{error}}{this argument is no longer used} }} } diff --git a/tests/testthat/_snaps/ggcuminc/cuminc3-ggcuminc-sf-all-outcomes.svg b/tests/testthat/_snaps/ggcuminc/cuminc3-ggcuminc-sf-all-outcomes.svg index b6f32e9e..b6434154 100644 --- a/tests/testthat/_snaps/ggcuminc/cuminc3-ggcuminc-sf-all-outcomes.svg +++ b/tests/testthat/_snaps/ggcuminc/cuminc3-ggcuminc-sf-all-outcomes.svg @@ -83,32 +83,32 @@ 25 Months to Death/Censor Cumulative Incidence - + - - - -death from cancer -death other causes - - - - - - - - - - - - - -Drug A, I -Drug A, II -Drug A, III -Drug B, I -Drug B, II -Drug B, III + + + + + + + + + + + +Drug A, I +Drug A, II +Drug A, III +Drug B, I +Drug B, II +Drug B, III + + + + + +death from cancer +death other causes cuminc3-ggcuminc_sf-all-outcomes diff --git a/tests/testthat/test-add_censor_mark.R b/tests/testthat/test-add_censor_mark.R index 05d40cf4..ac6c5bd6 100644 --- a/tests/testthat/test-add_censor_mark.R +++ b/tests/testthat/test-add_censor_mark.R @@ -10,8 +10,8 @@ test_that("add_censor_mark() works with ggsurvfit()", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("sf1-censor_mark", lst_survfit2_censor_mark[[1]]) vdiffr::expect_doppelganger("sf2-censor_mark", lst_survfit2_censor_mark[[2]]) @@ -44,8 +44,8 @@ test_that("add_censor_mark() works with ggcuminc()", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("cuminc1-censor_mark", lst_cuminc_censor_mark[[1]]) vdiffr::expect_doppelganger("cuminc2-censor_mark", lst_cuminc_censor_mark[[2]]) @@ -60,8 +60,8 @@ test_that("add_censor_mark() works with ggcuminc()", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("cuminc1-censor_mark-all-outcomes", lst_cuminc_censor_mark_outcome[[1]]) vdiffr::expect_doppelganger("cuminc2-censor_mark-all-outcomes", lst_cuminc_censor_mark_outcome[[2]]) diff --git a/tests/testthat/test-add_confidence_interval.R b/tests/testthat/test-add_confidence_interval.R index e59506e0..1055f07f 100644 --- a/tests/testthat/test-add_confidence_interval.R +++ b/tests/testthat/test-add_confidence_interval.R @@ -75,8 +75,8 @@ test_that("add_confidence_interval() works with ggcuminc() and multiple outcomes NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("cuminc1-confidence_interval-all-outcomes", lst_cuminc_confidence_interval_outcomes[[1]]) diff --git a/tests/testthat/test-add_quantile.R b/tests/testthat/test-add_quantile.R index a210c15c..bd4f1cd5 100644 --- a/tests/testthat/test-add_quantile.R +++ b/tests/testthat/test-add_quantile.R @@ -58,8 +58,8 @@ test_that("add_quantile() works with ggsurvfit()", { ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("sf1-quantile", lst_survfit2_quantile[[1]]) vdiffr::expect_doppelganger("sf2-quantile", lst_survfit2_quantile[[2]]) @@ -151,8 +151,8 @@ test_that("add_quantile() works with ggcuminc()", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("cuminc1-quantile", lst_cuminc_quantile[[1]]) vdiffr::expect_doppelganger("cuminc2-quantile", lst_cuminc_quantile[[2]]) @@ -167,8 +167,8 @@ test_that("add_quantile() works with ggcuminc() and multiple outcomes", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("cuminc1-quantile-all-outcomes", lst_cuminc_quantile_outcomes[[1]]) vdiffr::expect_doppelganger("cuminc2-quantile-all-outcomes", lst_cuminc_quantile_outcomes[[2]]) diff --git a/tests/testthat/test-add_risktable.R b/tests/testthat/test-add_risktable.R index eb7de49e..adc77903 100644 --- a/tests/testthat/test-add_risktable.R +++ b/tests/testthat/test-add_risktable.R @@ -87,8 +87,8 @@ test_that("add_risktable() works with ggsurvfit()", { ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("sf1-risktable", lst_survfit2_risktable[[1]]) vdiffr::expect_doppelganger("sf2-risktable", lst_survfit2_risktable[[2]]) @@ -164,8 +164,8 @@ test_that("add_risktable() works with ggcuminc()", { ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("cuminc1-risktable", lst_cuminc_risktable[[1]]) vdiffr::expect_doppelganger("cuminc2-risktable", lst_cuminc_risktable[[2]]) @@ -180,8 +180,8 @@ test_that("add_risktable() works with ggcuminc() and multiple outcomes", { NA, ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("cuminc1-risktable-all-outcomes", lst_cuminc_risktable_outcomes[[1]]) vdiffr::expect_doppelganger("cuminc2-risktable-all-outcomes", lst_cuminc_risktable_outcomes[[2]]) @@ -244,8 +244,8 @@ test_that("add_risktable() custom stats", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("sf1-risktable-custom-stats-and-label", lst_custom_stats[[1]]) vdiffr::expect_doppelganger("sf2-risktable-custom-stats-and-label", lst_custom_stats[[2]]) diff --git a/tests/testthat/test-ggcuminc.R b/tests/testthat/test-ggcuminc.R index 076e8f10..e97fcaac 100644 --- a/tests/testthat/test-ggcuminc.R +++ b/tests/testthat/test-ggcuminc.R @@ -54,8 +54,8 @@ test_that("ggcuminc() works with multiple outcomes", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("cuminc1-ggcuminc-all-outcomes", lst_ggcuminc_outcomes[[1]]) vdiffr::expect_doppelganger("cuminc2-ggcuminc-all-outcomes", lst_ggcuminc_outcomes[[2]]) diff --git a/tests/testthat/test-ggsurvfit.R b/tests/testthat/test-ggsurvfit.R index 7788c4f7..67a61e4d 100644 --- a/tests/testthat/test-ggsurvfit.R +++ b/tests/testthat/test-ggsurvfit.R @@ -176,8 +176,8 @@ test_that("ggsurvfit() works with geoms with new data", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("sf2-ggsurvfit_new_data_geom1", p1) vdiffr::expect_doppelganger("sf2-ggsurvfit_new_data_geom2", p2) diff --git a/tests/testthat/test-stat_stepribbon.R b/tests/testthat/test-stat_stepribbon.R index 0e8087ff..a3ffbb30 100644 --- a/tests/testthat/test-stat_stepribbon.R +++ b/tests/testthat/test-stat_stepribbon.R @@ -20,8 +20,8 @@ test_that("stat_stepribbon() works", { NA ) - skip_on_os("linux") - skip_on_os("mac") + # only check on mac + skip_on_os(c("linux", "windows", "solaris")) skip_if_not(identical(current_release_version, loaded_release_version)) vdiffr::expect_doppelganger("gg_stepribbon1", gg_stepribbon1) vdiffr::expect_doppelganger("gg_stepribbon2", gg_stepribbon2)