- Submit an issue on the Issues page
- be sure to include R session information and a reproducible example (repex).
- Fork this repo to your GitHub account
- Clone your version on your account down to your machine from your account, e.g,.
git clone https://github.com/<yourgithubusername>/rmangal.git
- Make sure to track progress upstream (i.e., on our version of
ropensci/rmangal) by doing
git remote add upstream https://github.com/ropensci/rmangal.git. Before making changes make sure to pull changes in from upstream by doing either
git fetch upstreamthen merge later or
git pull upstreamto fetch and merge in one step
- Make your changes (bonus points for making changes on a new feature branch)
- Please do write a test(s) for your changes if they affect code and not just docs (see Tests below)
- Push up to your account
- Submit a pull request to home base at
To add tests, go to the folder
tests/testthat/. Tests are generally organized as individual files for each exported function from the package (that is, listed as an export in the
NAMESPACE file). If you are adding a new exported function, add a new test file. If you are changing an existing function, work in the tests file for that function, unless it doesn’t have tests, in which case make a new test file.
The book R packages book provides a chapter on testing in general. Do consult that first if you aren’t familiar with testing in R.
The easiest set up to run tests is from within an R session:
To test an individual test file
To run all tests
If you are running tests that have
skip_on_cran() in them, set
Sys.setenv(NOT_CRAN = "true") prior to running tests.
In addition to changing the code, do make sure to update the documentation if applicable. The R packages book book has a chapter on documentation you should read if you aren’t familiar.
After code and documentation has been changed, update documentation by running either
Make sure if you change what packages or even functions within packages are imported, most likely add the package to Imports in the DESCRIPTION file.
Be conservative about adding new dependencies.