Skip to content

Commit

Permalink
feat(wip): inflate_all and inflate_all utils deal with the fact that …
Browse files Browse the repository at this point in the history
…inflate can run codecov

#256
  • Loading branch information
Yohann Mansiaux committed Jun 12, 2024
1 parent 00bd7c3 commit 08d5897
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
1 change: 1 addition & 0 deletions R/inflate_all.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ inflate_all <- function(
flat_file$document <- FALSE
flat_file$check <- FALSE
flat_file$update_params <- FALSE
flat_file$codecov <- FALSE
suppressMessages(do.call(inflate, flat_file))
})
)
Expand Down
8 changes: 6 additions & 2 deletions dev/flat_inflate_all.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ inflate_all <- function(
flat_file$document <- FALSE
flat_file$check <- FALSE
flat_file$update_params <- FALSE
flat_file$codecov <- FALSE
suppressMessages(do.call(inflate, flat_file))
})
)
Expand Down Expand Up @@ -830,7 +831,8 @@ usethis::with_project(dummypackage, {
names(config_content[["flat_full.Rmd"]][["inflate"]]),
c(
"flat_file", "vignette_name", "open_vignette",
"check", "document", "overwrite", "clean"
"check", "document", "overwrite", "clean",
"codecov"
)
)
})
Expand Down Expand Up @@ -880,7 +882,8 @@ usethis::with_project(dummypackage, {
names(config_content[["flat_full.Rmd"]][["inflate"]]),
c(
"flat_file", "vignette_name", "open_vignette",
"check", "document", "overwrite", "clean"
"check", "document", "overwrite", "clean",
"codecov"
)
)
expect_true(is.na(config_content[["flat_full.Rmd"]][["inflate"]][["vignette_name"]]))
Expand Down Expand Up @@ -943,6 +946,7 @@ usethis::with_project(dummypackage, {
)
})
})
unlink(dummypackage, recursive = TRUE)
```

```{r development-inflate, eval=FALSE}
Expand Down
6 changes: 4 additions & 2 deletions dev/flat_inflate_all_utils.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,8 @@ usethis::with_project(dummypackage, {
check = FALSE,
document = TRUE,
overwrite = "ask",
clean = "ask"
clean = "ask",
codecov = FALSE
)
)
Expand All @@ -820,7 +821,8 @@ usethis::with_project(dummypackage, {
check = FALSE,
document = TRUE,
overwrite = "ask",
clean = "ask"
clean = "ask",
codecov = FALSE
)
)
})
Expand Down
7 changes: 5 additions & 2 deletions tests/testthat/test-inflate_all.R
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ usethis::with_project(dummypackage, {
names(config_content[["flat_full.Rmd"]][["inflate"]]),
c(
"flat_file", "vignette_name", "open_vignette",
"check", "document", "overwrite", "clean"
"check", "document", "overwrite", "clean",
"codecov"
)
)
})
Expand Down Expand Up @@ -610,7 +611,8 @@ usethis::with_project(dummypackage, {
names(config_content[["flat_full.Rmd"]][["inflate"]]),
c(
"flat_file", "vignette_name", "open_vignette",
"check", "document", "overwrite", "clean"
"check", "document", "overwrite", "clean",
"codecov"
)
)
expect_true(is.na(config_content[["flat_full.Rmd"]][["inflate"]][["vignette_name"]]))
Expand Down Expand Up @@ -673,3 +675,4 @@ usethis::with_project(dummypackage, {
)
})
})
unlink(dummypackage, recursive = TRUE)
6 changes: 4 additions & 2 deletions tests/testthat/test-inflate_all_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ usethis::with_project(dummypackage, {
check = FALSE,
document = TRUE,
overwrite = "ask",
clean = "ask"
clean = "ask",
codecov = FALSE
)
)

Expand All @@ -457,7 +458,8 @@ usethis::with_project(dummypackage, {
check = FALSE,
document = TRUE,
overwrite = "ask",
clean = "ask"
clean = "ask",
codecov = FALSE
)
)
})
Expand Down

0 comments on commit 08d5897

Please sign in to comment.