Thanks for your interest in contributing to workflowr. Here are some guidelines to help make it easier to merge your Pull Request:

  • For potentially large changes, please open an Issue first to discuss
  • Please submit Pull Requests to the “dev” branch
  • Please follow the Hadley style guide
  • Please run the file contribute.R to check your changes
  • (Optional) Run devtools::test() to run the tests
  • (Optional) Add new test(s) in tests/testthat/

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.

Explanation of branches

branch name purpose
master stable branch for end users
dev development branch - submit Pull Requests here

More about this repository

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, the online package documentation is created with pkgdown, continuous integration testing is performed for Linux and macOS by Travis CI and for Windows by AppVeyor, and 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 and 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). document.R is a convenience script for regenerating the documentation. build.sh is a convenience script for running R CMD check. The remaining directories are standard for R packages as described in the manual Writing R Extensions.

Release checklist (for maintainers)

  • Bump version in DESCRIPTION, NEWS.md, and the test _workflowr.yml file
  • Bump date in DESCRIPTION
  • Update NEWS.md: Check git log and make sure to reference GitHub Issues/PRs
  • Run document.R to update Rd files, install the package locally, and build the online documentation with pkgdown
  • Run build.sh to confirm tests pass locally
  • Test on rhub:
  • Test on winbuilder:
  • Update cran-comments.md
  • Commit with git commit -am "Bump version: x.x.x.9xxx -> x.x.x and re-build docs."
  • Push with git push origin dev and wait for CI builds to pass
  • Merge into master: git checkout master git merge dev git push origin master
  • Tag with git tag -a vx.x.x. Summarize NEWS.md entry into bullet points. Run git tag -l -n9 for past examples. Push with git push origin --tags.
  • Make a release. On GitHub, go to Releases -> Tags -> Edit release notes. Name the release “workflowr x.x.x” and copy-paste the Markdown entry from NEWS.md.
  • Build tarball with 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 surpise 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).