Skip to content

ci: run validate.R self-check in the build job - #3

Open
billdenney wants to merge 1 commit into
mainfrom
claude/run-validate-r-in-ci
Open

ci: run validate.R self-check in the build job#3
billdenney wants to merge 1 commit into
mainfrom
claude/run-validate-r-in-ci

Conversation

@billdenney

Copy link
Copy Markdown
Member

What

validate.R is a root-level self-check that verifies key documented examples
(Indometh IV, Theoph extravascular, options defaults, parameter registry)
produce numerically correct output — printing PASS/FAIL and exiting 1 on any
failure. It was referenced nowhere (not in CI, README, CONTRIBUTING, or
CLAUDE.md), so nothing ran it and it would rot silently.

Changes

  • .github/workflows/book.yml — new Validate documented examples step:

    - name: Validate documented examples
      run: Rscript validate.R

    Placed after the R dependency install (PKNCA and dplyr are already installed
    there) and before the slower Quarto render, so a numeric regression fails the
    job fast. A non-zero exit from the script fails the step and therefore the job.

  • CONTRIBUTING.md — Step 5 of the update workflow now instructs running
    Rscript validate.R before pushing, and the Quick checklist has a matching
    entry.

  • CLAUDE.mdvalidate.R added to the Project Structure listing; the
    book.yml description updated to mention the validation step.

Verification

  • Rscript validate.R locally (R 4.6.1, PKNCA installed): 22 passed,
    0 failed, exit code 0
    .
  • Failure path: a copy with one expectation deliberately broken prints
    1 check(s) FAILED and exits 1, so the CI step genuinely gates.
  • Workflow YAML parses cleanly after the edit.

🤖 Generated with Claude Code

validate.R verifies key documented examples against live PKNCA output
but was referenced nowhere, so nothing ran it and it would rot silently.
Run it in CI after the R dependencies install (its non-zero exit on any
FAIL fails the job, before the slower Quarto render), and document it in
CONTRIBUTING.md's update workflow and CLAUDE.md's project structure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant