Skip to content

Commit eaeb061

Browse files
committed
2 parents a06a5c3 + 7fba858 commit eaeb061

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [main, master]
3+
branches: [main, frosting]
44
pull_request:
5-
branches: [main, master]
5+
branches: [main, frosting]
66

77
name: R-CMD-check
88

R/epi_recipe.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,5 +408,8 @@ kill_levels <- function(x, keys) {
408408
#' @export
409409
as_tibble.epi_df <- function(x, ...) {
410410
# so that downstream calls to as_tibble don't clobber our metadata
411+
# this avoids infinite recursion inside dplyr::dplyr_col_modify
412+
# TODO: this needs a different approach, long-term
413+
class(x) <- class(x)[class(x) != "grouped_df"]
411414
return(x)
412415
}

tests/testthat/test-frosting.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@ test_that("prediction works without any postprocessor", {
3636
expect_equal(tail(p$time_value, 1), as.Date("2021-12-31"))
3737
expect_equal(unique(p$geo_value), c("ak", "ca", "ny"))
3838
})
39-
40-

tests/testthat/test-layer_predict.R

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ test_that("predict layer works alone", {
1919
expect_equal(ncol(p), 3L)
2020
expect_s3_class(p, "epi_df")
2121
expect_equal(nrow(p), 108L)
22-
expect_named(p, c("geo_value", "time_value", ".pred"))
23-
22+
expect_named(p, c("time_value", "geo_value", ".pred"))
2423
})
2524

2625
test_that("prediction with interval works", {
@@ -32,9 +31,5 @@ test_that("prediction with interval works", {
3231
expect_equal(ncol(p), 4L)
3332
expect_s3_class(p, "epi_df")
3433
expect_equal(nrow(p), 108L)
35-
expect_named(p, c("geo_value", "time_value", ".pred_lower", ".pred_upper"))
36-
37-
38-
34+
expect_named(p, c("time_value", "geo_value", ".pred_lower", ".pred_upper"))
3935
})
40-

0 commit comments

Comments
 (0)