Tools to make an OpenRBQM developer's life easier including standard GitHub actions, issue and pull request templates, and utility functions.
You can install the latest release of gsm.utils from GitHub with:
# install.packages("pak")
pak::pak("Gilead-BioStats/gsm.utils@*release")You can install the development version of gsm.utils from GitHub with:
# install.packages("pak")
pak::pak("Gilead-BioStats/gsm.utils")The package provides two main functions to streamline package development:
Initializes a new extension package with standardized structure and configuration:
init_gsm_package(
strPackageDir = "path/to/new/package",
lDescriptionFields = list(),
bIncludeWorkflowDir = TRUE,
strOrg = "Gilead-BioStats"
)- Creates package skeleton using
usethis::create_package() - Sets up pkgdown documentation with GitHub Pages
- Configures testthat for unit testing
- Calls
update_gsm_package()to update issue templates and GitHub Actions workflows
Updates an existing GSM package with the latest standardized templates:
update_gsm_package(strPackageDir = ".")- Installs/updates GitHub issue templates with
add_gsm_issue_templates() - Removes deprecated issue templates with
remove_deprecated_issue_templates() - Installs/updates GitHub Actions workflows from the
actions-v1branch of this repo withadd_actions() - Removes deprecated issue templates with
remove_deprecated_actions()
The actions-v1 branch of this repo contains standardized GitHub Actions workflow templates for Gilead packages:
-
R-CMD-check.yaml: Runs R package checks on PRs to ensure package integrity. -
pkgdown-all.yaml: Builds and deploys pkgdown documentation sites with automatic menu addition and asset creation viagsm.utils::build_assets(). Creates PR preview sites at/pr/{number}(or, depending on your pkgdown configuration,/pr/{number}/dev) and deletes such sites once the PR is closed, and deploys production and/or/devsites on push tomainordev. -
r_releaser-caller.yaml: Reusable workflow for building and attaching R package source tarballs to GitHub releases, using the A2-ai/r-releaser action with configurable options for data compression and vignette building. -
test-coverage.yaml: Computes test coverage usingcovrand logs the result on every run. On pull requests, coverage is posted as a sticky comment that updates on each push.coverage-summary.json(written viagsm.utils::emit_coverage_summary()) is attached as a release asset when triggered by arelease: publishedevent. -
workflow-template-check.yaml: Ensures workflow compliance by checking that a package's.github/workflowsdirectory matches these templates. Runs on pull requests and verifies file presence and version headers to maintain standardized CI/CD across GSM packages.
Please note that the gsm.utils project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.