Make package Julia native#97
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #97 +/- ##
==========================================
+ Coverage 84.89% 85.11% +0.22%
==========================================
Files 7 7
Lines 1470 1465 -5
==========================================
- Hits 1248 1247 -1
+ Misses 222 218 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi @TSGut, this is great, thank you! One comment: it looks like you changed the random tests to definite tests, which is something that should have happened a long time ago. Let me recommend a change (that passes locally). |
|
In Gamma.jl we run 10k seeded random tests for each input type we support, so that's a way to get random in but in any case it should be pseudo random with a fixed seed or just static because otherwise CI is a nightmare (it bit me a few times here which is why I changed it). Though I guess it isn't the point of this PR, I would also be happy to extract a big ensemble of test cases from e.g. mpmath into a text file at high precision and route them in, similar to what I did for Gamma.jl and MeijerG.jl. |
Updated test cases for hypergeometric functions to use new ranges for complex and real numbers.
|
Ok I changed the line. If the tests pass, I'll merge |
|
Only thing to consider then is what to do with version number, since I haven't touched that. |
Now that Gamma.jl is in good shape, faster or same as SpecialFunctions.jl in all cases and also slimmer as a dependency (and supporting Complex Bigfloat better), I want to propose making HypergeometricFunctions.jl Julia native as well.
This PR does that by swapping out SpecialFunctions.jl for Gamma.jl. That's basically it. All tests pass since we intentionally made the Gamma.jl API compatible, so it's very minor changes.
@MikaelSlevinsky: There is a design choice to be made here relating to the
unsafe_gammathing you had: I am not extremely sure why you had that extra call in there - I guess you prefer getting NaN from C rather than throwing an error? So I kept that behaviour in place but all tests also pass if we just removeunsafe_gammaand callgamma, so I am not sure what it's trying to accomplish or correct. If you tell me I will match your design choice, for now I hardcoded C-like behavior. Even more odd because for complex values you also just called gamma, so... ?I will also tag @juliohm and @oscardssmith, since they were part of the original chat on Julia Discourse (https://discourse.julialang.org/t/ann-meijerg-jl-a-julia-package-for-calculating-meijer-g-functions/136577/11) and Oscar is helping with Gamma.jl.
If this is approved and merged, this also paves the way for MeijerG.jl to become Julia native since gammas and pFq are all I need for that.