Skip to content

Remove docstring for cdf(::Skellam, ::Real) #1986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025
Merged

Conversation

devmotion
Copy link
Member

IMO this should be an internal comment and not a public docstring. For users, there's nothing special about cdf(::Skellam, ::Real), so there's no need for a separate docstring. See #1985 (comment) for an example of the situation on the master branch.

@devmotion devmotion mentioned this pull request Jun 18, 2025
4 tasks
@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.28%. Comparing base (46bb0c3) to head (92e7886).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1986   +/-   ##
=======================================
  Coverage   86.28%   86.28%           
=======================================
  Files         146      146           
  Lines        8787     8787           
=======================================
  Hits         7582     7582           
  Misses       1205     1205           

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

@andreasnoack andreasnoack left a comment

Choose a reason for hiding this comment

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

I think this makes sense although I have slightly mixed feelings. I really like that the R docstrings contain information about the source of the implementations. However, I think it will generally be harder in our case since most of the implementations aren't even in this package. They are in StatsFuns and they then again rely only functionality from SpecialFunctions and HypergeometricsFunctions.

@devmotion
Copy link
Member Author

Another argument for this PR is that it seems surprising to single out Skellam - in case we want to provide more details regarding the numerical algorithms/approximations, we should do it consistently for all distributions. However, currently Skellam seems to be the only one with a dedicated cdf docstring.

Generally, I think it's a bit questionable whether docstrings are the best way to communicate these details though. Doing it for all distributions would mean that ?cdf is basically useless. Maybe a separate page in the docs would be a good way.

@devmotion devmotion merged commit abb151c into master Jun 18, 2025
15 checks passed
@devmotion devmotion deleted the dw/skellam_cdf branch June 18, 2025 14:31
@mmikhasenko
Copy link

For the record, I support documenting technical details of the implementation.

It could be gradually implemented for all user-faced functions. It's useful and already easy to scroll to the right docstring in Pluto if there are many.The display can also improve one day to show only the Base.method and type specific method.

But it could be that Distribution.jl, by a consistent convention, decides not doing that.

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.

4 participants