ci: run validate.R self-check in the build job - #3
Open
billdenney wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
validate.Ris 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— newValidate documented examplesstep: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 runningRscript validate.Rbefore pushing, and the Quick checklist has a matchingentry.
CLAUDE.md—validate.Radded to the Project Structure listing; thebook.ymldescription updated to mention the validation step.Verification
Rscript validate.Rlocally (R 4.6.1, PKNCA installed): 22 passed,0 failed, exit code 0.
1 check(s) FAILEDand exits 1, so the CI step genuinely gates.🤖 Generated with Claude Code