From 886671549d79783282d56fa5e7af08c42e343a91 Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Thu, 4 Jul 2024 15:29:05 +0200 Subject: [PATCH 1/5] verbose = !quiet --- R/render_docs.R | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/R/render_docs.R b/R/render_docs.R index b250a8e..ff4417f 100644 --- a/R/render_docs.R +++ b/R/render_docs.R @@ -8,6 +8,7 @@ #' @param parallel Logical. Render man pages and vignettes in parallel using the `future` framework. In addition to setting this argument to TRUE, users must define the parallelism plan in `future`. See the examples section below. #' @param freeze Logical. If TRUE and a man page or vignette has not changed since the last call to `render_docs()`, that file is skipped. File hashes are stored in `altdoc/freeze.rds`. If that file is deleted, all man pages and vignettes will be rendered anew. #' @param autolink Logical. TRUE to link function names and calls to web-based documentation. See the Autolink section below for details. +#' @param ... Additional arguments are ignored. #' @inheritParams setup_docs #' @export #' @@ -46,7 +47,14 @@ #' render_docs(parallel = TRUE) #' #' } -render_docs <- function(path = ".", verbose = FALSE, parallel = FALSE, freeze = FALSE, autolink = FALSE) { +render_docs <- function(path = ".", verbose = FALSE, parallel = FALSE, freeze = FALSE, autolink = FALSE, ...) { + + # Quarto sometimes raises errors encouraging users to set `quiet=FALSE` to get more information. + # This is a convenience check to match Quarto's `quiet` and `altdoc`'s `verbose` arguments. + dots <- list(...) + if (quiet %in% names(dots) && is.logical(dots[["quiet"]]) && length(dots[["quiet"]]) == 1) { + verbose <- !dots[["quiet"]] + } path <- .convert_path(path) tool <- .doc_type(path) From f8d1265a6611a24597bc701c59d327ba333175a0 Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Thu, 4 Jul 2024 15:31:28 +0200 Subject: [PATCH 2/5] docs --- man/render_docs.Rd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/man/render_docs.Rd b/man/render_docs.Rd index ce2351c..230644a 100644 --- a/man/render_docs.Rd +++ b/man/render_docs.Rd @@ -9,7 +9,8 @@ render_docs( verbose = FALSE, parallel = FALSE, freeze = FALSE, - autolink = FALSE + autolink = FALSE, + ... ) } \arguments{ @@ -22,6 +23,8 @@ render_docs( \item{freeze}{Logical. If TRUE and a man page or vignette has not changed since the last call to \code{render_docs()}, that file is skipped. File hashes are stored in \code{altdoc/freeze.rds}. If that file is deleted, all man pages and vignettes will be rendered anew.} \item{autolink}{Logical. TRUE to link function names and calls to web-based documentation. See the Autolink section below for details.} + +\item{...}{Additional arguments are ignored.} } \description{ Render and update the function reference manual, vignettes, README, NEWS, CHANGELOG, LICENSE, From a376f51200b9ad5aade6ab36bd85a30ec3a52a8c Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Thu, 4 Jul 2024 15:34:52 +0200 Subject: [PATCH 3/5] typo --- R/render_docs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/render_docs.R b/R/render_docs.R index ff4417f..93c4667 100644 --- a/R/render_docs.R +++ b/R/render_docs.R @@ -52,7 +52,7 @@ render_docs <- function(path = ".", verbose = FALSE, parallel = FALSE, freeze = # Quarto sometimes raises errors encouraging users to set `quiet=FALSE` to get more information. # This is a convenience check to match Quarto's `quiet` and `altdoc`'s `verbose` arguments. dots <- list(...) - if (quiet %in% names(dots) && is.logical(dots[["quiet"]]) && length(dots[["quiet"]]) == 1) { + if ("quiet" %in% names(dots) && is.logical(dots[["quiet"]]) && length(dots[["quiet"]]) == 1) { verbose <- !dots[["quiet"]] } From 7e46e820d6cf645da21ba85e0bec77f68c4e9db7 Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Thu, 4 Jul 2024 15:51:45 +0200 Subject: [PATCH 4/5] isTRUE --- R/render_docs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/render_docs.R b/R/render_docs.R index 93c4667..25937e3 100644 --- a/R/render_docs.R +++ b/R/render_docs.R @@ -52,7 +52,7 @@ render_docs <- function(path = ".", verbose = FALSE, parallel = FALSE, freeze = # Quarto sometimes raises errors encouraging users to set `quiet=FALSE` to get more information. # This is a convenience check to match Quarto's `quiet` and `altdoc`'s `verbose` arguments. dots <- list(...) - if ("quiet" %in% names(dots) && is.logical(dots[["quiet"]]) && length(dots[["quiet"]]) == 1) { + if ("quiet" %in% names(dots) && is.logical(dots[["quiet"]]) && isTRUE(length(dots[["quiet"]]) == 1)) { verbose <- !dots[["quiet"]] } From 1b7e43c2209f46f6cb3a10d30975e621e03849ed Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Thu, 4 Jul 2024 15:59:27 +0200 Subject: [PATCH 5/5] typo --- R/render_docs.R | 6 +----- man/render_docs.Rd | 9 ++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/R/render_docs.R b/R/render_docs.R index ff34c1c..f9dd74e 100644 --- a/R/render_docs.R +++ b/R/render_docs.R @@ -46,8 +46,7 @@ #' render_docs(parallel = TRUE) #' #' } -<<<<<<< HEAD -render_docs <- function(path = ".", verbose = FALSE, parallel = FALSE, freeze = FALSE, autolink = FALSE, ...) { +render_docs <- function(path = ".", verbose = FALSE, parallel = FALSE, freeze = FALSE, ...) { # Quarto sometimes raises errors encouraging users to set `quiet=FALSE` to get more information. # This is a convenience check to match Quarto's `quiet` and `altdoc`'s `verbose` arguments. @@ -55,9 +54,6 @@ render_docs <- function(path = ".", verbose = FALSE, parallel = FALSE, freeze = if ("quiet" %in% names(dots) && is.logical(dots[["quiet"]]) && isTRUE(length(dots[["quiet"]]) == 1)) { verbose <- !dots[["quiet"]] } -======= -render_docs <- function(path = ".", verbose = FALSE, parallel = FALSE, freeze = FALSE) { ->>>>>>> main path <- .convert_path(path) tool <- .doc_type(path) diff --git a/man/render_docs.Rd b/man/render_docs.Rd index d7996e6..ee16469 100644 --- a/man/render_docs.Rd +++ b/man/render_docs.Rd @@ -4,13 +4,7 @@ \alias{render_docs} \title{Update documentation} \usage{ -render_docs( - path = ".", - verbose = FALSE, - parallel = FALSE, - freeze = FALSE, - ... -) +render_docs(path = ".", verbose = FALSE, parallel = FALSE, freeze = FALSE, ...) } \arguments{ \item{path}{Path to the package root directory.} @@ -20,6 +14,7 @@ render_docs( \item{parallel}{Logical. Render man pages and vignettes in parallel using the \code{future} framework. In addition to setting this argument to TRUE, users must define the parallelism plan in \code{future}. See the examples section below.} \item{freeze}{Logical. If TRUE and a man page or vignette has not changed since the last call to \code{render_docs()}, that file is skipped. File hashes are stored in \code{altdoc/freeze.rds}. If that file is deleted, all man pages and vignettes will be rendered anew.} + \item{...}{Additional arguments are ignored.} } \description{