Skip to content

Commit

Permalink
also do usethis tweak in vt_create_package()
Browse files Browse the repository at this point in the history
  • Loading branch information
slager committed Nov 5, 2024
1 parent 5d1b7f1 commit ffb17c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions R/init.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ vt_use_validation <- function( pkg = ".", working_dir, ...) {
#' @importFrom usethis create_package
vt_create_package <- function(pkg = ".", ..., fields = list(), rstudio = rstudioapi::isAvailable(),
roxygen = TRUE, check_name = TRUE, open = rlang::is_interactive()) {
# This fields modification block can likely be removed once usethis > 3.0.0 is
# released on CRAN. See full note in tests/testthat/helpers.R
fields <- utils::modifyList(
fields,
list(
`Authors@R` = paste0(
"person(\"First\", \"Last\", email = \"first.last",
"@example.com\", role = c(\"aut\", \"cre\"))"
)
),
keep.null = TRUE
)

tryCatch({
create_package(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ make_vt_test_package <- function(){
#' once usethis > 3.0.0 is released, the custom `fields` argument below should
#' be able to be removed. At that time, if desired, this wrapper function could
#' also just be removed and replaced with usethis::create_package() in the unit
#' tests.
#' tests. See also another instance in vt_create_package().
#'
#' @param ... Passed to usethis::create_package()
#'
Expand Down

0 comments on commit ffb17c3

Please sign in to comment.