Skip to content

add show_messages and show_exceptions to generate_quantities#1142

Merged
jgabry merged 1 commit intomasterfrom
fix-1140-add-missing-arguments
Feb 25, 2026
Merged

add show_messages and show_exceptions to generate_quantities#1142
jgabry merged 1 commit intomasterfrom
fix-1140-add-missing-arguments

Conversation

@avehtari
Copy link
Member

@avehtari avehtari commented Feb 23, 2026

Summary

Closes #1140. generate_quantities was missing arguments show_messages and show_exceptions. This PR adds them, and also adds tests.

  • R/model.R — generate_quantities() method
    • Added show_messages = TRUE and show_exceptions = TRUE to the function signature
    • Passed them to CmdStanGQProcs$new() as show_stdout_messages = show_messages and show_stderr_messages = show_exceptions
  • tests/testthat/test-model-generate_quantities.R and
    • Added test: "no output with show_messages = FALSE"
  • tests/testthat/test-model-pathfinder.R
    • Added test: "no output with show_messages = FALSE" (pathfinder already had the arguments implemented, just lacked a test)

Copyright and Licensing

Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):

Aki Vehtari

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses:

@avehtari avehtari requested a review from jgabry February 23, 2026 12:56
@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.51%. Comparing base (453084b) to head (43270b5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1142      +/-   ##
==========================================
+ Coverage   87.49%   87.51%   +0.01%     
==========================================
  Files          14       14              
  Lines        5983     5982       -1     
==========================================
  Hits         5235     5235              
+ Misses        748      747       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@avehtari
Copy link
Member Author

I updated the summary with more details

@jgabry
Copy link
Member

jgabry commented Feb 25, 2026

Thanks, this looks good.

@jgabry jgabry merged commit b6ade07 into master Feb 25, 2026
11 checks passed
@jgabry jgabry deleted the fix-1140-add-missing-arguments branch February 25, 2026 17:27
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.

generate_quantities missing show_messages and show_exceptions arguments

3 participants