knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

rdev logo

R-CMD-check lint Codecov test coverage

Overview

r desc::desc_get_field("Title"): r desc::desc_get_field("Description")

Feel free to use and/or fork this project!

Installation

You can install the development version of rdev from GitHub with:

# install.packages("remotes")
remotes::install_github("jabenninghoff/rdev")

Or using renv:

# install.packages("renv")
renv::install("jabenninghoff/rdev")

Development

Creating Packages

rdev supports creation of new R packages following rdev conventions as well as new R Analysis packages. The typical setup workflow (per ?quickstart) is:

  1. Use available::available() to check package name
  2. With no project open, run create_github_repo() to initialize the GitHub R repository
  3. Without committing to git, run init() in the newly created project
  4. Manually update the Title and Description fields in the DESCRIPTION file without committing
  5. Run setup_analysis() or setup_rdev() to configure the package as an analysis package or rdev package respectively.
  6. Update TODO.md, NEWS.md, README.Rmd, and DESCRIPTION as needed
  7. Re-run check_renv(), ci() to validate package
  8. Commit to git and begin development

GitHub Releases

rdev automates the workflow for creating GitHub releases along with updating GitHub pages for either standard R packages or R analysis packages, using the release notes format in NEWS.md. A typical development workflow is:

  1. Bump version and create new feature branch with new_branch()
  2. Write all the things
  3. Update the release notes for the new version in NEWS.md, following the conventions described in get_release()
  4. Finalize the release and merge all changes to git
  5. Run stage_release() to create a new pull request on GitHub using details derived from NEWS.md, including updating the README and GitHub pages
  6. After the pull request has been reviewed and passes all required status checks, accept the staged release with merge_release(), which merges the pull request, cleans up branches, and publishes a new GitHub release

Feature branches can be merged without starting a new release; stage_release() just requires that everything is committed, including new release notes in NEWS.md before running. When ready to release, stage_release() will use the existing branch if on a feature branch, and create a new release branch if on the default.

Workflow

For my workflow, I typically check renv when I start:

library(rdev)

check_renv()

I also have a ci() function to run all my continuous integration tests locally:

ci()


jabenninghoff/rdev documentation built on Sept. 26, 2024, 10:37 p.m.