|
| 1 | +# Contributing to projpred |
| 2 | + |
| 3 | +This outlines how to propose a change to projpred and is based on |
| 4 | +similar instructions for tidyverse packages, including the contributing |
| 5 | +guidelines generated by `usethis::use_tidy_contributing()`. |
| 6 | + |
| 7 | +## Fixing typos |
| 8 | + |
| 9 | +You can fix typos, spelling mistakes, or grammatical errors in the |
| 10 | +documentation directly using the GitHub web interface, as long as the |
| 11 | +changes are made in the *source* file. This generally means you’ll need |
| 12 | +to edit [roxygen2 |
| 13 | +comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, |
| 14 | +not a `.Rd` file. You can find the `.R` file that generates the `.Rd` by |
| 15 | +reading the comment in the first line. |
| 16 | + |
| 17 | +## Bigger changes |
| 18 | + |
| 19 | +If you want to make a bigger change, it’s a good idea to first file an |
| 20 | +issue and make sure someone from the team agrees that it’s needed. If |
| 21 | +you’ve found a bug, please file an issue that illustrates the bug with a |
| 22 | +minimal reproducible example (see e.g. the [tidyverse reprex |
| 23 | +instructions](https://www.tidyverse.org/help/#reprex)). The tidyverse |
| 24 | +guide on [how to create a great |
| 25 | +issue](https://code-review.tidyverse.org/issues/) has more advice. |
| 26 | + |
| 27 | +### Pull request process |
| 28 | + |
| 29 | +If you are new to creating pull requests here are some tips. Using the |
| 30 | +functions from the `usethis` package is not required but can be helpful |
| 31 | +if this process is new to you. |
| 32 | + |
| 33 | +- Fork the package and clone onto your computer. If you haven’t done |
| 34 | + this before, we recommend using |
| 35 | + `usethis::create_from_github("stan-dev/projpred", fork = TRUE)`. |
| 36 | + |
| 37 | +- Install all development dependencies with |
| 38 | + `devtools::install_dev_deps()`, and then make sure the package passes |
| 39 | + R CMD check by running `devtools::check()`. If R CMD check doesn’t |
| 40 | + pass cleanly, it’s a good idea to ask for help before continuing. |
| 41 | + |
| 42 | +- Create a Git branch for your pull request (PR). We recommend using |
| 43 | + `usethis::pr_init("brief-description-of-change")`. |
| 44 | + |
| 45 | +- Make your changes, commit to git, and then create a PR by running |
| 46 | + `usethis::pr_push()`, and following the prompts in your browser. The |
| 47 | + title of your PR should briefly describe the change. The body of your |
| 48 | + PR should contain `Fixes #issue-number`. |
| 49 | + |
| 50 | +- For user-facing changes, add a bullet to the top of `NEWS.md` |
| 51 | + (i.e. just below the first header). Follow the style already used in |
| 52 | + `NEWS.md`. |
| 53 | + |
| 54 | +### Code style |
| 55 | + |
| 56 | +- New code should attempt to follow the style used in the package. When |
| 57 | + in doubt follow the tidyverse [style |
| 58 | + guide](https://style.tidyverse.org). |
| 59 | + |
| 60 | +- We use [roxygen2](https://cran.r-project.org/package=roxygen2), with |
| 61 | + [Markdown |
| 62 | + syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), |
| 63 | + for documentation. |
| 64 | + |
| 65 | +- We use [testthat](https://cran.r-project.org/package=testthat) for |
| 66 | + unit tests. Contributions with test cases included are easier to |
| 67 | + accept. |
| 68 | + |
| 69 | +## Code of Conduct |
| 70 | + |
| 71 | +Please note that the projpred project follows the Stan project’s [Code |
| 72 | +of |
| 73 | +Conduct](https://discourse.mc-stan.org/t/announcing-our-new-stan-code-of-conduct/23764). |
| 74 | +By contributing to this project you agree to abide by its terms. |
0 commit comments