diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..2a94f5695 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @dajmcdon diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d9650507e..5cb805dde 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,8 +1,8 @@ on: push: - branches: [main, master] + branches: [main, frosting] pull_request: - branches: [main, master] + branches: [main, frosting] name: R-CMD-check diff --git a/R/epi_recipe.R b/R/epi_recipe.R index 47f24ecbf..496d819bd 100644 --- a/R/epi_recipe.R +++ b/R/epi_recipe.R @@ -408,5 +408,8 @@ kill_levels <- function(x, keys) { #' @export as_tibble.epi_df <- function(x, ...) { # so that downstream calls to as_tibble don't clobber our metadata + # this avoids infinite recursion inside dplyr::dplyr_col_modify + # TODO: this needs a different approach, long-term + class(x) <- class(x)[class(x) != "grouped_df"] return(x) } diff --git a/tests/testthat/test-frosting.R b/tests/testthat/test-frosting.R index 1d9b43db3..cc6e4e633 100644 --- a/tests/testthat/test-frosting.R +++ b/tests/testthat/test-frosting.R @@ -36,5 +36,3 @@ test_that("prediction works without any postprocessor", { expect_equal(tail(p$time_value, 1), as.Date("2021-12-31")) expect_equal(unique(p$geo_value), c("ak", "ca", "ny")) }) - - diff --git a/tests/testthat/test-layer_predict.R b/tests/testthat/test-layer_predict.R index 736c426ce..5e6148ff5 100644 --- a/tests/testthat/test-layer_predict.R +++ b/tests/testthat/test-layer_predict.R @@ -19,7 +19,7 @@ test_that("predict layer works alone", { expect_equal(ncol(p), 3L) expect_s3_class(p, "epi_df") expect_equal(nrow(p), 108L) - expect_named(p, c("geo_value", "time_value", ".pred")) + expect_named(p, c("time_value", "geo_value", ".pred")) }) @@ -32,9 +32,5 @@ test_that("prediction with interval works", { expect_equal(ncol(p), 4L) expect_s3_class(p, "epi_df") expect_equal(nrow(p), 108L) - expect_named(p, c("geo_value", "time_value", ".pred_lower", ".pred_upper")) - - - + expect_named(p, c("time_value", "geo_value", ".pred_lower", ".pred_upper")) }) -