Skip to content

Commit ba0d8b5

Browse files
authored
Merge pull request #49 from cmu-delphi/ds/frosting-ci
Add frosting to CI and sync with `main`
2 parents 8bd7d4a + 1ea32d2 commit ba0d8b5

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @dajmcdon

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

+2-2
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

+3
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

-2
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

+2-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +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"))
22+
expect_named(p, c("time_value", "geo_value", ".pred"))
2323

2424
})
2525

@@ -32,9 +32,5 @@ test_that("prediction with interval works", {
3232
expect_equal(ncol(p), 4L)
3333
expect_s3_class(p, "epi_df")
3434
expect_equal(nrow(p), 108L)
35-
expect_named(p, c("geo_value", "time_value", ".pred_lower", ".pred_upper"))
36-
37-
38-
35+
expect_named(p, c("time_value", "geo_value", ".pred_lower", ".pred_upper"))
3936
})
40-

0 commit comments

Comments
 (0)