I would love to have you contribute to dndR
if that is of interest! I would divide contributions into two categories: (1) function ideas that aren't coded and (2) functions that are written in scripts. Once you've decided which of these categories you fall into, follow the instructions under the relevant subheading.
If you have an idea for a function open a GitHub issue and tell me about it! Be sure to include as much detail about what the function does (and the limits of its power) as possible. I'll read through your issue and comment on it with any follow-up questions/comments I have.
If you've already written up an R function in a script you have two options for getting it added to dndR
:
Scripts Option A
- Open a GitHub issue 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 - Add your function script (and any necessary data files) into the
dev
folder (see here)- The
dev
folder is crucial because it's tracked by Git but not built intodndR
. Putting your content there means small errors in your script (if any exist) won't affect the larger development version ofdndR
- The
- Commit / push those changes to your fork
- Open a pull request 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
In return for your generous contribution to dndR
I'll give you the following modes of credit:
- 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)
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!
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!
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.