Skip to content

Commit

Permalink
Update 02-why-containers.qmd
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy authored Dec 10, 2024
1 parent e6abb9a commit 42aa293
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 02-why-containers.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,15 @@ ottrpal::include_slide("https://docs.google.com/presentation/d/1T5Lfei2UVou9b0qa

### Unit Testing

You may not think of yourself as a software developer if you primarily write code for analyses. But this is still software! Just a different kind. In fact any kind of scientific code can still benefit from testing and automation. Our companion course about GitHub Actions and Continous Integration / Continuous Deployment principles go into more detail about this.
You may not think of yourself as a software developer if you primarily write code for analyses. But this is still software! Just a different kind. In fact any kind of scientific code can still benefit from testing and automation. [Our companion course about GitHub Actions and Continous Integration / Continuous Deployment](https://hutchdatascience.org/GitHub_Automation_for_Scientists/introduction.html) principles go into more detail about this.

But containers and automated testing of code go hand in hand. Rather than having your collaborator test it, it may be worth your while to have the code automatically tested, or the analysis automatically re-run upon the creation of a pull request.

Unit testing then is a way to test each individual component of a code base. Whatever the smallest unit you can break your code down into should be tested. Each function should have a reproducible example that is re-run upon introducing new changes in a pull request. This way it will save you time by letting you know which part of the code may have broken with new changes.

Containers assist with unit testing by allowing for a standard computing environment as well as ways to easily test code as it would be run in different operating systems: Macs, PCs, Linuxes, etc.


To summarize:

```{r, out.width = "100%", echo = FALSE}
Expand Down

0 comments on commit 42aa293

Please sign in to comment.