Skip to content

Remove dead modify_aes_() and fix deprecated size usage in helpers#446

Merged
jgabry merged 2 commits intostan-dev:masterfrom
ishaan-arora-1:fix/deprecated-size-and-dead-code-444-445
Mar 10, 2026
Merged

Remove dead modify_aes_() and fix deprecated size usage in helpers#446
jgabry merged 2 commits intostan-dev:masterfrom
ishaan-arora-1:fix/deprecated-size-and-dead-code-444-445

Conversation

@ishaan-arora-1
Copy link
Contributor

@ishaan-arora-1 ishaan-arora-1 commented Mar 10, 2026

Fixes #444, fixes #445

  • Removed modify_aes_() which wrapped the deprecated aes_() and was never called anywhere in the codebase.
  • Renamed the size parameter to linewidth in grid_lines() and grid_lines_y() to match ggplot2 3.4+ semantics (the value was already being passed as linewidth internally).
  • Updated doc examples in mcmc_acf_bar and mcmc_scatter that used size where linewidth is expected.

AI Usage Policy :
This issue was found using an LLM, but was solved without one!!

- Remove unused modify_aes_() that wrapped the deprecated aes_() (stan-dev#444)
- Rename size param to linewidth in grid_lines() and grid_lines_y() (stan-dev#445)
- Fix doc examples using size where linewidth is expected (stan-dev#445)

Fixes stan-dev#444, fixes stan-dev#445
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! Just one small change.

@jgabry
Copy link
Member

jgabry commented Mar 10, 2026

grid_lines() is exported, so we can't just drop the size
parameter without breaking user code. Keep it with a
lifecycle deprecation warning pointing to linewidth.

Also adds lifecycle as an imported dependency and updates
the test to use linewidth.
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 45.45455% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.55%. Comparing base (c817061) to head (9b40bf7).

Files with missing lines Patch % Lines
R/bayesplot-helpers.R 45.45% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #446      +/-   ##
==========================================
- Coverage   98.63%   98.55%   -0.09%     
==========================================
  Files          35       35              
  Lines        5860     5866       +6     
==========================================
+ Hits         5780     5781       +1     
- Misses         80       85       +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.

@jgabry
Copy link
Member

jgabry commented Mar 10, 2026

The failure on r-devel is unrelated (there is an issue with tiny differences in SVGs on r-devel). Merging now. Thanks!

@jgabry jgabry merged commit 40fd9eb into stan-dev:master Mar 10, 2026
5 of 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.

Deprecated size usage in exported helpers and documentation examples Remove dead code: modify_aes_() wrapping deprecated aes_()

3 participants