Skip to content

Commit 8debd4c

Browse files
committed
Bump dplyr dependency + make some tests pass on minimum of dplyr range
We need dplyr >= 1.0.8 for some dplyr_col_modify or something of the sort, used by the column modifications recorder used by epi_archive. (We also needed a more recent dplyr for if_any and if_all.) Change some tests to actually run under dplyr 1.0.8, which was more rigid about the types of things going into if_else.
1 parent 9c17094 commit 8debd4c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Imports:
2929
checkmate,
3030
cli,
3131
data.table,
32-
dplyr (>= 1.0.0),
32+
dplyr (>= 1.0.8),
3333
genlasso,
3434
ggplot2,
3535
lifecycle (>= 1.0.1),

tests/testthat/test-epi_slide.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ test_that("`ref_time_values` + `all_rows = TRUE` works", {
434434
),
435435
basic_full_result %>%
436436
dplyr::mutate(slide_value = dplyr::if_else(time_value %in% (test_date + c(2L, 8L)),
437-
slide_value, NA_integer_
437+
slide_value, NA_real_ # (`^` outputs numeric)
438438
))
439439
)
440440

@@ -472,7 +472,7 @@ test_that("`ref_time_values` + `all_rows = TRUE` works", {
472472
),
473473
basic_mean_result %>%
474474
dplyr::mutate(slide_value_value = dplyr::if_else(time_value %in% (test_date + c(2L, 8L)),
475-
slide_value, NA_integer_
475+
slide_value, NA_real_
476476
)) %>%
477477
select(-slide_value)
478478
)
@@ -498,7 +498,7 @@ test_that("`ref_time_values` + `all_rows = TRUE` works", {
498498
),
499499
basic_full_result %>%
500500
dplyr::mutate(slide_value = dplyr::if_else(time_value %in% (test_date + c(2L, 8L)),
501-
slide_value, NA_integer_
501+
slide_value, NA_real_
502502
)) %>%
503503
dplyr::rename(slide_value_value = slide_value)
504504
)
@@ -584,7 +584,7 @@ test_that("`ref_time_values` + `all_rows = TRUE` works", {
584584
unnest(slide_value, names_sep = "_"),
585585
basic_full_result %>%
586586
dplyr::mutate(slide_value = dplyr::if_else(time_value %in% (test_date + c(2L, 8L)),
587-
slide_value, NA_integer_
587+
slide_value, NA_real_
588588
)) %>%
589589
dplyr::rename(slide_value_value = slide_value)
590590
)

0 commit comments

Comments
 (0)