diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c584b36..bb490ce 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,27 +1,27 @@ # Contributing to hubeau -This outlines how to propose a change to hubeau. +This outlines how to propose a change to hubeau. For more detailed info about contributing to this, and other tidyverse packages, please see the -[**development contributing guide**](https://rstd.io/tidy-contrib). +[**development contributing guide**](https://rstd.io/tidy-contrib). ## Fixing typos -You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the _source_ file. -This generally means you'll need to edit [roxygen2 comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, not a `.Rd` file. +You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the _source_ file. +This generally means you'll need to edit [roxygen2 comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, not a `.Rd` file. You can find the `.R` file that generates the `.Rd` by reading the comment in the first line. ## Bigger changes -If you want to make a bigger change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed. -If you’ve found a bug, please file an issue that illustrates the bug with a minimal +If you want to make a bigger change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed. +If you’ve found a bug, please file an issue that illustrates the bug with a minimal [reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write a unit test, if needed). ### Pull request process * Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("inrae/hubeau", fork = TRUE)`. -* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`. - If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing. +* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`. + If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing. * Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`. * Make your changes, commit to git, and then create a PR by running `usethis::pr_push()`, and following the prompts in your browser. @@ -32,13 +32,13 @@ If you’ve found a bug, please file an issue that illustrates the bug with a mi ### Code style -* New code should follow the tidyverse [style guide](https://style.tidyverse.org). - You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR. +* New code should follow the tidyverse [style guide](https://style.tidyverse.org). + You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR. -* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for documentation. +* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for documentation. -* We use [testthat](https://cran.r-project.org/package=testthat) for unit tests. - Contributions with test cases included are easier to accept. +* We use [testthat](https://cran.r-project.org/package=testthat) for unit tests. + Contributions with test cases included are easier to accept. ## How to add a new API / endpoint? @@ -46,7 +46,7 @@ If you’ve found a bug, please file an issue that illustrates the bug with a mi * Create a branch or a fork of the project to work on it * Check the page of the API on <https://hubeau.eaufrance.fr/page/apis> * Create a file `R/get_[API].R` -* Modify the file `data-raw/config.yml` to add the new API, the new endpoint and fill the list of available filter parameters +* Modify the file `data-raw/config.yml` to add the new API with its name and its path * Run the script `data-raw/configuration.R` to save these changes in the internal memory of the package * Copy and paste existing endpoint functions, the functions should be named `get_[API]_[endpoint]()` * Modify the file `man-roxygen/hubeau.md` to add new APIs / endpoints documentation links @@ -54,9 +54,9 @@ If you’ve found a bug, please file an issue that illustrates the bug with a mi * Commit your changes with this comment: > feat: Add API "Qualité de l'eau potable" -> +> > - (some details if necessary)... -> +> > Refs #5 * Push and ask a pull request :)