Thank you so much for your interest in contributing to projmanr. I am currently the only person working on this project so any help is greatly appreciated!
There are a number of ways to contribute to this project!
Anyone wishing to contribute to this package should first read Hadley Wickham's book on R package development. The book is a fairly short read and can be found for free here. This package was developed almost entirely following the instruction of that book, so reading it will give you most of what you need to contribute.
This project follows the standard fork and pull request workflow. You can read about that here.
Any 'public' functions (i.e functions that a user can call using the package), should exist in the 'critical_path.R' file. These should be appended to what already exists.
Any helper functions should go in the 'utility_functions.R' file, again, being appended to what already exists.
The coding style of this package is enforced by the 'lintr' package. After installing it, run
lintr::lint_package()
and correct all style errors identified.
All 'public' functions are required to have roxygen2 commenting as defined here. These functions should at the very least have a function description, a description of all parameters, and a description of the return value. Any additional commenting fields (i.e usage, examples) are recommended but not required.
There should also be liberal use of commenting throughout the code, with a line comment for every line or two of non-trivial code being the preferred frequency.
Currently, all non-public functions have only a line of two of line comments for docstrings, however I am currently in the process of transitioning to use the standards defined in the 'docstring' package, so all new functions should follow this guide.
Rather than unit testing, this package testing structure has largely been built around functional testing. In other words, toy data sets are set up and run through a variety of tests to ensure the functions are returning desired results. At some point in the future, I do intend to add unit tests, but for now, functional tests will suffice.
Any modifications or additions to the code should not break any of the current tests, and additional tests should be added to the code for any change or addition to functionality. For this, it's easiest to look at the tests that have already been written and follow those as an example.
Further, all code must pass all of CRAN and Rstudio's package checks for R. In Rstudio, you can test this by running the 'Build' -> 'Check' command, or 'Ctrl+Shift+E'. You should also add the following flags to your Build Tool Configuration for checks: '--no-manual --as-cran'
Generally, I would like to keep as much of this package as possible in pure R. That being said, occasionaly features may arise that make more sense to develop in C++ and Rcpp (such as the simulation functionaltiy).
If you feel the need to develop features in C++ and feel comfortable doing so, I certainly will not discourage such development. Contrary to R code, I will not enforce as strict of coding style standards with C++ code since there are far fewer tools to make this process easy. The few standards I would like followed are listed below: 1. No lines of code should exceed 80 characters. 2. Variable names and function/method names should also be lowercase with underscores to separate words. Class names should be CamelCase (uppercase letter to start with, words run together, each starting with an uppercase letter). 3. Code should be well documented and commented.
When submitting pull requests, I ask that you include a description of the features you have included, the tests that you have run on that feature, and the results of running a check on the package. Further, please include information about the operating system that you have developed and tested the code on.
If you have any questions about development, please email them to me directly instead of opening them up as issues. Thanks in advance for your contributions!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.