Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mthroolin authored Oct 15, 2024
0 parents commit b1b0e61
Show file tree
Hide file tree
Showing 8 changed files with 2,580 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/check-qmd-render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Check whether the files render
on:
push:
branches:
- main

jobs:
render-slides:
runs-on: ubuntu-latest

strategy:
matrix:
file:
- slides
- report

container:
image: rocker/tidyverse:4.4.0

steps:
# Check out the repository (git clone)
- uses: actions/checkout@v4

# Install dependencies (R packages)
- name: Install dependencies
run: |
install2.r data.table slurmR epiworldR
# Render the slides/report using quarto
- name: Render ${{ matrix.file }}
run: |
quarto render ${{ matrix.file }}.qmd --to html
# Save the rendered slides/report as an artifact
- name: Save as artifact
uses: actions/upload-artifact@v4
with:
path: ${{ matrix.file }}.html
name: ${{ matrix.file }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*_cache
*_files
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Template project for Advanced Programming [![Slides and report render](../../actions/workflows/check-qmd-render.yaml/badge.svg)](../../actions/workflows/check-qmd-render.yaml)

The template project has the following files:

- `README.md`: this file.
- `data/`: a folder for data files.
- `.gitignore`: a file that tells git which files to ignore.
- `slides.qmd`: a presentation in quarto format.
- `report.qmd`: a report in quarto format.
- `.github/workflows/check-qmd-render.yaml`: The workflow that builds the html and pdf files. New dependencies can be added on the step "Install dependencies"; the following installs the R packages data.table and slurmR from CRAN:

```yaml
- name: Install dependencies
run: |
install2.r data.table slurmR
```
This workflow should complete without errors before you submit your project.
## Instructions
1. Use the qmd files to write your report and slides.
2. Add any needed files (figures, C++, data, etc.) to the repository.
2. If needed, add additional dependencies to the workflow file.
3. Ensure the [report.pdf](report.pdf) and [slides.html](slides.html) files are generated.
3 changes: 3 additions & 0 deletions data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Data folder

Any data your project holds should go here.
Binary file added report.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions report.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
format: pdf
author: John Doe
title: My fancy presentation
subtitle: For PHS 7045
---

# Section 1

## Sub-section 1

```{r}
#| label: some-code
library(MASS)
```
2,474 changes: 2,474 additions & 0 deletions slides.html

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions slides.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: My fancy presentation
subtitle: For PHS 7045
author: John Doe
format: revealjs
embed-resources: true
---

# Section 1

## Slide 1


```{r}
#| label: some-code
library(MASS)
library(epiworldR)
```

0 comments on commit b1b0e61

Please sign in to comment.