/
CONTRIBUTING
43 lines (23 loc) · 2.16 KB
/
CONTRIBUTING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#Guidelines for Contributing
Thanks for checking out our project! If you haven't already, please check out the README for general info about this project.
##Contributor Code of Conduct
All contributors will be expected to follow our code of conduct.
If you wish to contribute, we ask that you use one of the following two methods for contributing:
Create an issue -- if you spot any typos, bugs, or have general suggestions, etc. You can also use this to participate in ongoing discussions.
Fork and create a pull request -- if you have suggested bug fixes, changes or want to add or expand functionalities. We ask that you follow the ROpenSci guidelines on documentation and testing, the most important of which are listed below.
###Documentation
If you are contributing code to this project, you generally don't need any additional packages, since the documentation will be written as comments in the R scripts.
In most cases, you'll be creating a new function and then documenting it. You can check the existing functions for examples, but but documentation should include the following fields preceded by [#']: @title, @description, @param, @return, @examples, @details, @export
###Testing
If you are adding new functionality, please include automated tests to verify that some of the basic functionality is correct.
Automated testing uses R scripts, that live in the tests/testthat/ subfolder for the package. For each new file with functions, please add an associated test file.
###Building
To fully build the package, including documentation, running-tests, you will need the roxygen2, the testthat, and the devtools package.
Specific operations are then done by calling the appropriate functions from within R, while your working directory is somewhere in the package folder.
The suggested workflow is:
Write code, documentation, and tests.
devtools::document() to generate the documentation files and update the NAMESPACE file.
roxygenize() to improve the documentation
devtools::install() to install the new version of the package.
Attribution
This document is based on the CONTRIBUTING file associated with the Beta release of the portalr package and is used under the MIT License.