Skip to content

Define literate programming in the Quarto section - #1515

Merged
d-morrison merged 4 commits into
mainfrom
claude/project-thread-1q48ky
Dec 1, 2026
Merged

d-morrison merged 4 commits into
mainfrom
claude/project-thread-1q48ky

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Requested by Ezra · project thread

Summary

The Quarto section of the Statistical Computing in R page (chapters/intro-to-R.qmd) cited Knuth on literate programming without defining it.
This PR:

  • adds #def-literate-programming, a definition of literate programming citing [@knuth84],
  • adds #exm-literate-programming, a short Quarto source file as an example of a literate program,
  • adds #exm-not-literate-programming, a counterexample: an R script writing a CSV whose numbers are copied by hand into a Word report,
  • describes Quarto as a literate programming system, linking the definition,
  • adds the Wikipedia article Literate programming to the section's reading list,
  • removes the trailing "See @knuth84 for additional discussion of literate programming." sentence, since the definition now carries that citation.

Each new div is preceded by a {{< slidebreak >}}.


Generated by Claude Code

The Quarto section of the Statistical Computing in R page cited Knuth
on literate programming without defining it. Add a definition div,
an example (a Quarto file) and a counterexample (a script plus a
hand-copied report), describe Quarto as a literate programming system,
and add the Wikipedia article to the section's reading list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDkNzosojb4ZfSWPLAsV6y
@d-morrison d-morrison self-assigned this Dec 1, 2026
check-definite-antecedents failed on "This Quarto source file",
which opened the example div with no antecedent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDkNzkaT82u6guF3tb7C6Q

d-morrison commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

lint-changed-files, build / build and check-pdf all fail on d69b383 (lint log, build log, check-pdf log) with Error: failed to install "rjags", before any linting or rendering runs.
That is not this PR's change, which edits only prose in chapters/intro-to-R.qmd: renv 1.2.2 replaces the locked rjags 4-17 with 5-5, which needs JAGS 5, and the runners have JAGS 4.3.2.
The fix, bumping rme's renv to 1.3.1, is #1516; I'll merge main into this branch once it lands and re-check.

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Review finding on 1ea548d: one source line held an independent clause
and a subordinate when-clause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDkNzkaT82u6guF3tb7C6Q

Copy link
Copy Markdown
Collaborator Author

Addressed in eaa4f78: the line now breaks after "stale", so the when-clause sits on its own line.
The Wiktionary entry for literate programming exists (it defines it as a paradigm presenting a program as a natural-language explanation of its logic), so the definition's link stays.

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Claude finished review — View run


Review of the one new commit, eaa4f78, in range 1ea548df..eaa4f788. It touches only chapters/intro-to-R.qmd. I did not render the chapter or run lint or the spell check.

The commit splits so the report goes stale when the script changes. after "stale", which is the fix the prior review asked for. That review's one blocking finding (chapters/intro-to-R.qmd:65, rule 12) is resolved. The two-line version renders identically and each line now holds one clause.

I re-read the rest of the added prose in the definition and the two examples, chapters/intro-to-R.qmd:194-250, and found nothing new.

  • Line breaks: Every other added line holds a single clause. Lines 214 and 242 end at a clause boundary.
  • Structure: Each div has its own {{< slidebreak >}}. The definition is followed by an example and a counterexample, and the headings are ####.
  • Inline code: The mean(c(2, 4, 9)) example is correct, because the mean is 5. knitr::inline_expr() exists. The four-backtick fence around the nested chunk is valid.
  • Math: The diff adds no math, so the macro check does not apply.

The two earlier verdicts differ. The first, "Ready for merge" at d69b383, was superseded by the second, "Needs more work" at 1ea548d, whose only blocker is now fixed.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "eaa4f788762436b1f866e76aed7158d35b08d680",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "The commit eaa4f78 in chapters/intro-to-R.qmd breaks the counterexample line after 'stale', resolving the prior clause-level line-break finding; all other added lines hold one clause each.",
  "holistic_assessment": "The change is a small self-contained content addition with definition, example and counterexample structure intact; the prior blocker is fixed, and render, lint and spell check were not run."
}

Reviewed commit: eaa4f78

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2280 (review) — run

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.2
🚀 Preview available at: https://Morrison-Lab.github.io/rme/pr-preview/pr-1515/

Built to branch gh-pages at 2026-12-01 04:52 UTC.

@d-morrison
d-morrison merged commit 68ba7bc into main Dec 1, 2026
43 checks passed
@d-morrison
d-morrison deleted the claude/project-thread-1q48ky branch December 1, 2026 05:26
d-morrison added a commit to Morrison-Lab/ai-config that referenced this pull request Dec 2, 2026
…6256)

* ums: single-branch fetch of main; Wiktionary check behind the proxy

From driving Morrison-Lab/rme#1515: a single-branch shallow clone's
`git fetch origin main` creates no origin/main, and en.wiktionary.org is
proxy-blocked, so confirm an entry through WebSearch's allowed_domains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDkNzkaT82u6guF3tb7C6Q

* Address review: read FETCH_HEAD, note fetch.prune and when MERGE_MAIN_FOR applies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDkNzoNA2r727NDgjLZTNQ

---------

Co-authored-by: Claude <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.

2 participants