CONTRIBUTING.md

How you can contribute

Thanks for your interest in contributing to VISCtemplates! There are several ways you can contribute to this package:

Development guidelines

We follow the Gitflow development model and the guidelines from R packages by Hadley Wickham and Jenny Bryan.

  1. Create a branch in git and make your changes.

    • Write your code.
    • Restart R Session Cmd+Shift+F10 (Ctrl+Shift+F10 for Windows)
    • Build and Reload Cmd+Shift+B (Ctrl+Shift+B for Windows)
    • Test Package Cmd+Shift+T (Ctrl+Shift+T for Windows)
    • Document Package Cmd+Shift+D (Ctrl+Shift+D for Windows)
    • Check Package Cmd+Shift+E (Ctrl+Shift+E for Windows)
  2. Push branch to github and issue a pull request (PR).

  3. Discuss the pull request.

  4. Iterate until the maintainer accepts the PR or decides it's not a good fit for VISCtemplates.

This might feel overwhelming the first time you get set up, but it gets easier with practice.

Before every commit

Before you commit, run the following commands one more time to make sure you didn’t break anything.

Pull requests

Your pull request should follow these guidelines:

  1. Motivation for changes. Your pull request should clearly and concisely motivate the need for change.
  2. Only related changes. Before you submit your pull request, please check to make sure that you haven't accidentally included any unrelated changes. These make it harder to see exactly what's changed, and to evaluate any unexpected side effects. Each PR corresponds to a git branch, so if you expect to submit multiple changes make sure to create multiple branches.

  3. Coding style. Please follow the official tidyverse style. Maintaining a consistent style across the whole code base makes it much easier to jump into the code. If you're modifying existing VISCtemplates code that doesn't follow the style guide, a separate pull request to fix the style would be greatly appreciated.

  4. Documentation. If you're adding new parameters or a new function, you'll also need to document them with roxygen. Make sure to re-run devtools::document() on the code before submitting.

  5. If fixing a bug or adding a new feature, please add a testthat unit test.

Code of conduct

Please note that VISCtemplates is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Learn about package development

Before contributing, you may want to read a bit more about package development in general.

This contributing guide was inspired by and modified from the ggplot2 contributing.md, rOpenSci's contributing guide, and this template.



FredHutch/VISCfunctions documentation built on Oct. 14, 2024, 11:33 p.m.