Distilled from CONTRIBUTING.md and docs/WORKFLOW_LEARNING_GUIDE.md · Print-friendly
Any edit to your chapter shifts its hash. Always re-render and commit the updated html.json after editing.
| File | Location |
|---|---|
| Chapter source | chapters/0X-topic/index.qmd |
| Indicator script | scripts/R/0X-topic/RI_XY_name.R |
| Fact CSV | data/fact/RI_XY_name.csv |
| Freeze snapshot | _freeze/chapters/0X-topic/index/execute-results/html.json |
git checkout -b yourname/chapter-namequarto render chapters/0X-topic/index.qmdgit statusgit add .git commit -m "feat: description"Pattern: yourname/chapter-or-feature
Lowercase, hyphens, include your name. No spaces, no capitals, no underscores.
| Prefix | Use when |
|---|---|
feat: | New indicator or chart |
fix: | Correcting a calculation or broken render |
docs: | Narrative text only, no code changes |
chore: | Housekeeping (gitignore, CI config) |
refactor: | Code restructured, no behaviour change |
First line ≤ 50 chars, imperative mood: "add", not "added".
| File | Reason |
|---|---|
renv.lock | Project lead only |
*.Rproj | IDE config, per-machine |
data/raw/* | Gitignored, too large |
.env | DB credentials — blocked by hook |
| Personal scratch files | Keep local |
git add updated html.json, commit & push.
git pull origin branch-name then push again.
git add before git commit.git status, then git add the right files.
git add scripts/R/… + data/fact/…, commit & push.
git branch yourname/chapter from current HEAD, git reset --soft HEAD~1 on wrong branch, re-commit on correct branch.
# Start a contribution
git checkout main
git pull
git checkout -b yourname/chapter-name
# Render
quarto render chapters/0X-topic/index.qmd
# Stage (name every file)
git add chapters/0X-topic/index.qmd
git add scripts/R/0X-topic/RI_XY_name.R
git add data/fact/RI_XY_name.csv
git add _freeze/chapters/0X-topic/index/execute-results/html.json
# Commit
git commit -m "feat: add X indicator"
# Push and open PR
git push -u origin yourname/chapter-name
# Force re-render (data updated, source unchanged)
quarto render chapters/0X-topic/index.qmd --execute-freeze refresh
# Check what will re-execute
quarto render --dry-run