{"id":13707463,"url":"https://github.com/neurogenomics/rworkflows","last_synced_at":"2025-04-05T08:06:47.622Z","repository":{"id":62810903,"uuid":"422262705","full_name":"neurogenomics/rworkflows","owner":"neurogenomics","description":"Continuous integration for R packages. 🔀 Automates testing ✅, documentation website building 📦, \u0026 containerised deployment 🐳. ","archived":false,"fork":false,"pushed_at":"2025-03-17T15:48:55.000Z","size":13032,"stargazers_count":79,"open_issues_count":33,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T07:06:32.521Z","etag":null,"topics":["bioconductor","containers","continuous-integration","cran-r","docker","dockerhub","github-actions","r","reproducibility","workflows"],"latest_commit_sha":null,"homepage":"https://neurogenomics.github.io/rworkflows/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neurogenomics.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-28T15:44:27.000Z","updated_at":"2025-01-23T23:51:44.000Z","dependencies_parsed_at":"2023-09-22T20:21:42.196Z","dependency_job_id":"cbe50f36-ae3c-406a-bc03-cffc33c5c130","html_url":"https://github.com/neurogenomics/rworkflows","commit_stats":{"total_commits":351,"total_committers":2,"mean_commits":175.5,"dds":0.002849002849002802,"last_synced_commit":"8a5161312f385ac2a07a4b53bb64efbc7029d8f7"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurogenomics%2Frworkflows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurogenomics%2Frworkflows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurogenomics%2Frworkflows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurogenomics%2Frworkflows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurogenomics","download_url":"https://codeload.github.com/neurogenomics/rworkflows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305934,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioconductor","containers","continuous-integration","cran-r","docker","dockerhub","github-actions","r","reproducibility","workflows"],"created_at":"2024-08-02T22:01:32.108Z","updated_at":"2025-04-05T08:06:47.587Z","avatar_url":"https://github.com/neurogenomics.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"---\ntitle: \"\"  \nauthor: \"`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')`\" \ndate: \"\u003ch4\u003eREADME updated: \u003ci\u003e`r format( Sys.Date(), '%b-%d-%Y')`\u003c/i\u003e\u003c/h4\u003e\"\noutput:\n  github_document\n---\n\n[![CRAN checks](https://badges.cranchecks.info/worst/rworkflows.svg)](https://cran.r-project.org/web/checks/check_results_rworkflows.html)\n\n```{r setup, include=FALSE}\npkg \u003c- read.dcf(\"DESCRIPTION\", fields = \"Package\")[1]\n```\n\n## Citation \n\nIf you use ``r pkg``, please cite: \n\n\u003c!-- Modify this by editing the file: inst/CITATION  --\u003e\n\u003e `r utils::citation(pkg)$textVersion`\n\n## Intro\n\n`rworkflows` is a suite of tools to make it easy for R developers to implement\nreproducible best practices on GitHub. \n\nIt includes three main components:  \n1. [**`templateR` template**](https://github.com/neurogenomics/templateR): a `CRAN`/`Bioc`-compatible R package template that automatically generates essential documentation using package metadata.  \n2. [**`rworkflows` R package**](https://github.com/neurogenomics/rworkflows/blob/master/DESCRIPTION): a lightweight `CRAN` package to automatically \nset up short, customisable workflows that trigger the `rworkflows` action.  \n3. [**`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). \n\n### `rworkflows` action steps \n\n[**GitHub Actions**](https://docs.github.com/en/actions) \nare a powerful way to automatically launch workflows \nevery time you push changes to a GitHub repository. \nThis is a form of [**Continuous Integration/Deployment (CI/CD)**](https://docs.github.com/en/actions/automating-builds-and-tests/about-continuous-integration),\nwhich helps ensure that your code is always working as expected \n(without having to manually check each time).\n\nHere, we have designed a robust, reusable, and flexible **action** \nspecifically for the development of R packages. \nWe also provide an R function to automatically generate a **workflow file** that \ncalls the `rworkflows` composite action:\n\nCurrently, `rworkflows` **action** can perform the following tasks\n(with options to enable/disable/modify each step):  \n\n1. 🐳 Builds a Docker container to run subsequent steps within. \n2. 🐍 Builds and/or activates a custom `conda` environment.\n3. 🛠️ Installs system dependencies\n4. 🛠️ Installs LaTeX dependencies.\n5. 🛠 Installs R dependencies.\n6. ✅ Builds and checks your R package (with [**CRAN**](https://cran.r-project.org/)\nand/or [**Bioconductor**](https://bioconductor.org/) checks).  \n7. 📋 Runs [unit tests](https://testthat.r-lib.org/).  \n8. 📋 Runs [code coverage tests](https://covr.r-lib.org/) and uploads the results \nto [**Codecov**](https://about.codecov.io/).  \n9. 🚀 (Re)builds and launches a documentation website for your R package.  \n10. 🐳 Pushes a [**Docker**](https://www.docker.com/) container (with [**Rstudio**](https://posit.co/) and all dependencies pre-installed) to \nyour 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/)). \n11. 🔭 Generates [workflow telemetry](https://github.com/catchpoint/workflow-telemetry-action) report.  \n12. 🎖 Updates relevant badges added to your README \nwith `rworkflows::use_badges()`.\n\nImportantly, this **workflow** is designed to work with any R package out-of-the-box.\nThis means you won't have to manually edit any yaml files,\njust run the `rworkflows::use_workflow()` function \nand you're ready to go within seconds!\n\n\u003e **Note**: `rworkflows` uses, was inspired by, and benefits from the work of many other projects, especially:  \n[`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).\n \n## Quickstart\n\nInstall and create the workflow in your R package's project folder.\n\n```R\n## in R\n\n#### Install rworkflows R package ####\n### For the stable CRAN release\nif(!require(\"rworkflows\")) install.packages(\"rworkflows\")\n\n### Or, for the latest development version\n# if(!require(\"rworkflows\")) remotes::install_github(\"neurogenomics/rworkflows\")\n\n### Create workflow file\npath \u003c- rworkflows::use_workflow()\n```\nPush to GitHub, and let everything else run automatically!\nYou can check the status of your workflow by clicking on the *Actions* tab\nin your GitHub repo.\n```bash\n## in the Terminal\ngit add .\ngit commit -m \"Added rworkflows\"\ngit push\n```\n\n**Note**: If you want to skip running **GitHub Actions** on a particular push, \nsimply add \"[skip ci]\" somewhere in the commit message, e.g.:\n`git commit -m \"Update README [skip ci]\"`\n\n## Documentation\n\n### [Vignettes](https://neurogenomics.github.io/rworkflows/articles/)\n\n#### [Get started](https://neurogenomics.github.io/rworkflows/articles/rworkflows.html) \nIntroductory vignette for using `rworkflows`.\n\n#### [Docker/Singularity](https://neurogenomics.github.io/rworkflows/articles/docker)  \nCopy-and-paste instructions for creating a **Docker** or **Singularity** container\nwith the `rworkflows` R package pre-installed.  \n\n#### [Dependency graph](https://neurogenomics.github.io/rworkflows/articles/depgraph). \nInteractive graph showing all the GitHub repos that currently use \nthe `rworkflows` action.\n\n### [Videos](https://www.youtube.com/@NeurogenomicsLab)\n\n#### [rworkflows: taming the Wild West of R packages](https://youtu.be/nLIG2prEmCg) \nTalk on the background, motivation, and utility of `rworkflows`.\n\n#### [Getting into the flow with rworkflows: an introductory tutorial](https://youtu.be/vcpMsil3EAU)\nStep-by-step tutorial showing how to use `rworkflows` in an R package.\n\n### GitHub Secrets\nTo use certain features of `rworkflows`, you may need to set up one or more\n[GitHub Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets):\n\n* `PAT_GITHUB` [Optional]: Can grant access to private\n    repos on GitHub Actions. You can generate your very own Personal\n    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.   \n* `DOCKER_TOKEN` [Optional]: Allows GitHub Actions to push to a\n    [DockerHub](https://hub.docker.com) account. \n\n## Acknowledgments\n`rworkflows` builds upon the work of many others, especially the following:\n\n### [`biocthis`](https://github.com/lcolladotor/biocthis)\nThis workflow is largely inspired by the workflow generated by the \n[`use_bioc_github_action()`](https://lcolladotor.github.io/biocthis/articles/biocthis.html) function within the \n[`biothis`]( https://www.bioconductor.org/packages/release/bioc/html/biocthis.html) \npackage, developed by @lcolladotor. \n\n#### Key changes in `rworkflows` \n- Uses dynamic variables to specify R/Bioconductor versions \n(e.g. `r: \"latest\"`) and the name of your R package, as opposed to static \nnames that are likely to become outdated (e.g. `r: \"4.0.1\"`).  \n- Additional error handling and dependencies checks.  \n- Re-renders `README.Rmd` before rebuilding the documentation website.  \n\n### [`usethis`](https://github.com/r-lib/usethis)\n`biocthis` was in turn inspired by `usethis`.\n\n### [`actions/`](https://github.com/actions)\nA general set of **GitHub Actions** maintained by the core GitHub team.\n\n### [`r-lib/actions`](https://github.com/r-lib/actions)\nA set of **GitHub Actions** for R development maintained by the Rstudio/Posit team.\n\n### [`bioc-actions`](https://github.com/grimbough/bioc-actions)\n[Bioconductor](https://www.bioconductor.org/)-oriented **GitHub Actions** created by @grimbough.\n\n### [`JamesIves/github-pages-deploy-action`](https://github.com/JamesIves/github-pages-deploy-action)\nBuilds and deploys the **GitHub Pages** documentation website\nin the `rworkflows` GHA workflows.\n\n### [`docker/build-push-action`](https://github.com/docker/build-push-action)\nA set of **GitHub Actions** for building/pushing **Docker** containers.\n\n### [`bioconductor_docker`](https://github.com/Bioconductor/bioconductor_docker)\nUses the official \n[`bioconductor/bioconductor_docker`](https://github.com/Bioconductor/bioconductor_docker)\n**Docker** container.  \n\n**NOTE**: Whenever a new version of Bioconductor is released, \nthe `bioconductor/bioconductor_docker` container will often lag behind the actual Bioconductor releases \nfor up to several days, due to the time it takes to update the container. \nThis 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\"). \nFor 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/). \n\n### [`scFlow`](https://github.com/combiz/scFlow)\nThis Dockerfile was partly adapted from the [scFlow Dockerfile](https://github.com/combiz/scFlow/blob/master/Dockerfile).\nUnlike other Dockerfiles, this one\n**does not require any manual editing when applying to different R packages**. \nThis means that users who are unfamiliar with **Docker** do not have to troubleshoot\nmaking this file correctly. It also means that it will continue to work \neven if your R package dependencies change. \n\n### [`act`](https://github.com/nektos/act)\nA very useful command line tool for testing **GitHub Actions** locally. \n\n### [`actions/runner-images`](https://github.com/actions/runner-images)\nRunner images for each OS provided by GitHub.\n\n### [`actions/setup-miniconda`](https://github.com/marketplace/actions/setup-miniconda)\nGitHub Action to setup Miniconda and conda environments.\n\n# Session Info  \n\n\u003cdetails\u003e\n\n```{r}\nutils::sessionInfo()\n```\n\n\u003c/details\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurogenomics%2Frworkflows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurogenomics%2Frworkflows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurogenomics%2Frworkflows/lists"}