Use testthat edition 3 & fix imports - #246
Conversation
|
Hi @sangeetabhatia03, sorry for the delay on this! I've updated the tests to testthat edition 3 which was pretty straightforward, and then added some snapshot tests, especially for the gibs draws functions (which was not too bad but a tad more complicated because of the custom snapshot tests and trying to avoid problems with randomization across different OS). I also added a snapshot test for the Wallinga Teunis function which fails on devel because they changed a randomization procedure. I'm skipping that test on devel for now, but once R updates we'll probably have to update the snapshot, but that seems like a later problem? The linters are failing because I fixed a warning in plot.R but did not fix all the lint problems there (I think better to do that in a dedicated PR and I should have resisted the urge to fix the warning, but ah well). I think it's good to go now. Once you've had a look, we can merge into main, and then I think you could merge main into #244, possibly refactor the tests to match the new functions you've created, but I think it shouldn't be strictly necessary (I'm happy to do that if needed). Then we should be able to merge #244 🎉 (I've taken a look and as far as I can tell it's good, but with so many changes it can't hurt to have the tests). |
|
hi @steffilazerte I have added some minor comments; these changes will trigger a build failure with an older version of testthat. e.g. I get the following error: when testing with v3.1.7. So we either modify the offending function, or update the DESCRIPTION file. |
Pull Request - Ready for review
plot(),wallinga_teunis()andestimate_R()where incidence/incidence two functions are requiredChecklist
NEWS.mdwith a short description of my change