rworkflows
Continuous integration for R packages. 🔀 Automates testing ✅, documentation website building 📦, & containerised deployment 🐳.
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.9%) to scientific vocabulary
Keywords
bioconductor
containers
continuous-integration
cran-r
docker
dockerhub
github-actions
r
reproducibility
workflows
Last synced: 6 months ago
·
JSON representation
Repository
Continuous integration for R packages. 🔀 Automates testing ✅, documentation website building 📦, & containerised deployment 🐳.
Basic Info
- Host: GitHub
- Owner: neurogenomics
- Language: HTML
- Default Branch: master
- Homepage: https://neurogenomics.github.io/rworkflows/
- Size: 12.6 MB
Statistics
- Stars: 80
- Watchers: 2
- Forks: 7
- Open Issues: 32
- Releases: 5
Topics
bioconductor
containers
continuous-integration
cran-r
docker
dockerhub
github-actions
r
reproducibility
workflows
Created over 4 years ago
· Last pushed 6 months ago
Metadata Files
Readme
Changelog
README.Rmd
---
title: ""
author: "`r rworkflows::use_badges(add_actions=c('rworkflows','rworkflows_static','rworkflows_dev'), add_cran_release = TRUE, add_cran_checks = FALSE, add_cran_download_month=TRUE, add_cran_download_total=TRUE, add_codecov_graphs='icicle', hex_height=350, add_doi='https://doi.org/10.5281/zenodo.10048573')`"
date: "README updated: `r format( Sys.Date(), '%b-%d-%Y')`
"
output:
github_document
---
[](https://cran.r-project.org/web/checks/check_results_rworkflows.html)
```{r setup, include=FALSE}
pkg <- read.dcf("DESCRIPTION", fields = "Package")[1]
```
## Citation
If you use ``r pkg``, please cite:
> `r utils::citation(pkg)$textVersion`
## Intro
`rworkflows` is a suite of tools to make it easy for R developers to implement
reproducible best practices on GitHub.
It includes three main components:
1. [**`templateR` template**](https://github.com/neurogenomics/templateR): a `CRAN`/`Bioc`-compatible R package template that automatically generates essential documentation using package metadata.
2. [**`rworkflows` R package**](https://github.com/neurogenomics/rworkflows/blob/master/DESCRIPTION): a lightweight `CRAN` package to automatically
set up short, customisable workflows that trigger the `rworkflows` action.
3. [**`rworkflows` action**](https://github.com/neurogenomics/rworkflows/blob/master/action.yml): an open-source action available on the [GitHub Actions Marketplace](https://github.com/marketplace/actions/rworkflows).
### `rworkflows` action steps
[**GitHub Actions**](https://docs.github.com/en/actions)
are a powerful way to automatically launch workflows
every time you push changes to a GitHub repository.
This is a form of [**Continuous Integration/Deployment (CI/CD)**](https://docs.github.com/en/actions/automating-builds-and-tests/about-continuous-integration),
which helps ensure that your code is always working as expected
(without having to manually check each time).
Here, we have designed a robust, reusable, and flexible **action**
specifically for the development of R packages.
We also provide an R function to automatically generate a **workflow file** that
calls the `rworkflows` composite action:
Currently, `rworkflows` **action** can perform the following tasks
(with options to enable/disable/modify each step):
1. 🐳 Builds a Docker container to run subsequent steps within.
2. 🐍 Builds and/or activates a custom `conda` environment.
3. 🛠️ Installs system dependencies
4. 🛠️ Installs LaTeX dependencies.
5. 🛠 Installs R dependencies.
6. ✅ Builds and checks your R package (with [**CRAN**](https://cran.r-project.org/)
and/or [**Bioconductor**](https://bioconductor.org/) checks).
7. 📋 Runs [unit tests](https://testthat.r-lib.org/).
8. 📋 Runs [code coverage tests](https://covr.r-lib.org/) and uploads the results
to [**Codecov**](https://about.codecov.io/).
9. 🚀 (Re)builds and launches a documentation website for your R package.
10. 🐳 Pushes a [**Docker**](https://www.docker.com/) container (with [**Rstudio**](https://posit.co/) and all dependencies pre-installed) to
your choice of container registry (e.g. [**GitHub Container Registry**](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry), [**DockerHub**](https://hub.docker.com/)).
11. 🔭 Generates [workflow telemetry](https://github.com/catchpoint/workflow-telemetry-action) report.
12. 🎖 Updates relevant badges added to your README
with `rworkflows::use_badges()`.
Importantly, this **workflow** is designed to work with any R package out-of-the-box.
This means you won't have to manually edit any yaml files,
just run the `rworkflows::use_workflow()` function
and you're ready to go within seconds!
> **Note**: `rworkflows` uses, was inspired by, and benefits from the work of many other projects, especially:
[`biocthis`](https://github.com/lcolladotor/biocthis), [`usethis`](https://github.com/r-lib/usethis), [`actions/`](https://github.com/actions), [`r-lib/actions`](https://github.com/r-lib/actions), [`bioc-actions`](https://github.com/grimbough/bioc-actions), [`JamesIves/github-pages-deploy-action`](https://github.com/JamesIves/github-pages-deploy-action), [`docker/build-push-action`](https://github.com/docker/build-push-action), [`bioconductor_docker`](https://github.com/Bioconductor/bioconductor_docker). For more details on how these projects relate to `rworkflows`, please see [below](#acknowledgments).
## Quickstart
Install and create the workflow in your R package's project folder.
```R
## in R
#### Install rworkflows R package ####
### For the stable CRAN release
if(!require("rworkflows")) install.packages("rworkflows")
### Or, for the latest development version
# if(!require("rworkflows")) remotes::install_github("neurogenomics/rworkflows")
### Create workflow file
path <- rworkflows::use_workflow()
```
Push to GitHub, and let everything else run automatically!
You can check the status of your workflow by clicking on the *Actions* tab
in your GitHub repo.
```bash
## in the Terminal
git add .
git commit -m "Added rworkflows"
git push
```
**Note**: If you want to skip running **GitHub Actions** on a particular push,
simply add "[skip ci]" somewhere in the commit message, e.g.:
`git commit -m "Update README [skip ci]"`
## Documentation
### [Vignettes](https://neurogenomics.github.io/rworkflows/articles/)
#### [Get started](https://neurogenomics.github.io/rworkflows/articles/rworkflows.html)
Introductory vignette for using `rworkflows`.
#### [Docker/Singularity](https://neurogenomics.github.io/rworkflows/articles/docker)
Copy-and-paste instructions for creating a **Docker** or **Singularity** container
with the `rworkflows` R package pre-installed.
#### [Dependency graph](https://neurogenomics.github.io/rworkflows/articles/depgraph).
Interactive graph showing all the GitHub repos that currently use
the `rworkflows` action.
### [Videos](https://www.youtube.com/@NeurogenomicsLab)
#### [rworkflows: taming the Wild West of R packages](https://youtu.be/nLIG2prEmCg)
Talk on the background, motivation, and utility of `rworkflows`.
#### [Getting into the flow with rworkflows: an introductory tutorial](https://youtu.be/vcpMsil3EAU)
Step-by-step tutorial showing how to use `rworkflows` in an R package.
### GitHub Secrets
To use certain features of `rworkflows`, you may need to set up one or more
[GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets):
* `PAT_GITHUB` [Optional]: Can grant access to private
repos on GitHub Actions. You can generate your very own Personal
Authentication Token with `usethis::create_github_token()`. See the [GitHub docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for details.
* `DOCKER_TOKEN` [Optional]: Allows GitHub Actions to push to a
[DockerHub](https://hub.docker.com) account.
* `CODECOV_TOKEN` [Optional]: Codecov repository token to upload coverage
reports. Providing this token helps prevent report upload failures by
bypassing Codecov's GitHub API rate limits. See the [Codecov documentation](https://docs.codecov.com/docs/adding-the-codecov-token)
for details.
## Acknowledgments
`rworkflows` builds upon the work of many others, especially the following:
### [`biocthis`](https://github.com/lcolladotor/biocthis)
This workflow is largely inspired by the workflow generated by the
[`use_bioc_github_action()`](https://lcolladotor.github.io/biocthis/articles/biocthis.html) function within the
[`biothis`]( https://www.bioconductor.org/packages/release/bioc/html/biocthis.html)
package, developed by @lcolladotor.
#### Key changes in `rworkflows`
- Uses dynamic variables to specify R/Bioconductor versions
(e.g. `r: "latest"`) and the name of your R package, as opposed to static
names that are likely to become outdated (e.g. `r: "4.0.1"`).
- Additional error handling and dependencies checks.
- Re-renders `README.Rmd` before rebuilding the documentation website.
### [`usethis`](https://github.com/r-lib/usethis)
`biocthis` was in turn inspired by `usethis`.
### [`actions/`](https://github.com/actions)
A general set of **GitHub Actions** maintained by the core GitHub team.
### [`r-lib/actions`](https://github.com/r-lib/actions)
A set of **GitHub Actions** for R development maintained by the Rstudio/Posit team.
### [`bioc-actions`](https://github.com/grimbough/bioc-actions)
[Bioconductor](https://www.bioconductor.org/)-oriented **GitHub Actions** created by @grimbough.
### [`JamesIves/github-pages-deploy-action`](https://github.com/JamesIves/github-pages-deploy-action)
Builds and deploys the **GitHub Pages** documentation website
in the `rworkflows` GHA workflows.
### [`docker/build-push-action`](https://github.com/docker/build-push-action)
A set of **GitHub Actions** for building/pushing **Docker** containers.
### [`bioconductor_docker`](https://github.com/Bioconductor/bioconductor_docker)
Uses the official
[`bioconductor/bioconductor_docker`](https://github.com/Bioconductor/bioconductor_docker)
**Docker** container.
**NOTE**: Whenever a new version of Bioconductor is released,
the `bioconductor/bioconductor_docker` container will often lag behind the actual Bioconductor releases
for up to several days, due to the time it takes to update the container.
This means that sometimes "devel" in `Bioconductor/bioconductor_docker` is actually referring to the current "release" version of Bioconductor (i.e. the previous Bioc version's "devel").
For further details, see this [Issue](https://github.com/Bioconductor/bioconductor_docker/issues/37), and the [Bioconductor release schedule](https://www.bioconductor.org/about/release-announcements/).
### [`scFlow`](https://github.com/combiz/scFlow)
This Dockerfile was partly adapted from the [scFlow Dockerfile](https://github.com/combiz/scFlow/blob/master/Dockerfile).
Unlike other Dockerfiles, this one
**does not require any manual editing when applying to different R packages**.
This means that users who are unfamiliar with **Docker** do not have to troubleshoot
making this file correctly. It also means that it will continue to work
even if your R package dependencies change.
### [`act`](https://github.com/nektos/act)
A very useful command line tool for testing **GitHub Actions** locally.
### [`actions/runner-images`](https://github.com/actions/runner-images)
Runner images for each OS provided by GitHub.
### [`actions/setup-miniconda`](https://github.com/marketplace/actions/setup-miniconda)
GitHub Action to setup Miniconda and conda environments.
# Session Info
```{r}
utils::sessionInfo()
```
Owner
- Name: neurogenomics
- Login: neurogenomics
- Kind: organization
- Location: United Kingdom
- Website: https://www.neurogenomics.co.uk
- Repositories: 56
- Profile: https://github.com/neurogenomics
Neurogenomics Lab, UK Dementia Research Institute at Imperial College London
GitHub Events
Total
- Issues event: 4
- Watch event: 6
- Delete event: 2
- Issue comment event: 16
- Push event: 41
- Pull request review event: 5
- Pull request review comment event: 4
- Pull request event: 9
- Fork event: 1
- Create event: 2
Last Year
- Issues event: 4
- Watch event: 6
- Delete event: 2
- Issue comment event: 16
- Push event: 41
- Pull request review event: 5
- Pull request review comment event: 4
- Pull request event: 9
- Fork event: 1
- Create event: 2
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Brian M. Schilder | 3****r | 546 |
| HDash | 1****h | 11 |
| js2264 | j****y@g****m | 8 |
| Tuomas Borman | 6****n | 2 |
| Ali Sajid Imami | 3****d | 1 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 116
- Total pull requests: 24
- Average time to close issues: about 2 months
- Average time to close pull requests: 16 days
- Total issue authors: 12
- Total pull request authors: 5
- Average comments per issue: 2.1
- Average comments per pull request: 1.54
- Merged pull requests: 21
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 7
- Average time to close issues: about 1 month
- Average time to close pull requests: about 1 month
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 1.0
- Average comments per pull request: 1.57
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- bschilder (94)
- lcolladotor (4)
- HDash (2)
- TuomasBorman (2)
- stemangiola (2)
- AliSajid (2)
- OskarGauffin (1)
- barracuda156 (1)
- vvyas-arcus (1)
- Daenarys8 (1)
- vjcitn (1)
Pull Request Authors
- HDash (10)
- bschilder (10)
- js2264 (6)
- AliSajid (1)
- TuomasBorman (1)
Top Labels
Issue Labels
enhancement (50)
bug (36)
GitHub Actions (26)
documentation (20)
publication (9)
help wanted (6)
🐳 Docker (4)
CRAN (4)
good first issue (3)
🕰️ Longevity 🕰️ (3)
conda (2)
bug in dependency (2)
Pull Request Labels
bug (4)
GitHub Actions (3)
enhancement (1)
bug in dependency (1)
🐳 Docker (1)
Packages
- Total packages: 2
-
Total downloads:
- cran 404 last-month
- Total docker downloads: 15
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 10
(may contain duplicates) - Total versions: 13
- Total maintainers: 1
github actions: neurogenomics/rworkflows
rworkflows: Full workflow to test, document, and deploy R packages.
- Homepage: https://neurogenomics.github.io/rworkflows/
-
Latest release: v0
published over 2 years ago
Rankings
Dependent packages count: 0.0%
Stargazers count: 4.0%
Average: 7.4%
Forks count: 11.0%
Dependent repos count: 14.4%
Last synced:
6 months ago
cran.r-project.org: rworkflows
Test, Document, Containerise, and Deploy R Packages
- Homepage: https://github.com/neurogenomics/rworkflows
- Documentation: http://cran.r-project.org/web/packages/rworkflows/rworkflows.pdf
- License: GPL-3
-
Latest release: 1.0.6
published about 1 year ago
Rankings
Stargazers count: 7.2%
Forks count: 12.2%
Dependent repos count: 14.5%
Average: 18.7%
Dependent packages count: 28.6%
Downloads: 31.2%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
- R >= 4.2 depends
- here * imports
- utils * imports
- yaml * imports
- BiocStyle * suggests
- badger * suggests
- covr * suggests
- hexSticker * suggests
- knitr * suggests
- magick * suggests
- markdown * suggests
- remotes * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests
.github/workflows/rworkflows.yml
actions
- neurogenomics/rworkflows master composite
.github/workflows/rworkflows_static.yml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact v2 composite
- docker/build-push-action v1 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
action.yml
actions
- JamesIves/github-pages-deploy-action releases/v4 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/upload-artifact v2 composite
- codecov/codecov-action v3 composite
- docker/build-push-action v1 composite
- grimbough/bioc-actions/setup-bioc v1 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- r-lib/actions/setup-tinytex v2 composite
inst/templates/Dockerfile
docker
- bioconductor/bioconductor_docker devel build
.github/workflows/rworkflows_dev.yml
actions
- neurogenomics/rworkflows dev composite