Tidyteam code review principles

Author

Davis Vaughan

Welcome

At Posit, we use code review to maintain the quality of our packages and products. Code review is also a great opportunity for newer contributors to learn and improve from constructive feedback provided by more experienced package developers.

The principles in this guide cover various aspects of the code review process. They are written with the tidyteam in mind, which make up the combination of the tidyverse, tidymodels, and mlops groups, but are generally applicable to a large amount of the software development we do at Posit.

This guide functions as:

  • A resource for new contributors, whether they are community members or Posit employees.

  • A linkable source of truth when there are questions about our code review process.

We mostly use GitHub as the hosting platform for our code, so many details of this guide are specific to GitHub’s tooling. Additionally, we have a number of R packages that facilitate working on R packages and authoring/reviewing pull requests, such as devtools and usethis. In particular, the family of usethis::pr_*() functions are extremely useful for managing pull requests on R packages.

We will use the abbreviation PR to mean a pull request.

Acknowledgements

This guide is a forked and modified version of Google’s code review principles.