Skip to content

Standardize PPC messages to warn/inform#462

Merged
jgabry merged 6 commits intostan-dev:masterfrom
utkarshpawade:warning-message-vs-warn-inform-inconsistency
Mar 13, 2026
Merged

Standardize PPC messages to warn/inform#462
jgabry merged 6 commits intostan-dev:masterfrom
utkarshpawade:warning-message-vs-warn-inform-inconsistency

Conversation

@utkarshpawade
Copy link
Contributor

Fixes #461

Summary
This PR standardizes user-facing messaging by replacing base warning() and message() calls with rlang::warn() and rlang::inform() in selected PPC code paths.

Changes

  • Replaced warning() with rlang::warn() in ppc_loo().
  • Replaced message() with rlang::inform() in ppc_loo().
  • Replaced message() with rlang::inform() in ppc_censoring().
  • Replaced message() with rlang::inform() in ppc_test_statistics().

The message content and trigger logic remain unchanged.

Why
bayesplot already uses rlang conditions in several places. Using warn() and inform() ensures more consistent condition handling and better interoperability with rlang-based workflows.

Copilot AI review requested due to automatic review settings March 13, 2026 17:57
@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.63%. Comparing base (e8234b4) to head (7fb682e).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #462      +/-   ##
==========================================
+ Coverage   98.55%   98.63%   +0.08%     
==========================================
  Files          35       35              
  Lines        5864     5863       -1     
==========================================
+ Hits         5779     5783       +4     
+ Misses         85       80       -5     

☔ 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jgabry jgabry requested a review from Copilot March 13, 2026 18:23
Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good. We can merge if all the tests pass.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jgabry
Copy link
Member

jgabry commented Mar 13, 2026

Don't worry about the copilot suggestions, I don't think they're necessary

@utkarshpawade
Copy link
Contributor Author

ohh thanks !

Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jgabry jgabry merged commit 6801047 into stan-dev:master Mar 13, 2026
6 checks passed
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.

Standardize user-facing messaging to rlang warn/inform in PPC code

4 participants