StatsFuns.jl icon indicating copy to clipboard operation
StatsFuns.jl copied to clipboard

Remove Rmath sampling methods

Open devmotion opened this issue 1 month ago • 3 comments

The ...rand methods in StatsFuns.RFunctions based on Rmath are not used in StatsFuns and not public API either. IMO if one wants to use these methods, it would be better to use Rmath directly (see https://github.com/JuliaStats/Rmath.jl/pull/91).

The PR requires https://github.com/JuliaStats/Rmath.jl/pull/91 and making use of Rmath in Distributions.


Additionally, to reduce the number of definitions further I removed the StatsFuns.RFunctions submodule and only defined the publicly exposed functions directly in the StatsFuns module.

devmotion avatar Oct 20 '25 16:10 devmotion

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 72.00%. Comparing base (814aa47) to head (67d8177).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
+ Coverage   69.71%   72.00%   +2.29%     
==========================================
  Files          16       22       +6     
  Lines         799      986     +187     
==========================================
+ Hits          557      710     +153     
- Misses        242      276      +34     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Oct 20 '25 16:10 codecov-commenter

I think this is good. Are there other breaking changes that we can come up with before releasing this?

andreasnoack avatar Oct 21 '25 17:10 andreasnoack

Maybe we could even think about removing the RFunctions submodule completely. With #191 interfacing with Rmath will not require complex ccalls anymore but we could instead directly define nbetapdf(...) = ... Rmath.dnbeta(...) etc within StatsFuns (possibly with the convenience matrix, possibly without).

devmotion avatar Oct 22 '25 19:10 devmotion