|
| 1 | +# Contributing to gggda development |
| 2 | + |
| 3 | +The goal of this guide is to help contributors to **gggda** plan their |
| 4 | +contributions and navigate the process. The sections below cover |
| 5 | +different types of contributions, usually with increasing degrees of |
| 6 | +proposed change. |
| 7 | + |
| 8 | +Note that **gggda** is released with a [Contributor Code of |
| 9 | +Conduct](CODE_OF_CONDUCT.md). By contributing, you agree to its terms. |
| 10 | + |
| 11 | +This guide was copied from [that of |
| 12 | +**ordr**](https://github.com/corybrunson/ordr/blob/main/CONTRIBUTING.md), |
| 13 | +which was loosely adapted from the contributing guides [for |
| 14 | +**ggplot2**](https://github.com/tidyverse/ggplot2/blob/main/CONTRIBUTING.md) |
| 15 | +and [from |
| 16 | +ropensci](https://github.com/ropensci/dotgithubfiles/blob/main/dotgithub/CONTRIBUTING.md). |
| 17 | +If you have questions about or suggestions for this guide, please feel |
| 18 | +free to contact a package maintainer. |
| 19 | + |
| 20 | +## Editor |
| 21 | + |
| 22 | +**Small edits to comments, documentation, and other non-code files** may |
| 23 | +be made using [the GitHub file |
| 24 | +editor](https://help.github.com/en/github/managing-files-in-a-repository/editing-files-in-your-repository). |
| 25 | +To edit **roxygen2** documentation, make changes to a source file |
| 26 | +`R/<topic>.r`, on a line that begins with `#'`, rather than to a |
| 27 | +documentation file `man/<topic>.Rd`. |
| 28 | + |
| 29 | +For more guidance on **roxygen2** documentation, see [this |
| 30 | +chapter](http://r-pkgs.had.co.nz/man.md) in the online book *R |
| 31 | +packages*. |
| 32 | + |
| 33 | +## Issues |
| 34 | + |
| 35 | +**Questions, possible bugs, feature requests, other open-ended issues** |
| 36 | +may be raised as [issues on |
| 37 | +GitHub](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue). |
| 38 | +In most cases, the issue should consist of two sections: a description |
| 39 | +of the issue, and a reproducible example of it. A reproducible example |
| 40 | +should attach packages, include data, and execute code: |
| 41 | + |
| 42 | +1. Attach all relevant packages at the top of the example. |
| 43 | + |
| 44 | +2. Use as small a data set as you can conveniently get that illustrates |
| 45 | + the issue. Once you have such a data set, the best way to include it |
| 46 | + in the example is to re-create it using |
| 47 | + [`data.frame()`](https://rdrr.io/r/base/data.frame.html) or some |
| 48 | + other constructor function. Another way is as follows: |
| 49 | + |
| 50 | + 1. Execute `dput(data)` in R, where `data` is the data set. |
| 51 | + 2. Copy the output. |
| 52 | + 3. Paste into the example after the package attachments. |
| 53 | + |
| 54 | +3. Use as few lines or steps of code as feasible to illustrate the |
| 55 | + issue. Add comments at key steps. |
| 56 | + |
| 57 | +For more guidance on reproducible examples, see [this |
| 58 | +vignette](https://reprex.tidyverse.org/articles/reprex-dos-and-donts.html) |
| 59 | +for the **reprex** package. |
| 60 | + |
| 61 | +## Pull requests |
| 62 | + |
| 63 | +**Bug fixes, feature upgrades, and other substantive, self-contained |
| 64 | +changes** may be contributed via [pull |
| 65 | +request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests). |
| 66 | +Unless previously discussed with a maintainer, please follow these |
| 67 | +steps: |
| 68 | + |
| 69 | +1. Fork the home repository (`corybrunson/gggda`). |
| 70 | +2. Create a new (local) branch on which to make changes. If |
| 71 | + appropriate, update the documentation on this branch and run |
| 72 | + functionality checks (e.g. using the **devtools** package). |
| 73 | +3. Push this branch to the fork and open a pull request to the home |
| 74 | + repository. |
| 75 | +4. With the maintainer(s), discuss and (if necessary) update the pull |
| 76 | + request until it is accepted or decided against. *In the latter |
| 77 | + case, a clear and consistent reason should be provided by the |
| 78 | + maintainer(s).* |
| 79 | + |
| 80 | +For more guidance on the pull request process, see [the contributing |
| 81 | +guidelines for |
| 82 | +**ggplot2**](https://github.com/tidyverse/ggplot2/blob/main/CONTRIBUTING.md). |
0 commit comments