-
Notifications
You must be signed in to change notification settings - Fork 0
Run testthat Tests
#155
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
Run testthat Tests
#155
Conversation
|
We need to include a function that automatically loads all the functions defined in the Something like this should work: |
|
@PhilBoileau This is awesome! Hopefully we can get it merged in before the JOSS submission. A few of TODOs:
Let me know if you have any questions or want some help with these! |
|
Sounds good, thanks for these pointers! I'll try to knock these out by early next week. On the last TODO: I think I had left that there so that we could discuss the best path forward. We could try reaching out to package maintainers to see if they'd consider exporting the functions we need. In the meantime, we can copy these internal functions into |
|
Thanks so much, Phil! What are your thoughts on using |
|
Thanks for taking a look, @tiffanymtang! I unfortunately don't remember why I opted for |
|
Just finished making the requested changes, @jpdunc23 and @tiffanymtang. I had replaced |
|
I'll update the "Setting Up Your Simulation Study" vignette to reflect these additions. I'll ping you both once that's done for a review. |
tiffanymtang
left a comment
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.
Looks great! Thanks so much, Phil! I think it's fine to merge into main even though there's a strange error in one of the tests. I will look into that later.
|
Thanks for reviewing, @tiffanymtang! Will do. |
This PR provides functions for running
testthattests stored in thetests/testthatdirectory of asimChefsimulation study. This is accomplished through two new functions:run_tests(): This function searches fortests/testthat.R. If it finds this file, then it is ran. Otherwise, an error message stating that the file can't be found is printed to the console.test_sim_dir(): This function wraps aroundtestthat::test_dir(), running the dgp-, method-, evaluator- and visualizer-related tests in their respective directories. If usingcreate_sim(), this function is automatically added totests/testthat.R.These functions are somewhat brittle. They work best with simulation studies created with
create_sim(). If they are adopted, we'll need to modify documentation, like the "Setting Up Your Simulation" vignette, such that users are advised to generate new simulation projects withcreate_sim().