Skip to content

Commit

Permalink
Added style guide to contributing guidelines and rebuilt pkgdown site
Browse files Browse the repository at this point in the history
  • Loading branch information
njlyon0 committed Apr 4, 2024
1 parent e76d550 commit 14696ae
Show file tree
Hide file tree
Showing 57 changed files with 498 additions and 201 deletions.
33 changes: 16 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,30 @@ If you've already written up an R function in a script you have two options for

**Scripts Option A**

- [Open a GitHub issue](https://github.com/njlyon0/dndR/issues) and paste your function into it

- I can then do the necessary formatting to get it to fit in the larger package architecture
- [Open a GitHub issue](https://github.com/njlyon0/dndR/issues) and paste your function into it
- I can then do the necessary formatting to get it to fit in the larger package architecture

**Scripts Option B**

- [Fork the `dndR` repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo)

- Add your function script (and any necessary data files) **<u>into the `dev` folder</u>** (see [here](https://github.com/njlyon0/dndR/tree/main/dev))
- [Fork the `dndR` repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
- Add your function script (and any necessary data files) **<u>into the `dev` folder</u>** (see [here](https://github.com/njlyon0/dndR/tree/main/dev))
- The `dev` folder is crucial because it's tracked by Git but not built into `dndR`. Putting your content there means small errors in your script (if any exist) won't affect the larger development version of `dndR`
- Commit / push those changes to your fork
- [Open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) with your changes
- I'll merge the pull request and then do the necessary formatting and development checks to get the function smoothly integrated with the package

- Commit / push those changes to your fork
## Contribution Credit

- [Open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) with your changes
In return for your generous contribution to `dndR` I'll give you the following modes of credit:

- I'll merge the pull request and then do the necessary formatting and development checks to get the function smoothly integrated with the package
- Add you as a contributor/author in the `DESCRIPTION` of the package with a link to a professional website of your choosing
- Put your name in the README of the repository next to the description of your function
- Add your name to the function description (see `?dndR::party_diagram` or `?dndR::pc_level_calc` as examples of this)

## Contribution Credit
## Style Guide

In return for your generous contribution to `dndR` I'll give you the following modes of credit:
When you contribute code you _do not_ need to make sure that code adheres to a particular style. That said, all functions in `dndR` will eventually need to be in "snake case" (i.e., all lowercase with words separated by underscores). I am happy to make those style edits though so if that level of edit does not spark joy for you, don't sweat it!

- Add you as a contributor in the `DESCRIPTION` of the package with a link to a professional website of your choosing

- Put your name in the README of the repository next to the description of your function

- Add your name to the function description (see `?dndR::party_diagram` or `?dndR::pc_level_calc` as examples of this)
For functions that print informative messages, there will also need to be a `quiet` argument that allows for easy silencing of those messages. Check out `?dndR::party_diagram` for an example. Just like the snake case though, I'm happy to add this argument!

Note that I make no distinction between contributing a function idea and contributing written code in terms of credit received.
Style guide TL;DR (Too Long; Didn't Read): `dndR` has specific style guidelines but I'd rather you submit functions that don't meet those guidelines than not contribute your ideas because the style bits were too cumbersome.
9 changes: 8 additions & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 25 additions & 13 deletions docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 14696ae

Please sign in to comment.