Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .filenameignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Paths to ignore for filename/path validation checks.
# Patterns use fnmatch syntax and are relative to repo root.

_site/**
.quarto/**
.github/**
_extensions/
assets/bootstrap-grid.min.css

# Common documentation files to ignore
LICENSE-CODE.md
LICENSE.md
LICENSE
README.md
README
README-template.md
CITATION.cff
CITATION-template.cff
_quarto.yml
404.qmd
21 changes: 21 additions & 0 deletions .github/workflows/citation-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
workflow_dispatch:
push:
branches: [main]
paths:
- CITATION.cff

name: Check CITATION.cff is Valid
jobs:
Validate-CITATION-cff:
runs-on: ubuntu-latest
name: Validate CITATION.cff
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate CITATION.cff
uses: dieghernan/cff-validator@v3
22 changes: 22 additions & 0 deletions .github/workflows/filename-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Filename Checks

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
check-names:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check filenames
uses: NeuroShepherd/check-filenames-action@v1
with:
max-path-length: "65"
max-depth: "2"
file-types: "html,md,qmd,css,scss,rmd,pdf,png,jpg,svg,yml"
ignore-file: ".filenameignore"
dotfile-mode: "strip-leading-dot"
44 changes: 44 additions & 0 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Link Checker

on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

jobs:
check-links:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Check links
id: check
uses: filiph/linkcheck@master
continue-on-error: true
with:
arguments: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/

- name: Create issue on broken links
if: steps.check.outputs.exit_code != '0'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const report = fs.readFileSync('log', 'utf8');

const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: 'link-checker'
});

if (issues.length === 0) {
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: '🔗 Broken Links Found on Site',
body: `The monthly link checker detected broken links.\n\n${report}`,
labels: ['link-checker']
});
}
106 changes: 106 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
on:
workflow_dispatch:
schedule:
- cron: "0 23 * * 0"
push:
branches: [main]

name: Render Quarto Site

jobs:
quarto-publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt install -y \
libcurl4-openssl-dev \
libfontconfig1-dev \
libssl-dev \
libxml2-dev \
libpng-dev \
libjpeg-dev \
libtiff-dev \
libcairo2-dev \
libxt-dev \
libfreetype6-dev \
libharfbuzz-dev \
libfribidi-dev \
zlib1g-dev \
libv8-dev \
libglpk-dev \
librsvg2-bin

- name: Install R with renv
uses: r-lib/actions/setup-r@v2
with:
r-version: renv
if: ${{ hashFiles('renv.lock') != '' }}

- name: Install R Dependencies with renv
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
if: ${{ hashFiles('renv.lock') != '' }}

- name: Install R latest
uses: r-lib/actions/setup-r@v2
if: ${{ hashFiles('renv.lock') == '' }}

- name: Set R library path (no lockfile)
run: echo "R_LIBS_USER=$HOME/.local/lib/R/site-library" >> "$GITHUB_ENV"
if: ${{ hashFiles('renv.lock') == '' }}

- name: Cache R library (no lockfile)
uses: actions/cache@v4
with:
path: ~/.local/lib/R/site-library
key: ${{ runner.os }}-r-nolock-${{ hashFiles('**/*.R', '**/*.Rmd', '**/*.qmd', '_quarto.yml') }}
restore-keys: |
${{ runner.os }}-r-nolock-
if: ${{ hashFiles('renv.lock') == '' }}

- name: Install R latest dependencies
run: |
lib <- Sys.getenv("R_LIBS_USER")
if (nzchar(lib)) {
dir.create(lib, recursive = TRUE, showWarnings = FALSE)
.libPaths(c(lib, .libPaths()))
}
install.packages("renv")
install.packages("rmarkdown")
install.packages("yaml")
deps <- unique(stats::na.omit(renv::dependencies()$Package))
if (length(deps) > 0) install.packages(deps)
shell: Rscript {0}
if: ${{ hashFiles('renv.lock') == '' }}

