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
4 changes: 4 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
any::visNetwork
github::humanpred/pknca

# Fails the job (non-zero exit) if any documented example check fails
- name: Validate documented examples
run: Rscript validate.R

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

Expand Down
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ _quarto.yml # book config: title, author, chapters, site-url, navba
index.qmd # introduction + What's new per version
user/ # 19 User Guide chapters
dev/ # 2 Developer Reference chapters
.github/workflows/book.yml # CI: renders and deploys to GitHub Pages on push to main
validate.R # numeric self-check of key documented examples (Rscript validate.R; exits 1 on failure)
.github/workflows/book.yml # CI: runs validate.R, renders, deploys to GitHub Pages on push to main
_book/ # rendered output (gitignored)
```

Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ quarto render
- Watch for **red error output** in the console — chunks that error are flagged even though `execute: error: false` suppresses them in the HTML output.
- Fix the code, not the error suppression.

Before pushing, run the numeric self-check, which verifies that key documented examples still produce correct values:

```bash
Rscript validate.R
```

It prints PASS/FAIL per check and exits non-zero on any failure. CI runs it too (`.github/workflows/book.yml`), so a failing check will fail the build.

Then open the book and spot-check every updated page:

```bash
Expand Down Expand Up @@ -207,6 +215,7 @@ Template:
[ ] Verify all packages are listed in .github/workflows/book.yml — audit at once with:
grep -rh "^library(" user/ dev/ index.qmd | sort -u
[ ] quarto render — zero errors in console
[ ] Rscript validate.R — all checks PASS (CI runs this too and fails otherwise)
[ ] Spot-check _book/ in browser
[ ] Add new functions to chapter pkgdown reference footers if needed
[ ] git commit and push (CI auto-deploys to humanpred.github.io/pknca-book/)
Expand Down
Loading