Skip to content

Commit 17c67ce

Browse files
committed
Create CONTRIBUTING.md
based on tidyverse
1 parent bf145fc commit 17c67ce

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/CONTRIBUTING.md

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

0 commit comments

Comments
 (0)