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
82 changes: 41 additions & 41 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"name": "Open-Research-Data Template",
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"remoteUser": "codespace",
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
"version": "4.5.2",
"vscodeRSupport": "basic",
"installREnv": "true"
},
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
"version": "release",
"installTinyTex": "true",
"installChromium": "false"
},
"ghcr.io/va-h/devcontainers-features/uv:1": {
"version": "latest",
"shellautocompletion": "true"
}
},
"postCreateCommand": "uv sync && Rscript -e 'renv::restore()'",
"customizations": {
"vscode": {
"extensions": [
"quarto.quarto",
"REditorSupport.r",
"astral-sh.uv",
"astral-sh.ty",
"ms-toolsai.jupyter",
"Posit.air-vscode"
],
"settings": {
"r.rterm.option": ["--no-save", "--no-restore-data", "--quiet"],
"r.useRenvLibPath": true,
"[r]": {
"editor.defaultFormatter": "Posit.air-vscode",
"editor.formatOnSave": true
}
},
"openFiles": ["README.md", "README.template.md"]
}
}
"name": "Open-Research-Data Template",
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"remoteUser": "codespace",
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
"version": "4.5.2",
"vscodeRSupport": "basic",
"installREnv": "true"
},
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
"version": "release",
"installTinyTex": "true",
"installChromium": "false"
},
"ghcr.io/va-h/devcontainers-features/uv:1": {
"version": "latest",
"shellautocompletion": "true"
}
},
"postCreateCommand": "uv sync && Rscript -e 'renv::restore()'",
"customizations": {
"vscode": {
"extensions": [
"quarto.quarto",
"REditorSupport.r",
"astral-sh.uv",
"astral-sh.ty",
"ms-toolsai.jupyter",
"Posit.air-vscode"
],
"settings": {
"r.rterm.option": ["--no-save", "--no-restore-data", "--quiet"],
"r.useRenvLibPath": true,
"[r]": {
"editor.defaultFormatter": "Posit.air-vscode",
"editor.formatOnSave": true
}
},
"openFiles": ["README.md", "README.template.md"]
}
}
}
7 changes: 7 additions & 0 deletions .github/MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Maintainers Guide

## `_quarto.yml` Override Mechanism

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.

**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.
4 changes: 3 additions & 1 deletion .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Create changelog

on: [push]
on:
push:
branches: [main]

jobs:
changelog:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
- uses: actions/first-interaction@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Hi there! Thanks for opening your first issue!'
Expand Down
48 changes: 47 additions & 1 deletion .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ permissions:
pages: write
id-token: write

concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

jobs:
lint:
name: Lint with Prettier
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Check out repository
Expand All @@ -34,6 +40,46 @@ jobs:
- name: Check for linting errors
run: npm run check

lint-python:
name: Lint Python
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Check out repository
uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Run ruff check
run: uv run ruff check

- name: Run ty check
run: uv run ty check

lint-r:
name: Lint R
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Check out repository
uses: actions/checkout@v5

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: renv

- name: Setup renv
uses: r-lib/actions/setup-renv@v2

- name: Run lintr
run: Rscript -e 'lintr::lint_dir(".")'

build-optimize:
name: Build, Optimize, and Upload Artifacts
runs-on: ubuntu-latest
Expand Down Expand Up @@ -103,7 +149,7 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [build-optimize]
needs: [lint, lint-python, lint-r, build-optimize]
if: github.event_name != 'pull_request'

steps:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
_site/

# Lychee link checker cache
.lycheecache/
.lycheecache

# Jampack
.jampack/
Expand Down
2 changes: 2 additions & 0 deletions .lycheerc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ exclude = [
"https://www.gnu.org/licenses/",
"https://www.gnu.org/licenses/agpl-3.0.html",
"https://www.makeareadme.com/",
"https://fsf.org/",
"https://book.the-turing-way.org/",
]

# Timeout for requests (seconds)
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
8 changes: 4 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
"useTabs": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100
}
3 changes: 1 addition & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Aligned with _The Turing Way_ advanced structure:

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

## 9) GitHub Features and Security (Project instances)
Expand Down
14 changes: 13 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# Go to https://citation-file-format.github.io/ to learn more about the Citation File Format.
cff-version: 1.2.0
title: REPO_NAME
message: >-
If you use this dataset, please cite it using the
metadata from this file.
type: dataset
authors:
- given-names: FULLNAME
email: '[INSERT CONTACT METHOD]'
repository-code: 'https://github.com/USERNAME/REPO_NAME'
license: AGPL-3.0
version: 0.1.0
abstract: SHORT_DESCRIPTION
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ email, or any other method with the owners of this repository before making a ch

Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.

## Environment Setup

This project uses an `example.env` file for local configuration. To set up your environment:

1. Copy `example.env` to `.env`: `cp example.env .env`
2. Fill in the values in `.env` with your actual configuration
3. `.env` is git-ignored and will not be committed

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
Expand Down
1 change: 0 additions & 1 deletion README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ The structure of this repository follows the [Advanced Structure for Data Analys

- `analysis/`: scripts and notebooks used to analyze the data
- `assets/`: images, logos, etc. used in the README and other documentation
- `build/`: scripts and notebooks used to build the data
- `data/`: data files
- `documentation/`: documentation for the data and the repository
- `project-management/`: project management documents (e.g., meeting notes, project plans, etc.)
Expand Down
4 changes: 3 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Complete the following steps after creating your project from this template to c
- [ ] **Add Zenodo DOI to README**: After creating your first release and obtaining a Zenodo DOI, replace `ZENODO_RECORD` in README.md with your actual Zenodo record number (found in your Zenodo deposit URL).
- [ ] **Add Favicons**: Generate and add favicon files to the root directory using [favicon.io](https://favicon.io/) or a similar service. Include `favicon.ico`, `favicon-16x16.png`, `favicon-32x32.png`, `apple-touch-icon.png`, and Android icons.
- [ ] **Address TODO Comments**: Search for `TODO` comments throughout all project files using `grep -r "TODO" .` and complete or remove each task as appropriate for your project.
- [ ] **Update Citation File**: Edit `CITATION.cff` with your project's citation metadata (authors, title, version, DOI, and repository URL). See the [Citation File Format guide](https://citation-file-format.github.io/) for details.
- [ ] **Finalize README**: Once all customization is complete, delete the template README.md and rename `README.template.md` to `README.md` to make it your project's main README.
- [ ] **Format Files**: Run `npm run format` to apply consistent formatting to all files using Prettier before committing changes.
- [ ] **Commit Changes**: Use `npm run commit` to create a properly formatted commit message following Conventional Commits standards (e.g., "chore: initial project setup").
Expand All @@ -31,9 +32,10 @@ Complete the following steps after creating your project from this template to c

## Optional Enhancements

- [ ] **Add Citation File**: Create a `CITATION.cff` file with your project's citation metadata using the [Citation File Format guide](https://citation-file-format.github.io/). Include authors, title, version, DOI, and repository URL.
- [ ] **Add Zenodo Metadata File**: Create a `.zenodo.json` file to control metadata sent to Zenodo during archival. Include custom creators, contributors, keywords, and license information. See [Zenodo developer documentation](https://developers.zenodo.org/?python#add-metadata-to-your-github-repository-release) for schema details.

- [ ] **Review Project-Management Files**: Populate or remove the files in `project-management/` before publishing. These are placeholder templates for meeting notes and project plans.

## Verification Steps

After completing the checklist:
Expand Down
6 changes: 5 additions & 1 deletion example.env
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
ENV_VAR="Value"
# Copy this file to .env and fill in the values.
# .env is ignored by git and used for local configuration.

# Example: API key for an external service
# API_KEY="your-api-key-here"
Loading
Loading