Skip to content

Commit 37b3249

Browse files
authored
Multiple fixes 2603 (#71)
* feat: update devcontainer configuration, add maintainers guide, and enhance CI workflows * chore: update package-lock.json and uv.lock files * fix: update concurrency group in workflow and enhance link checking exclusions * fix: add missing permissions for lint jobs in workflow --------- Co-authored-by: Moritz Mähr <14755525+maehr@users.noreply.github.com>
1 parent ba14434 commit 37b3249

21 files changed

+4142
-4055
lines changed

.devcontainer/devcontainer.json

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
{
2-
"name": "Open-Research-Data Template",
3-
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
4-
"remoteUser": "codespace",
5-
"features": {
6-
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
7-
"version": "4.5.2",
8-
"vscodeRSupport": "basic",
9-
"installREnv": "true"
10-
},
11-
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
12-
"version": "release",
13-
"installTinyTex": "true",
14-
"installChromium": "false"
15-
},
16-
"ghcr.io/va-h/devcontainers-features/uv:1": {
17-
"version": "latest",
18-
"shellautocompletion": "true"
19-
}
20-
},
21-
"postCreateCommand": "uv sync && Rscript -e 'renv::restore()'",
22-
"customizations": {
23-
"vscode": {
24-
"extensions": [
25-
"quarto.quarto",
26-
"REditorSupport.r",
27-
"astral-sh.uv",
28-
"astral-sh.ty",
29-
"ms-toolsai.jupyter",
30-
"Posit.air-vscode"
31-
],
32-
"settings": {
33-
"r.rterm.option": ["--no-save", "--no-restore-data", "--quiet"],
34-
"r.useRenvLibPath": true,
35-
"[r]": {
36-
"editor.defaultFormatter": "Posit.air-vscode",
37-
"editor.formatOnSave": true
38-
}
39-
},
40-
"openFiles": ["README.md", "README.template.md"]
41-
}
42-
}
2+
"name": "Open-Research-Data Template",
3+
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
4+
"remoteUser": "codespace",
5+
"features": {
6+
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
7+
"version": "4.5.2",
8+
"vscodeRSupport": "basic",
9+
"installREnv": "true"
10+
},
11+
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
12+
"version": "release",
13+
"installTinyTex": "true",
14+
"installChromium": "false"
15+
},
16+
"ghcr.io/va-h/devcontainers-features/uv:1": {
17+
"version": "latest",
18+
"shellautocompletion": "true"
19+
}
20+
},
21+
"postCreateCommand": "uv sync && Rscript -e 'renv::restore()'",
22+
"customizations": {
23+
"vscode": {
24+
"extensions": [
25+
"quarto.quarto",
26+
"REditorSupport.r",
27+
"astral-sh.uv",
28+
"astral-sh.ty",
29+
"ms-toolsai.jupyter",
30+
"Posit.air-vscode"
31+
],
32+
"settings": {
33+
"r.rterm.option": ["--no-save", "--no-restore-data", "--quiet"],
34+
"r.useRenvLibPath": true,
35+
"[r]": {
36+
"editor.defaultFormatter": "Posit.air-vscode",
37+
"editor.formatOnSave": true
38+
}
39+
},
40+
"openFiles": ["README.md", "README.template.md"]
41+
}
42+
}
4343
}

.github/MAINTAINERS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Maintainers Guide
2+
3+
## `_quarto.yml` Override Mechanism
4+
5+
The CI workflow (`.github/workflows/quarto-publish.yml`) contains a step that copies `.github/_quarto.yml` over the root `_quarto.yml` **only** when the repository is `maehr/open-research-data-template`. This override customizes the Quarto configuration for the template's own documentation site.
6+
7+
**Template instances** (repositories created from this template) are not affected by this override. If you need to customize the Quarto configuration for your project, edit the root `_quarto.yml` directly.

.github/workflows/changelog.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Create changelog
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [main]
46

57
jobs:
68
changelog:

