FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
4 stars 2 forks source link

add tests 😬 #136

Closed mayerbry closed 3 days ago

mayerbry commented 3 months ago

will require discussion, but something to consider for new features

kelliemac commented 3 months ago

it would be a good idea to create a template for pull requests that specifies that new tests should be added along with any new features or bug fixes

slager commented 2 months ago

Some progress on this is that we do have a tests/testthat folder set up now running one test file for visc_load_pdata, so the framework is there for adding additional tests and test files.

kelliemac commented 2 months ago

good point dave. we can also consider additional github actions (e.g., to test setting up a new analysis project repo structure and compile the Rmd to docx and pdf)

kelliemac commented 1 month ago

@lemireg is working on tests for rendering reports

kelliemac commented 4 weeks ago

chatting with @slager today, noted that we will need to add an argument for the interactive functions (e.g., create_visc_project and use_visc_report) so that the functions can be run non-interactively in a unit test context. this should be relatively straightforward: we can just add an optional argument that defaults to current interactive behavior, something like interactive = TRUE

slager commented 6 days ago

Is this issue ready to be marked as resolved, @kelliemac?

Reviewing the comments above, the only potentially outstanding item I saw was instructions for including unit tests in new features and bug fixes in PRs, but it looks like that is already included here:

https://github.com/FredHutch/VISCtemplates/blob/main/CONTRIBUTING.md#pull-requests

kelliemac commented 5 days ago

@mayerbry are there any other kinds of tests you had in mind? if nothing specific, I think we can close this.

mayerbry commented 3 days ago

@slager thanks for setting up the testing framework! I'm going to close this issue.