From 048ba2214ab100222f822de31d16d0fe70f46554 Mon Sep 17 00:00:00 2001 From: chiricom Date: Tue, 13 Oct 2026 22:00:12 +0000 Subject: [PATCH 1/4] re-roxygenize --- DESCRIPTION | 2 +- man/cli-package.Rd | 2 ++ man/cli_progress_bar.Rd | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index b42fa86a2..37f5f4b4a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -61,4 +61,4 @@ Config/Needs/website: Config/testthat/edition: 3 Config/usethis/last-upkeep: 2025-04-25 Encoding: UTF-8 -Config/roxygen2/version: 8.1.0 +Config/roxygen2/version: 8.1.1 diff --git a/man/cli-package.Rd b/man/cli-package.Rd index a0f4d14e0..f0788a13c 100644 --- a/man/cli-package.Rd +++ b/man/cli-package.Rd @@ -5,6 +5,8 @@ \alias{cli-package} \title{cli: Helpers for Developing Command Line Interfaces} \description{ +\if{html}{\figure{logo.svg}{options: style='float: right' alt='logo' width='120'}} + A suite of tools to build attractive command line interfaces ('CLIs'), from semantic elements: headings, lists, alerts, paragraphs, etc. Supports custom themes via a 'CSS'-like language. It also contains a number of lower level 'CLI' elements: rules, boxes, trees, and 'Unicode' symbols with 'ASCII' alternatives. It support ANSI colors and text styles as well. } \seealso{ diff --git a/man/cli_progress_bar.Rd b/man/cli_progress_bar.Rd index b28bfb924..d1a2a0fa7 100644 --- a/man/cli_progress_bar.Rd +++ b/man/cli_progress_bar.Rd @@ -20,6 +20,7 @@ cli_progress_bar( format_failed = NULL, clear = getOption("cli.progress_clear", TRUE), current = TRUE, + quiet = getOption("cli.disable_progress", FALSE), auto_terminate = type != "download", extra = NULL, .auto_close = TRUE, @@ -83,6 +84,9 @@ it has terminated. Defaults to the \code{cli.progress_clear} option, or bar of the calling function. See more at 'The current progress bar' below.} +\item{quiet}{if \code{TRUE} suppresses output from this function. Defaults to the \code{cli.disable_progress} option, or +\code{TRUE} if unset.} + \item{auto_terminate}{Whether to terminate the progress bar if the number of current units reaches the number of total units.} From 4cebc7ccd10f09da72541aadf4b26e99cf53678a Mon Sep 17 00:00:00 2001 From: chiricom Date: Tue, 13 Oct 2026 22:30:18 +0000 Subject: [PATCH 2/4] Document cli_tick_reset() and ticking() with @keywords internal --- R/progress-client.R | 2 +- R/progress-ticking.R | 11 +++++++++++ R/timer.R | 4 ++++ man/cli_progress_bar.Rd | 2 -- man/cli_tick_reset.Rd | 15 +++++++++++++++ man/ticking.Rd | 26 ++++++++++++++++++++++++++ 6 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 man/cli_tick_reset.Rd create mode 100644 man/ticking.Rd diff --git a/R/progress-client.R b/R/progress-client.R index 83df8d133..54732a1f6 100644 --- a/R/progress-client.R +++ b/R/progress-client.R @@ -309,7 +309,7 @@ #' progress messages. #' @family progress bar functions #' @family functions supporting inline markup -#' @aliases __cli_update_due cli_tick_reset ccli_tick_reset ticking +#' @aliases __cli_update_due ccli_tick_reset #' @export cli_progress_bar <- function( diff --git a/R/progress-ticking.R b/R/progress-ticking.R index a8156e10d..dddaf04bf 100644 --- a/R/progress-ticking.R +++ b/R/progress-ticking.R @@ -1,3 +1,14 @@ +#' Add a progress bar to a `while` loop +#' +#' @param cond Loop condition. Once this evaluates to `FALSE` the +#' progress bar will be terminated. +#' @param name Name of the progress bar, a label, passed to +#' [cli_progress_bar()]. +#' @param ... Passed to [cli_progress_bar()]. +#' @param .envir Passed to [cli_progress_bar()]. +#' +#' @return The value of the `cond` condition. +#' @keywords internal #' @export ticking <- function(cond, name = NULL, ..., .envir = parent.frame()) { diff --git a/R/timer.R b/R/timer.R index 52a6522f9..ff78c1bae 100644 --- a/R/timer.R +++ b/R/timer.R @@ -1,6 +1,10 @@ #' @export `__cli_update_due` <- FALSE +#' Reset the cli progress timer +#' +#' @return `NULL`, invisibly. +#' @keywords internal #' @export cli_tick_reset <- function() { diff --git a/man/cli_progress_bar.Rd b/man/cli_progress_bar.Rd index d1a2a0fa7..1aaaf1d2f 100644 --- a/man/cli_progress_bar.Rd +++ b/man/cli_progress_bar.Rd @@ -3,9 +3,7 @@ \name{cli_progress_bar} \alias{cli_progress_bar} \alias{__cli_update_due} -\alias{cli_tick_reset} \alias{ccli_tick_reset} -\alias{ticking} \alias{cli_progress_update} \alias{cli_progress_done} \title{cli progress bars} diff --git a/man/cli_tick_reset.Rd b/man/cli_tick_reset.Rd new file mode 100644 index 000000000..30d515c2d --- /dev/null +++ b/man/cli_tick_reset.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/timer.R +\name{cli_tick_reset} +\alias{cli_tick_reset} +\title{Reset the cli progress timer} +\usage{ +cli_tick_reset() +} +\value{ +\code{NULL}, invisibly. +} +\description{ +Reset the cli progress timer +} +\keyword{internal} diff --git a/man/ticking.Rd b/man/ticking.Rd new file mode 100644 index 000000000..945932238 --- /dev/null +++ b/man/ticking.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/progress-ticking.R +\name{ticking} +\alias{ticking} +\title{Add a progress bar to a \code{while} loop} +\usage{ +ticking(cond, name = NULL, ..., .envir = parent.frame()) +} +\arguments{ +\item{cond}{Loop condition. Once this evaluates to \code{FALSE} the +progress bar will be terminated.} + +\item{name}{Name of the progress bar, a label, passed to +\code{\link[=cli_progress_bar]{cli_progress_bar()}}.} + +\item{...}{Passed to \code{\link[=cli_progress_bar]{cli_progress_bar()}}.} + +\item{.envir}{Passed to \code{\link[=cli_progress_bar]{cli_progress_bar()}}.} +} +\value{ +The value of the \code{cond} condition. +} +\description{ +Add a progress bar to a \code{while} loop +} +\keyword{internal} From 046fcb30144efcbdfd540d488d40d71945a5ade4 Mon Sep 17 00:00:00 2001 From: chiricom Date: Tue, 13 Oct 2026 22:55:33 +0000 Subject: [PATCH 3/4] Move internal progress aliases to cli-package.Rd --- R/cli-package.R | 2 +- R/progress-client.R | 1 - R/progress-ticking.R | 11 ----------- R/timer.R | 4 ---- man/cli-package.Rd | 4 ++++ man/cli_progress_bar.Rd | 2 -- man/cli_tick_reset.Rd | 15 --------------- man/ticking.Rd | 26 -------------------------- 8 files changed, 5 insertions(+), 60 deletions(-) delete mode 100644 man/cli_tick_reset.Rd delete mode 100644 man/ticking.Rd diff --git a/R/cli-package.R b/R/cli-package.R index 0ca2549f3..c1bb5ac98 100644 --- a/R/cli-package.R +++ b/R/cli-package.R @@ -1,4 +1,4 @@ -#' @aliases cli-package NULL +#' @aliases cli-package NULL __cli_update_due cli_tick_reset ccli_tick_reset ticking #' @keywords internal "_PACKAGE" diff --git a/R/progress-client.R b/R/progress-client.R index 54732a1f6..b3cd96fad 100644 --- a/R/progress-client.R +++ b/R/progress-client.R @@ -309,7 +309,6 @@ #' progress messages. #' @family progress bar functions #' @family functions supporting inline markup -#' @aliases __cli_update_due ccli_tick_reset #' @export cli_progress_bar <- function( diff --git a/R/progress-ticking.R b/R/progress-ticking.R index dddaf04bf..a8156e10d 100644 --- a/R/progress-ticking.R +++ b/R/progress-ticking.R @@ -1,14 +1,3 @@ -#' Add a progress bar to a `while` loop -#' -#' @param cond Loop condition. Once this evaluates to `FALSE` the -#' progress bar will be terminated. -#' @param name Name of the progress bar, a label, passed to -#' [cli_progress_bar()]. -#' @param ... Passed to [cli_progress_bar()]. -#' @param .envir Passed to [cli_progress_bar()]. -#' -#' @return The value of the `cond` condition. -#' @keywords internal #' @export ticking <- function(cond, name = NULL, ..., .envir = parent.frame()) { diff --git a/R/timer.R b/R/timer.R index ff78c1bae..52a6522f9 100644 --- a/R/timer.R +++ b/R/timer.R @@ -1,10 +1,6 @@ #' @export `__cli_update_due` <- FALSE -#' Reset the cli progress timer -#' -#' @return `NULL`, invisibly. -#' @keywords internal #' @export cli_tick_reset <- function() { diff --git a/man/cli-package.Rd b/man/cli-package.Rd index f0788a13c..3b35d854e 100644 --- a/man/cli-package.Rd +++ b/man/cli-package.Rd @@ -3,6 +3,10 @@ \docType{package} \name{cli-package} \alias{cli-package} +\alias{__cli_update_due} +\alias{cli_tick_reset} +\alias{ccli_tick_reset} +\alias{ticking} \title{cli: Helpers for Developing Command Line Interfaces} \description{ \if{html}{\figure{logo.svg}{options: style='float: right' alt='logo' width='120'}} diff --git a/man/cli_progress_bar.Rd b/man/cli_progress_bar.Rd index 1aaaf1d2f..34c07854c 100644 --- a/man/cli_progress_bar.Rd +++ b/man/cli_progress_bar.Rd @@ -2,8 +2,6 @@ % Please edit documentation in R/progress-client.R \name{cli_progress_bar} \alias{cli_progress_bar} -\alias{__cli_update_due} -\alias{ccli_tick_reset} \alias{cli_progress_update} \alias{cli_progress_done} \title{cli progress bars} diff --git a/man/cli_tick_reset.Rd b/man/cli_tick_reset.Rd deleted file mode 100644 index 30d515c2d..000000000 --- a/man/cli_tick_reset.Rd +++ /dev/null @@ -1,15 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/timer.R -\name{cli_tick_reset} -\alias{cli_tick_reset} -\title{Reset the cli progress timer} -\usage{ -cli_tick_reset() -} -\value{ -\code{NULL}, invisibly. -} -\description{ -Reset the cli progress timer -} -\keyword{internal} diff --git a/man/ticking.Rd b/man/ticking.Rd deleted file mode 100644 index 945932238..000000000 --- a/man/ticking.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/progress-ticking.R -\name{ticking} -\alias{ticking} -\title{Add a progress bar to a \code{while} loop} -\usage{ -ticking(cond, name = NULL, ..., .envir = parent.frame()) -} -\arguments{ -\item{cond}{Loop condition. Once this evaluates to \code{FALSE} the -progress bar will be terminated.} - -\item{name}{Name of the progress bar, a label, passed to -\code{\link[=cli_progress_bar]{cli_progress_bar()}}.} - -\item{...}{Passed to \code{\link[=cli_progress_bar]{cli_progress_bar()}}.} - -\item{.envir}{Passed to \code{\link[=cli_progress_bar]{cli_progress_bar()}}.} -} -\value{ -The value of the \code{cond} condition. -} -\description{ -Add a progress bar to a \code{while} loop -} -\keyword{internal} From b5a31f089268ac670d45966c25f12119a17f3d77 Mon Sep 17 00:00:00 2001 From: chiricom Date: Tue, 13 Oct 2026 23:36:41 +0000 Subject: [PATCH 4/4] Gemini: Fix logo.svg duplicate in test-package.R and record missing quiet snapshot --- tests/testthat/_snaps/progress-client.md | 7 +++++++ tests/testthat/test-package.R | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/testthat/_snaps/progress-client.md b/tests/testthat/_snaps/progress-client.md index 9402dc64f..03190b770 100644 --- a/tests/testthat/_snaps/progress-client.md +++ b/tests/testthat/_snaps/progress-client.md @@ -109,3 +109,10 @@ [1] "\rfirst\r" "\r \r" "just 1 text\n" "first\r" [5] "\rfirst\r" "\r \r" +# no progress bar when quiet = TRUE + + Code + capture_cli_messages(fun()) + Output + character(0) + diff --git a/tests/testthat/test-package.R b/tests/testthat/test-package.R index 79941e11e..f05c05a46 100644 --- a/tests/testthat/test-package.R +++ b/tests/testthat/test-package.R @@ -11,7 +11,7 @@ test_that("No leftover SVG figures", { expect_equal( sort(figs), - sort(c(unique(rd_figs), "logo.svg")) + sort(unique(rd_figs)) ) figs2 <- dir(