|
| 1 | +# Contributing to CatastRo |
| 2 | + |
| 3 | +This outlines how to propose a change to CatastRo. For a detailed discussion on |
| 4 | +contributing to this and other tidyverse packages, please see the [development |
| 5 | +contributing guide](https://rstd.io/tidy-contrib) and our [code review |
| 6 | +principles](https://code-review.tidyverse.org/). |
| 7 | + |
| 8 | +## Fixing typos |
| 9 | + |
| 10 | +You can fix typos, spelling mistakes, or grammatical errors in the documentation |
| 11 | +directly using the GitHub web interface, as long as the changes are made in the |
| 12 | +_source_ file. This generally means you'll need to edit [roxygen2 |
| 13 | +comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, not a |
| 14 | +`.Rd` file. You can find the `.R` file that generates the `.Rd` by reading the |
| 15 | +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 issue and |
| 20 | +make sure someone from the team agrees that it’s needed. If you’ve found a bug, |
| 21 | +please file an issue that illustrates the bug with a minimal |
| 22 | +[reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write |
| 23 | +a unit test, if needed). See our guide on [how to create a great |
| 24 | +issue](https://code-review.tidyverse.org/issues/) for more advice. |
| 25 | + |
| 26 | +### Pull request process |
| 27 | + |
| 28 | +- Fork the package and clone onto your computer. If you haven't done this |
| 29 | + before, we recommend using |
| 30 | + `usethis::create_from_github("rOpenSpain/CatastRo", fork = TRUE)`. |
| 31 | + |
| 32 | +- Install all development dependencies with `devtools::install_dev_deps()`, |
| 33 | + and then make sure the package passes R CMD check by running |
| 34 | + `devtools::check()`. If R CMD check doesn't pass cleanly, it's a good idea |
| 35 | + to ask for help before continuing. |
| 36 | + |
| 37 | +- Create a Git branch for your pull request (PR). We recommend using |
| 38 | + `usethis::pr_init("brief-description-of-change")`. |
| 39 | + |
| 40 | +- Make your changes, commit to git, and then create a PR by running |
| 41 | + `usethis::pr_push()`, and following the prompts in your browser. The title |
| 42 | + of your PR should briefly describe the change. The body of your PR should |
| 43 | + contain `Fixes #issue-number`. |
| 44 | + |
| 45 | +- For user-facing changes, add a bullet to the top of `NEWS.md` (i.e. just |
| 46 | + below the first header). Follow the style described in |
| 47 | + <https://style.tidyverse.org/news.html>. |
| 48 | + |
| 49 | +### Code style |
| 50 | + |
| 51 | +- New code should follow the tidyverse [style |
| 52 | + guide](https://style.tidyverse.org). You can use |
| 53 | + [Air](https://posit-dev.github.io/air/) to apply this style, but please |
| 54 | + don't restyle code that has nothing to do with your PR. |
| 55 | + |
| 56 | +- We use [roxygen2](https://cran.r-project.org/package=roxygen2), with |
| 57 | + [Markdown |
| 58 | + syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), |
| 59 | + for documentation. |
| 60 | + |
| 61 | +- We use [testthat](https://cran.r-project.org/package=testthat) for unit |
| 62 | + tests. Contributions with test cases included are easier to accept. |
| 63 | + |
| 64 | +## Thanks for contributing! |
| 65 | + |
| 66 | +This contributing guide is adapted from the tidyverse contributing guide |
| 67 | +available at <https://tidyverse.tidyverse.org/CONTRIBUTING.html>. |
0 commit comments