.github/workflows/greetings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
greeting:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/first-interaction@v1
9+
- uses: actions/first-interaction@v3
1010
with:
1111
repo-token: ${{ secrets.GITHUB_TOKEN }}
1212
issue-message: 'Hi there! Thanks for opening your first issue!'

.github/workflows/quarto-publish.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ permissions:
1414
pages: write
1515
id-token: write
1616

17+
concurrency:
18+
group: '${{ github.workflow }}-${{ github.ref }}'
19+
cancel-in-progress: true
20+
1721
jobs:
1822
lint:
1923
name: Lint with Prettier
2024
runs-on: ubuntu-latest
25+
permissions:
26+
contents: read
2127

2228
steps:
2329
- name: Check out repository
@@ -34,6 +40,46 @@ jobs:
3440
- name: Check for linting errors
3541
run: npm run check
3642

43+
lint-python:
44+
name: Lint Python
45+
runs-on: ubuntu-latest
46+
permissions:
47+
contents: read
48+
49+
steps:
50+
- name: Check out repository
51+
uses: actions/checkout@v5
52+
53+
- name: Install uv
54+
uses: astral-sh/setup-uv@v6
55+
56+
- name: Run ruff check
57+
run: uv run ruff check
58+
59+
- name: Run ty check
60+
run: uv run ty check
61+
62+
lint-r:
63+
name: Lint R
64+
runs-on: ubuntu-latest
65+
permissions:
66+
contents: read
67+
68+
steps:
69+
- name: Check out repository
70+
uses: actions/checkout@v5
71+
72+
- name: Setup R
73+
uses: r-lib/actions/setup-r@v2
74+
with:
75+
r-version: renv
76+
77+
- name: Setup renv
78+
uses: r-lib/actions/setup-renv@v2
79+
80+
- name: Run lintr
81+
run: Rscript -e 'lintr::lint_dir(".")'
82+
3783
build-optimize:
3884
name: Build, Optimize, and Upload Artifacts
3985
runs-on: ubuntu-latest
@@ -103,7 +149,7 @@ jobs:
103149
name: github-pages
104150
url: ${{ steps.deployment.outputs.page_url }}
105151
runs-on: ubuntu-latest
106-
needs: [build-optimize]
152+
needs: [lint, lint-python, lint-r, build-optimize]
107153
if: github.event_name != 'pull_request'
108154

109155
steps:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
_site/
66

77
# Lychee link checker cache
8-
.lycheecache/
8+
.lycheecache
99

1010
# Jampack
1111
.jampack/

.lycheerc.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ exclude = [
1212
"https://www.gnu.org/licenses/",
1313
"https://www.gnu.org/licenses/agpl-3.0.html",
1414
"https://www.makeareadme.com/",
15+
"https://fsf.org/",
16+
"https://book.the-turing-way.org/",
1517
]
1618

1719
# Timeout for requests (seconds)

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

.prettierrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"useTabs": true,
3-
"singleQuote": true,
4-
"trailingComma": "none",
5-
"printWidth": 100
2+
"useTabs": false,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100
66
}

AGENTS.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ Aligned with _The Turing Way_ advanced structure:
5555

5656
- `analysis/` — notebooks and analysis scripts
5757
- `assets/` — images and media
58-
- `build/` — data build/processing scripts
5958
- `data/` — datasets (FAIR-aligned)
6059
- `documentation/` — extended docs beyond README
6160
- `project-management/` — planning and minutes
@@ -102,7 +101,7 @@ Place new files accordingly.
102101
- `styler::style_dir(".")` for R formatting
103102
- `lintr::lint_dir(".")` for R linting
104103
- `quarto preview` to detect rendering issues
105-
- Run and validate scripts in `src/`, `build/`, and `analysis/`
104+
- Run and validate scripts in `src/` and `analysis/`
106105
- Confirm `.github/workflows/` still pass for changes
107106

108107
## 9) GitHub Features and Security (Project instances)

0 commit comments

Comments
 (0)