README.md

comoDTC

R-CMD-check Codecov test coverage

The goal of comoDTC is to provide an R package version of https://github.com/bogaotory/comoOdeCpp

Installation

You can install the released version of comoDTC from CRAN with:

install.packages("comoDTC")

Example

This is a basic example which shows you how to solve a common problem:

library(comoDTC)
## basic example code

Contributing

The comoDTC package is under active development. If you find a bug or have ideas about new features, please open an issue.

If you've not created an R package before and would like to contribute, we'd recommend reading the whole game chapter of Wickham and Bryan. In developing this package, we encourage contributors to use the usethis package (discussed within the chapter), since it automates many of the commonly required workflows like:

We ask that contributions to comoDTC follow the following workflow:

  1. search existing issues to check whether one exists that describes the change / addition to the code base you'd like to make; if not, make a new issue
  2. clone the repo and create a new branch that is named i[issue number]-[approximate issue name]. For example, the "Create contributing docs issue" that was the basis for this change was issue #8, so the branch is named i8-contributing-docs
  3. make local changes to your branch
  4. pre-commit checks:
    • No style issues (see below): lintr::lint_package()
    • All tests pass(see below): devtools::check()
  5. push your changes to the repo.
  6. create a pull request which describes this contribution and refers back to the original issue
  7. check that pull request passes github workflow tests
  8. assign at least one reviewer
  9. respond to reviewer comments and continue to work on code until it passes reviewer tests
  10. merge branch into master
  11. close original issue referring to the pull request that merged into master

Code tests in comoDTC

To check the validity of the code, we run a series of tests that (amongst other things):

All of these tests can be run locally using devtools::check(). It is often useful to run individual checks locally (as they're faster) when trying to address a failing test:

Style and Linting

To make the package easier to read for users and the large number of participants we are using the style guidelines of Hadley Wickham's The tidyverse style guide.

Compliance with this style guide can be checked for using the lintr package (installed via install.packages('lintr')) as follows: - The R code in a file may be analysed using lintr::lint(file_path) - The R code in a directory may be analysed using lintr::lint_dir(dir_path) - The R code in an entire package may be analysed using lintr::lint_package(pkg_path) or lintr::lint_package() from the open package. As with tests, it can be useful to lint individual files and directories worked on as this will run faster.



Como-DTC-Collaboration/comoDTC documentation built on March 17, 2021, 10:12 p.m.