-
Notifications
You must be signed in to change notification settings - Fork 431
Fix R test references and make them reproducible #2007
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2007 +/- ##
==========================================
- Coverage 86.44% 86.37% -0.07%
==========================================
Files 147 147
Lines 8837 8837
==========================================
- Hits 7639 7633 -6
- Misses 1198 1204 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| "X": [1.80115497975516, 1.39357092294611, 0.679396397136899, 1.39357092294611, 1.32682592836847, 0.624106043062951, 0.679396397136899, 0.624106043062951, 0.431228950208813], | ||
| "lpdf": [-0.598439090738466] | ||
| "X": [0.48516264401941139, 0.21974036159989954, -0.13995828882732522, 0.21974036159989954, 0.28855250002048116, -0.23735060033573027, -0.13995828882732522, -0.23735060033573027, 0.61858504476347143], | ||
| "lpdf": [-0.092239036945123282] |
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.
So this was incorrect before?
| @@ -339,16 +336,15 @@ | |||
| "skewness": "nan" | |||
| }, | |||
| "points": [ | |||
| { "x": -1.2, "pdf": 0, "logpdf": "-inf", "cdf": 0 }, | |||
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.
Any idea why this line and others disappear?
|
|
||
| on: | ||
| schedule: | ||
| - cron: '00 00 * * *' |
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.
Running this once per month or week would probably be enough? It hasn't been run for years. ;-)
BTW, if it fails, will we be notified (e.g. with an issue)? Otherwise it could fail silently for a long time.
When working on adding a new distribution, I realized (once again) that the R test references can't be re-generated currently since running
Rscript gendref.Rerrors:LindleyRpackage is not available anymoredistr = StudentizedRange(...)since the functiondistr$pdfis undefinedtruncated(Normal(...), ...)is not a valid reference name as it can't be mapped to a reference distributionMoreover, after commenting out these three reference distribution types rerunning
Rscript gendref.Rchanges reference values for most distributions.This PR tries to fix the setup of the R reference tests:
renvfor a reproducible package environmentLindleyRwithnew.distpackage::functionsyntax instead of relying onlibrary(package)in other source filesStudentizedRangeby finite differencing of (log)cdfdistr$dtypeanddistr$expr(to supporttruncated(...)properly)StanHeadersinstead ofrstanErlangandNormalCanon)Rscript gendref.R