- name: Ensure Quarto R runtime packages
run: |
lib <- Sys.getenv("R_LIBS_USER")
if (nzchar(lib)) {
dir.create(lib, recursive = TRUE, showWarnings = FALSE)
.libPaths(c(lib, .libPaths()))
}
pkgs <- c("knitr", "rmarkdown")
missing <- pkgs[!vapply(pkgs, requireNamespace, logical(1), quietly = TRUE)]
if (length(missing) > 0) install.packages(missing)
shell: Rscript {0}

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 changes: 0 additions & 41 deletions .github/workflows/publish.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
workflow_dispatch:

name: Air Formatting

permissions:
contents: write

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Install Air
uses: posit-dev/setup-air@v1

- name: Format
run: air format .

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "Style code (Air)"
32 changes: 32 additions & 0 deletions .github/workflows/update-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Update Tutorial Template Extension

on:
schedule:
- cron: "0 0 2 * *"
workflow_dispatch:

permissions: read-all

jobs:
update-downstream-tutorials:
# prevent action from running in actual extension repo--else, recursive installations
# only users of the extension should have these auto-updates
if: github.repository != 'lmu-osc/tutorial-template'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Update tutorial-template extension
run: quarto update lmu-osc/tutorial-template --no-prompt

- uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "Update tutorial-template extension (GHA)"
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,12 @@ rsconnect/
.httr-oauth
.quarto
_site/
**_files/

**/*.quarto_ipynb

# ignore posi assistant settings
.posit/assistant

# ignore individual file
plot-trait-evolution.html
14 changes: 14 additions & 0 deletions 404.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Uh-oh, looks like the page is missing!
description: The page you are looking for cannot be found 😟
---

The page you are looking for either does not exist or has been moved. Please check the URL and try again. If you believe this is an error, please contact the website administrator for assistance.

Note: many pages within our old tutorials have been moved to new locations as part of standardization efforts. It's likely the page you are looking for has been moved to a new location within the site.

<!--
Note: if you, the developer, want to have custom messages based on the URL someone is trying to access e.g. because a popular page has been moved and you want to direct readers to the new page/section, take a look at the `404.qmd` file in the main OSC website: https://github.com/lmu-osc/lmu-osc.github.io/blob/main/404.qmd

It contains code with customized messages/information based on the URL path that is being accessed. You can adapt this code to your own needs and customize the messages as you see fit.
-->
18 changes: 15 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,21 @@ authors:
orcid: "https://orcid.org/0000-0002-2378-4915"
affiliation:
- name: "University of Sheffield"
ror: " https://ror.org/05krs5044"
ror: "https://ror.org/05krs5044"
- family-names: "Ihle"
given-names: "Malika"
orcid: "https://orcid.org/0000-0002-9543-9310"
affiliation:
- name: "LMU Open Science Center"
ror: "https://ror.org/029e6qe04"
- family-names: "Kenny"
given-names: "Adam"
orcid: "https://orcid.org/0000-0002-1316-7382"
affiliation:
- name: "University of Oxford"
ror: "https://ror.org/052gg0110"
title: "Collaborative coding with GitHub and RStudio"
version: 0.1.0
version: 0.2.0
doi: "DOI_HERE_AFTER_GENERATED"
date-released: 2024-01-15
repository-code: "https://github.com/lmu-osc/Collaborative-RStudio-GitHub"
Expand All @@ -26,4 +38,4 @@ preferred-citation:
ror: "https://ror.org/029e6qe04"
repository-code: "https://github.com/lmu-osc/Collaborative-RStudio-GitHub"
url: "https://lmu-osc.github.io/Collaborative-RStudio-GitHub/"
type: "book"
type: "book"
1 change: 1 addition & 0 deletions Collaborative-RStudio-GitHub.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: e6cff1b6-d495-44c0-9f43-33511fbae88b

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In this session, you will
* observe the outcome of all contributions merged by your collaborator
* **pull the upstream repository into your fork** (i.e. update your fork to reflect all the changes that happened in your collaborator's original repository)

<img src="assets/new-overview.png" width="750">
<img src="/assets/new-overview.png" width="750">
<br/>

In this example, the file you will contribute is required to simulate the evolutionary trajectory of an imaginary bird species’ body size. We will use RStudio and GitHub to collate all species files and plot them all up together at the end. We will also discover the skull and beak shapes associated with each species you contributed (after they 'evolved' through a simple brownian motion model which assumes steps to progress completely at random).
Expand Down
Loading
Loading