`testthat` integration
PhilBoileau opened this issue · 4 comments
Have you considered integrating a unit testing framework with simChef
? Is is even possible? If so, unit tests could add a degree of robustness. I can imagine this feature being useful when, for example, submitting supporting simulation studies in statistical analysis plans.
If I understand correctly, I think this is more or less already possible with existing tools. For example, users can (and should) write unit tests, e.g. using testthat
, to check the validity of their dgp_fun
s, method_fun
s, helpers, etc. One thing we want to do is expand the docs to include some suggestions for how to organize a project that uses simChef
, so that would include unit testing as well.
But I think I'm not fully understanding what you have in mind. Can you say more?
No that's exactly what I meant. I should have noted that this isn't a true issue --- I'm just hoping to start a conversation.
Discussing unit and integration testing in those docs would be incredibly helpful. You've probably thought about this already, but users might also appreciate the ability to (optionally) automatically run these tests when calling run_experiment()
. These tests could run before the actual simulations begin, with warnings and errors halting the experiment. A summary of the tests might be reported in the summary notebook produced by create_rmd()
.
You've probably thought about this already, but users might also appreciate the ability to (optionally) automatically run these tests when calling
run_experiment()
. These tests could run before the actual simulations begin, with warnings and errors halting the experiment. A summary of the tests might be reported in the summary notebook produced bycreate_rmd()
.
I hadn't thought about this, but I think it's an interesting idea. Some formal integration of unit testing also aligns well with our goal of providing tools that encourage high-quality simulation study design. Is this something you'd be interested in helping to implement?
Certainly, I’d be happy to work on this.