Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.7%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: DaveEdge1
- License: gpl-2.0
- Language: Dockerfile
- Default Branch: main
- Size: 623 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
The knitting of RMarkdown to GitHub Markdown is automated
The container image build is cached
Launch the environment in RStudio server online
FAIRRmd - Sharing Reproducible Rmd workflows
This template harnesses GitHub Actions for sharing a reproducible workflow in Rmd format. What this template offers:
- Simply uploading the RMarkdown and renv.lock files allows others to reproduce your work locally
- A GitHub Action knits your RMarkdown and renders it as a GitHub Markdown file in your repository, simultaneously demonstrating the reproduciblity and sharing the rendered output
- A separate Action produces a container image that can be used to interact with your workflow in RStudio:
a. via MyBinder (link above) in the cloud
b. locally with Docker - The repository release linked to Zenodo becomes a citable compendium
Required items
- An RMarkdown document you would like to share
- An renv.lock file for this project
- Data a. stored in a permanent repository with a DOI (FAIR, eg. Zenodo) b. stored in a file in your repo
Using this Template
Add your workflow file in RMarkdown fomrat
- There is an
example.Rmdin this template to show you the one required element: "output: github_document" - Much of the early setup code could be recycled for your RMarkdown document for appropriate rendering in GitHub Markdown format
- Add your Rmd code and edit the header with Author, Date, etc.
- Rename the
example.Rmdfile (or delete it if you've brought in your own file)
Add your renv lock file
- Delete the existing renv.lock file
- Your lock file should come from the R project directory where your Rmd file was created
Learn to use renv here: renv
Edit the render Rmd workflow
- This workflow is found here: ".github/workflows/render-Rmd.yml"
- Change the name of the referenced Rmd (example.Rmd) and md (example.md) files on lines 33 and 36 (your output md file will have the same name, just a different extentsion)
Add repository secrets
- In order to push the container image to your Docker Hub, you'll need to give your login credentials to GitHub (they are stored securely)
- Settings -> Secretes and Variables -> Actions -> New repository secret
- Add DOCKER_USERNAME
- Add DOCKER_PASSWORD
Test it out!
- Make a change to the Rmd file to trigger the actions (The workflows are set to run anytime a change is made to the Rmd file or the renv.lock file)
- You can see the progress unfold in the 'Actions' tab of your repo
- Share your feedback/troubles here
Edit this README file
- Edit the 3 badges at the top with the correct 'GitHubUsername', 'GitHubRepo_Name' (remove the "<>"), etc.
- Add relevant details about the data and workflow, including citation info
Make it citable
- Make sure you are happy with the REAME and the md file as they are before proceeding!
- Follow the instructions here to get a DOI for your repo and add the Zenodo badge to your README
Reproducing this workflow
MyBinder (easiest option)
Click the Binder badge above. An RStudio session will launch in your browser after the the container initializes (usually about 60 seconds).
Locally in RStudio
- Clone this repository
- Open the Rproj file using RStudio
- Run
renv::restore() - Open the devils_hole.Rmd file - it's ready to use!
Locally with Docker
- Start your Docker (or podman) engine
- Open your terminal
- pull the image
docker pull davidedge/devils_hole2 - run the container
docker run -e PASSWORD=rstudio --rm -ti -p 8787:8787 --user root davidedge/devils_hole2 /init - open a browser window to
http://127.0.0.1:8787/ - enter the username:
rstudioand passowrd:rstudio
Filesystem structure
(not all files are listed here)
- Top
- Dockerfile (builds the R environment from a rocker base image and the renv.lock file)
- example.Rmd (workflow to be shared)
- example.md (rendered workflow)
- renv.lock
- LICENSE
- README.md (this file)
- binder
- Dockerfile (cached image for MyBinder)
- .github
- workflows
- docker-image.yml
- render-Rmd.yml
Containerized workflow
example.Rmd
This RMarkdown document is our example of a reproducible workflow.
renv
The renv.lock file is used to reproduce the environment needed to run the workflow. The file contains the R version and all package versions used to create the workflow. renv is the most important step to making R code reproducible.
Learn to use renv here: renv
Dockerfile (note that there are two in this repo!)
This Dockerfile begins with a base image from rocker. The image contains R version 4 and is configured to run RStudio in Binder
The image is modified primarily by running renv::restore(), which installs the correct version of R and all packages as versioned in the renv.lock file.
Actions
docker-image.yml
The Docker Image referenced in "binder/Dockerfile" is built from a GitHub Action. The image is build from a rocker image as outlined in the Docker file in the top directory.
The GitHub Action also pushes the image to a repository. This image underlies the MyBinder environment linked below. The image is pulled from the repository, greatly speeding the mybinder initiation.
render-Rmd.yml
To ensure the RMarkdown document devils_hole.Rmd is reproducible, it is rendered as a GitHub-compatible markdown document devils_hole.md through a second GitHub Action. The action is triggered any time the RMarkdown document is altered.
MyBinder
The R environment used in this repository can also be launched in RStudio on the web
This badge will launch RStudio from the Docker image referenced in "binder/Dockerfile" using MyBinder"
Owner
- Name: Dave Edge
- Login: DaveEdge1
- Kind: user
- Company: Northern Arizona University
- Repositories: 25
- Profile: https://github.com/DaveEdge1
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Edge" given-names: "David" orcid: "https://orcid.org/0000-0001-6938-2850" title: "FAIRRmd - Sharing Reproducible Rmd workflows" version: 0.0.0 doi: 10.5281/zenodo.14846119 date-released: 2025-02-10 url: "https://github.com/DaveEdge1/FAIRRmd"
GitHub Events
Total
- Release event: 1
- Push event: 49
- Create event: 3
Last Year
- Release event: 1
- Push event: 49
- Create event: 3
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Dave Edge | 1****1 | 138 |
| github-actions[bot] | g****] | 16 |
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- jupyterhub/repo2docker-action master composite
- actions/checkout v4 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-renv v2 composite
- rocker/binder 4 build
- davidedge/devils_hole2 162df33a6656 build