-
Notifications
You must be signed in to change notification settings - Fork 40
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
Test source with JET #148
base: master
Are you sure you want to change the base?
Test source with JET #148
Conversation
This revealed some bugs in the untested bivariate T cdf. I've fixed the bugs and also added a few tests.
# The source call the commented out line below. Instead we error out | ||
throw(DomainError(nu, "degrees of freedom parameter must be positive")) | ||
# return bvnuppercdf(-dh, -dk, r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is, in tvpack.f this branch is supported? And we error since bvnuppercdf
does not exist/was not copied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have bvnuppercdf
but I think it's weird behavior to call it when the degrees of freedom parameter is non-positive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see and I agree, it seems strange to support non-positive degrees. Maybe in tvpack it is just a way to encode the limit case of infinte degrees of freedom?
In any case, shouldn't tcdf
be changed as well for consistency? That supports non-positive degrees of freedom as well it seems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should. I hadn't noticed that. Will push an update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading this again. The branch is for nu < 1
. I'd read it as < 0
. It doesn't makes sense at all to use the normal cdf when the degrees of freedom parameter is between zero and one. Not sure what the idea here was.
Co-authored-by: David Widmann <[email protected]>
Codecov ReportBase: 59.85% // Head: 75.34% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #148 +/- ##
===========================================
+ Coverage 59.85% 75.34% +15.48%
===========================================
Files 14 21 +7
Lines 568 653 +85
===========================================
+ Hits 340 492 +152
+ Misses 228 161 -67
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
It seems this PR is almost ready? Only https://github.com/JuliaStats/StatsFuns.jl/pull/148/files#r1019101826 is missing, it seems? |
I'm not completely sure what to do with the issue mentioned in #148 (comment) |
if VERSION >= v"1.7" | ||
using JET | ||
@testset "Static analysis" begin | ||
@test isempty(JET.get_reports(report_package("StatsFuns", target_modules=(StatsFuns,)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could also use JET.test_package
, e.g.,
@test isempty(JET.get_reports(report_package("StatsFuns", target_modules=(StatsFuns,)))) | |
JET.test_package("StatsFuns", target_defined_modules=true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or
@test isempty(JET.get_reports(report_package("StatsFuns", target_modules=(StatsFuns,)))) | |
JET.test_package("StatsFuns", target_defined_modules=true) |
This revealed some bugs in the untested bivariate T cdf. I've fixed the bugs and also added a few tests.