From c7a792c4581636ac78137622cb9496900f146c14 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Wed, 20 Mar 2024 09:40:48 -0700 Subject: [PATCH 1/3] Miscellany discovered while doing something else --- R/roxygen.R | 2 +- R/tibble.R | 2 +- man/use_tibble.Rd | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/roxygen.R b/R/roxygen.R index de1727b12..7822f4f90 100644 --- a/R/roxygen.R +++ b/R/roxygen.R @@ -42,7 +42,7 @@ use_roxygen_md <- function(overwrite = FALSE) { the conversion process." )) } - ui_bullets(c("v" = "Run {.run devtools::document()} when you're done.")) + ui_bullets(c("_" = "Run {.run devtools::document()} when you're done.")) return(invisible()) } diff --git a/R/tibble.R b/R/tibble.R index abb00b5fb..280df9259 100644 --- a/R/tibble.R +++ b/R/tibble.R @@ -13,7 +13,7 @@ #' * Prepare the roxygen directive necessary to import at least one function #' from tibble: #' - If possible, the directive is inserted into existing package-level -#' documentation, i.e. the roxygen snippet created by [use_package_doc()] +#' documentation, i.e. the roxygen snippet created by [use_package_doc()] #' - Otherwise, we issue advice on where the user should add the directive #' #' This is necessary when your package returns a stored data object that has diff --git a/man/use_tibble.Rd b/man/use_tibble.Rd index ebd499e6a..3d1388e36 100644 --- a/man/use_tibble.Rd +++ b/man/use_tibble.Rd @@ -20,7 +20,7 @@ object with class \code{tbl_df}. Specifically: from tibble: \itemize{ \item If possible, the directive is inserted into existing package-level -documentation, i.e. the roxygen snippet created by \code{\link[=use_package_doc]{use_package_doc()}} +documentation, i.e. the roxygen snippet created by \code{\link[=use_package_doc]{use_package_doc()}} \item Otherwise, we issue advice on where the user should add the directive } } From 7fe7db044d51d90a314fc5e603216b5fa460d543 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Wed, 20 Mar 2024 09:41:02 -0700 Subject: [PATCH 2/3] Make sure `R/` exists and nudge to re-document --- R/documentation.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/documentation.R b/R/documentation.R index f66f25315..8052141f1 100644 --- a/R/documentation.R +++ b/R/documentation.R @@ -15,11 +15,15 @@ #' @export use_package_doc <- function(open = rlang::is_interactive()) { check_is_package("use_package_doc()") + use_directory("R") use_template( "packagename-package.R", package_doc_path(), open = open ) + ui_bullets(c( + "_" = "Run {.run devtools::document()} to update package-level documentation." + )) } package_doc_path <- function() { From 9e64daf13ac1636187d59e6446d9526a414d8ba6 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Wed, 20 Mar 2024 10:03:57 -0700 Subject: [PATCH 3/3] Update snapshot test --- tests/testthat/_snaps/roxygen.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/_snaps/roxygen.md b/tests/testthat/_snaps/roxygen.md index 548c6a0fb..90b0198a4 100644 --- a/tests/testthat/_snaps/roxygen.md +++ b/tests/testthat/_snaps/roxygen.md @@ -4,6 +4,7 @@ use_package_doc() Message v Writing 'R/{TESTPKG}-package.R'. + [ ] Run `devtools::document()` to update package-level documentation. ---