Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

Description

The verbose parameter was not being passed to insight::get_parameters() in multiple functions, causing unwanted warnings to propagate to downstream packages like {statsExpressions} even when verbose = FALSE was set.

Proposed Changes

Added verbose = verbose parameter to insight::get_parameters() calls in 32 locations across 10 files where the calling function accepts a verbose parameter:

  • Core utilities: .compute_interval_simMerMod(), .compute_interval_sim() in utils_hdi_ci.R
  • Interval functions: hdi.*(), eti.*(), bci.*(), spi.*(), ci.*() methods for bamlss, bcplm, emmGrid, stanreg, brmsfit models
  • ROPE functions: rope.*() and p_rope.*() methods for emmGrid, BFBayesFactor, bcplm, stanreg, brmsfit, sim, sim.merMod models
  • Other: equivalence_test.emmGrid(), si.stanfit()

Example change:

# Before
rope.emmGrid <- function(x, range = "default", ci = 0.95, verbose = TRUE, ...) {
  xdf <- insight::get_parameters(x)
  # ...
}

# After  
rope.emmGrid <- function(x, range = "default", ci = 0.95, verbose = TRUE, ...) {
  xdf <- insight::get_parameters(x, verbose = verbose)
  # ...
}

This ensures warning suppression works consistently across the package when users set verbose = FALSE.

Original prompt

This section details on the original issue you should resolve

<issue_title>Consistently passing verbose to the underlying method</issue_title>
<issue_description>This is just one example, but I think there are a few others in the codebase:

.compute_interval_simMerMod <- function(x, ci, effects, parameters, verbose, fun) {
fixed <- fixed.data <- NULL
random <- random.data <- NULL
if (effects %in% c("fixed", "all")) {
fixed.data <- insight::get_parameters(x, effects = "fixed", parameters = parameters)
fixed <- .compute_interval_dataframe(fixed.data, ci, verbose, fun)
fixed$Group <- "fixed"
}
if (effects %in% c("random", "all")) {
random.data <- insight::get_parameters(x, effects = "random", parameters = parameters)

Here, verbose argument should be passed to insight::get_parameters(), but it isn't.

This discrepancy is leading to some unnecessary warning messages bubbling up in downstream packages, like {statsExpressions}.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Consistently pass verbose to underlying method Fix verbose parameter not being passed to insight::get_parameters() Nov 16, 2025
Copilot AI requested a review from IndrajeetPatil November 16, 2025 15:13
Copilot finished work on behalf of IndrajeetPatil November 16, 2025 15:13
@IndrajeetPatil IndrajeetPatil marked this pull request as ready for review November 16, 2025 15:31
@IndrajeetPatil
Copy link
Member

To keep the diff small in this feature PR, I am ignoring all suggestions related to formatting changes, which should be done in a separate PR.

@IndrajeetPatil IndrajeetPatil merged commit 2c13656 into main Nov 16, 2025
13 of 28 checks passed
@IndrajeetPatil IndrajeetPatil deleted the copilot/fix-verbose-argument-handling branch November 16, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consistently passing verbose to the underlying method

2 participants