Thanks for your interest in contributing to workflowr. Here are some guidelines to help make it easier to merge your Pull Request:
devtools::test()to run the tests
If you’re new to submitting Pull Requests, please read the section Contribute to other projects in the tutorial A quick introduction to version control with Git and GitHub.
For the most part, I try to follow the guidelines from R packages by Hadley Wickham. The unit tests are performed with testthat, the documentation is built with roxygen2, and the online package documentation is created with pkgdown. Continuous integration testing is performed for Linux by CircleCI, for macOS by Travis CI, and for Windows by AppVeyor. Code coverage is calculated with covr and Codecov.
The template files used by
wflow_start() to populate a new project are defined in the list
templates in the file
R/infrastructure.R. The RStudio project template is configured by
inst/rstudio/templates/project/wflow_start.dcf. The repository contains the files
LICENSE.md to both adhere to R package conventions for defining the license and also to make the license clear in a more conventional manner (suggestions for improvement welcome). The directory
scripts/ contains convenience scripts for maintaining the R package. The remaining directories are standard for R packages as described in the manual Writing R Extensions.
Convenience scripts for maintaining the package are located in
scripts/. These are not included in the package tarball for distribution. They are all intended to be executed from the root directory of the package. The convenience scripts include:
R CMD buildand
R CMD check
bump-version.Rbumps the version across all the necessary package files
contribute.Rperforms some basic checks that should be run before contributing a Pull Request
document.Rregenerates the documentation
sed.shperforms search/replace for all R files in the package
git logand make sure to reference GitHub Issues/PRs
git commit -am "Bump version: x.x.x.9xxx -> x.x.x and re-build docs."
git push origin masterand wait for CI builds to pass
git tag -a vx.x.x. Summarize NEWS.md entry into bullet points. Run
git tag -l -n9for past examples. Push with
git push origin --tags.
R CMD build .and upload to CRAN submission site. You will receive an email to request confirmation, then an email confirming the package was submitted, and then an email with the test results. Once it is accepted to CRAN, monitor the check results for any surprise errors. Also, these builds are when the binaries are built for Windows and macOS, so they aren’t available until they are finished. You will receive an email once all the Windows binaries are available for download (devel, release, oldrel).
You can monitor the status of the CRAN submission with the foghorn package: