Skip to content
Closed
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
21 changes: 21 additions & 0 deletions .github/MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Maintainer Notes

## Scope

- This is a template repo; keep placeholders like `USERNAME` and `REPO_NAME` intact.
- Avoid adding new dependencies unless necessary.

## Routine Maintenance

- Update template guidance and placeholder instructions as needed.
- Format and lint before releases or larger edits:
- `npm run format` (or `npm run check` to verify)
- `uv run ruff format` and `uv run ruff check`
- `uv run ty check` (if applicable)
- R: `styler::style_dir(".")` and `lintr::lint_dir(".")`

## Releases

- **Manual releases** (GitHub UI or `gh release create`) trigger `.github/workflows/release-site.yml` on `release: published`.
- The workflow renders the site and uploads `site.tar.gz` to the release.
- Do **not** run production Quarto commands (`quarto render` / `quarto publish gh-pages`) outside CI workflows.
6 changes: 0 additions & 6 deletions .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ jobs:
run: |
npx @divriots/jampack ./_site

- name: Upload Built Artifacts
uses: actions/upload-artifact@v4
with:
name: built-site
path: _site

- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v4 # or specific "vX.X.X" version tag for this action
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/release-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
release:
types:
- published

name: Build and Upload Release Site

permissions:
contents: write

jobs:
build-release-site:
name: Build and Upload Release Site
runs-on: ubuntu-latest

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

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

- 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: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html

Comment on lines +35 to +39
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the template repository itself (maehr/open-research-data-template), this workflow renders using the templated _quarto.yml instead of the template-specific .github/_quarto.yml, so the archived site.tar.gz for releases won’t match the site that GitHub Pages deploys from quarto-publish.yml (which conditionally overwrites _quarto.yml). To keep the release archive consistent with the deployed documentation, consider adding a conditional “Overwrite _quarto.yml” step here mirroring the one in .github/workflows/quarto-publish.yml (guarded with if: github.repository == 'maehr/open-research-data-template') before the Quarto render step.

Copilot uses AI. Check for mistakes.
- name: JamPack Optimization
run: |
npx @divriots/jampack ./_site || { echo "JamPack optimization failed; check the previous command output for details." >&2; exit 1; }

- name: Archive site
run: |
if [ ! -d _site ]; then
echo "Missing _site directory; Quarto render did not produce output." >&2
exit 1
fi
tar -czf site.tar.gz _site

- name: Upload site archive to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.event.release.tag_name }}" site.tar.gz --clobber
35 changes: 24 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This template includes placeholders like: `USERNAME`, `REPO_NAME`, `FULLNAME`, `
- **Replace placeholders** in:
- `.github/ISSUE_TEMPLATE/config.yml`
- `_brand.yml`
- `CITATION.cff`
- `CODE_OF_CONDUCT.md`
- `DESCRIPTION`
- `package.json`
Expand All @@ -53,6 +54,7 @@ This template includes placeholders like: `USERNAME`, `REPO_NAME`, `FULLNAME`, `

Aligned with _The Turing Way_ advanced structure:

- `.github/` — issue templates, PR templates, and CI workflows
- `analysis/` — notebooks and analysis scripts
- `assets/` — images and media
- `build/` — data build/processing scripts
Expand All @@ -64,7 +66,16 @@ Aligned with _The Turing Way_ advanced structure:

Place new files accordingly.

## 6) Dependency Management (Both)
## 6) Protected Files (Both)

Do **not** modify these files directly during agent sessions unless explicitly requested:

- `LICENSE-AGPL.md`, `LICENSE-CCBY.md` — license text should not be altered
- `package-lock.json`, `uv.lock`, `renv.lock` — generated by package managers; modify via commands only
- `.gitattributes`, `.gitignore` — modify only when adding new file types or patterns
- `.github/workflows/*.yml` — CI configurations; changes require careful review

## 7) Dependency Management (Both)

### Node.js (npm)

Expand All @@ -88,13 +99,13 @@ Place new files accordingly.

**Note**: The `DESCRIPTION` file documents R development dependencies. The `.Rprofile` configures R options and activates renv.

## 7) Documentation Practices (Both)
## 8) Documentation Practices (Both)

- Prefer `.qmd` for executable, reproducible docs; `.md` for static content.
- Include valid YAML front matter.
- Execute and test code chunks. Keep outputs reproducible.

## 8) Testing and CI (Both)
## 9) Testing and CI (Both)

- `npm run check` for formatting
- `uv run ruff check` for Python linting
Expand All @@ -105,22 +116,24 @@ Place new files accordingly.
- Run and validate scripts in `src/`, `build/`, and `analysis/`
- Confirm `.github/workflows/` still pass for changes

## 9) GitHub Features and Security (Project instances)
**Archiving note**: CI artifacts are short-lived and for debugging only. GitHub Pages is a delivery channel. Long-term preservation uses GitHub Releases (site archive) and Zenodo for DOI-backed archival.

## 10) GitHub Features and Security (Project instances)

- **Enable GitHub Security Alerts** and Dependabot updates (Repository → Security).
- **Protect `main`**: require PR reviews and disallow force pushes.
- Keep `SECURITY.md` and GitHub security features active.
- Use provided **issue templates**; modify only to improve the template.

## 10) Zenodo Integration and DOI (Project instances)
## 11) Zenodo Integration and DOI (Project instances)

- **Enable Zenodo–GitHub integration** to archive releases and mint DOIs.
- After first release:
- Record your **`ZENODO_RECORD`** and **`DOI`**.
- **Zenodo DOI badge**: replace `GITHUB_REPO_ID` with the numeric repo ID from `https://api.github.com/repos/USERNAME/REPO_NAME` (`id` field). Badge will display your DOI after Zenodo links the release.
- Add the DOI to the README once available.

## 11) Website Publishing with GitHub Pages (Project instances)
## 12) Website Publishing with GitHub Pages (Project instances)

- In repo **Settings → Pages**:
- Source: **Deploy from a branch**
Expand All @@ -129,13 +142,13 @@ Place new files accordingly.
- `quarto render`
- `quarto publish gh-pages`

## 12) Brand and UX Polish (Project instances)
## 13) Brand and UX Polish (Project instances)

- Generate favicons (`favicon.ico`, `favicon-16x16.png`, `favicon-32x32.png`, `apple-touch-icon.png`, Android icons) and place at repo root.
- Replace placeholder contact details and short description.
- Remove or resolve `TODO` comments: `grep -r "TODO" .` then address or delete.
- Remove or resolve `TODO` comments: search for `TODO` in the codebase and address or delete each one.

## 13) Commands Recap (Both)
## 14) Commands Recap (Both)

| Command | Purpose |
| ------------------------- | ------------------------------------------------ |
Expand All @@ -156,7 +169,7 @@ Place new files accordingly.
| `quarto render` | **Production render** (avoid in agent sessions) |
| `quarto publish gh-pages` | **Production publish** (avoid in agent sessions) |

## 14) Finalization Workflow Checklist (Project instances)
## 15) Finalization Workflow Checklist (Project instances)

Follow `TODO.md`, then:

Expand All @@ -173,7 +186,7 @@ Follow `TODO.md`, then:
11. After first release, update `ZENODO_RECORD`, `DOI`, and DOI badge.
12. Verify security alerts and branch protection.

## 15) Verification Steps (Project instances)
## 16) Verification Steps (Project instances)

- `npm run check` passes.
- `uv run ruff check` passes without errors.
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ Conventional data publication as static supplementary files offers limited repro
- Licensed under [AGPL 3.0](https://www.gnu.org/licenses/agpl-3.0.html) and [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/deed) according to [The Turing Way](https://the-turing-way.netlify.app/reproducible-research/rdm/rdm-sharing.html#step-3-choose-a-licence-and-link-to-your-paper-and-code)
- Template for reporting data issues via `github/ISSUE_TEMPLATE/data_issue_report.yml`

### Archiving and Artifacts

- CI artifacts are short-lived and intended for debugging workflows, not preservation
- GitHub Pages is a delivery channel for the site, not a long-term archive
- Releases include a `site.tar.gz` build artifact for long-term access to the rendered site
- Zenodo integration provides DOI-backed archival of releases

### Documentation

- `README.md` following [www.makeareadme.com](https://www.makeareadme.com/) and [The Turing Way](https://book.the-turing-way.org/project-design/pd-overview/project-repo/project-repo-readme)
Expand Down
7 changes: 7 additions & 0 deletions README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ _Zenodo_ provides an [API (REST & OAI-PMH)](https://developers.zenodo.org/) to a
curl -i https://zenodo.org/api/records/ZENODO_RECORD
```

## Archiving and Artifacts

- CI artifacts are short-lived and intended for debugging workflows, not preservation
- GitHub Pages is a delivery channel for the site, not a long-term archive
- Releases include a `site.tar.gz` build artifact for long-term access to the rendered site
- Zenodo integration provides DOI-backed archival of releases

## Support

This project is maintained by [@USERNAME](https://github.com/USERNAME). Please understand that we can't provide individual support via email. We also believe that help is much more valuable when it's shared publicly, so more people can benefit from it.
Expand Down
3 changes: 2 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ Complete the following steps after creating your project from this template to c
- `GITHUB_REPO_ID` → Your GitHub repository ID (e.g., "123456789")
- `ZENODO_RECORD` → Your Zenodo record number (e.g., "1234567") after first release or manually create a Zenodo deposit
- `DOI` → Your DOI after first release (e.g., "10.5281/zenodo.1234567")
- Files to update: `.github/ISSUE_TEMPLATE/config.yml`, `_brand.yml`, `CODE_OF_CONDUCT.md`, `package.json`, `pyproject.toml`, `README.template.md`, and `SECURITY.md`
- Files to update: `.github/ISSUE_TEMPLATE/config.yml`, `_brand.yml`, `CITATION.cff`, `CODE_OF_CONDUCT.md`, `DESCRIPTION`, `package.json`, `pyproject.toml`, `README.template.md`, and `SECURITY.md`
- [ ] **Set Up Zenodo Integration**: Follow the [GitHub guide for Zenodo integration](https://docs.github.com/en/repositories/archiving-a-github-repository/referencing-and-citing-content) to enable automatic archiving and obtain a DOI for your repository.
- [ ] **Set Up Zenodo DOI Badge**: Replace `GITHUB_REPO_ID` with the repository ID from `https://api.github.com/repos/USERNAME/REPO_NAME` (look for the `id` field in the JSON response). The badge will automatically display your Zenodo DOI after the first release.
- [ ] **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).
- [ ] **Create a Release Archive**: Publish a GitHub Release so the workflow attaches `site.tar.gz` for long-term access to the rendered site.
- [ ] **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.
- [ ] **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.
Expand Down
Loading