[Bug] Skip sdreport calculation when optimize=FALSE to prevent NaN warning#1102
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1102 +/- ##
===========================================
+ Coverage 70.58% 86.14% +15.56%
===========================================
Files 52 81 +29
Lines 1914 7905 +5991
Branches 512 517 +5
===========================================
+ Hits 1351 6810 +5459
- Misses 496 1087 +591
+ Partials 67 8 -59 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot, can you fix the following error from rcmdcheck? |
... The error message appears to be cut off. Could you provide the complete error output from the vignette build? The snippet shows it's quitting from the That said, I'll investigate potential issues with the changes to ensure
... Fixed in commit 1ea6de0. The issue was an uninitialized Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot, here is the error:
|
|
@copilot, can you work on this error?: |
Fixed in commit b17d988. Added Doxygen documentation for the |
msupernaw
left a comment
There was a problem hiding this comment.
@Andrea-Havron-NOAA I think the "optimize" as a function parameter in get_report function should be something more self describing. "optimize" may give the user the impression that an optimization will be preformed on the model during the get_report call. I think a name like "do_sd_report" may be more appropriate.
@msupernaw, I changed "optimize" to "do_sd_report". Any other recommended changes or is this PR ready for approval? |
kellijohnson-NOAA
left a comment
There was a problem hiding this comment.
@Andrea-Havron-NOAA thank you for initiating this PR. I think some of the logic is overcomplicated though. I have made local changes related to all of my comments and I am testing them out before I push. The biggest thing is that FIMSFit does not need optimize because that information can be found in opt object already. Also, if we were to report optimize it would be duplicated with the information provided in max_gradient because if max_gradient = NA then the model was not optimized.
If we decide to keep the reporting for some reason, we will need to add that to the documented return of FIMSFit, which was not done.
No need for you to make any of the suggested changes as I have them all on my local machine and I will push once they pass.
Second, I also added a google test for the virtual function of get_json to ensure that when the class doesn't exist that you get the warning message. This was reported as a line that was not being tested and why this PR was decreasing our code coverage.
fd30236 to
db1338d
Compare
to skip sdreport when optimize = FALSE in fit_fims() Co-authored-by: Andrea-Havron-NOAA <85530309+Andrea-Havron-NOAA@users.noreply.github.com>
db1338d to
e368ed7
Compare
|
The google test ended up not working out b/c Rcpp was involved so I scratched it. Once the checks pass this will be merged into main and we will do a hotfix release. |
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.