Skip to content

Add a figure to the best-constant example - #342

Merged
d-morrison merged 5 commits into
mainfrom
claude/project-thread-xl7r9m-fig
Nov 7, 2026
Merged

d-morrison merged 5 commits into
mainfrom
claude/project-thread-xl7r9m-fig

Conversation

@d-morrison

Copy link
Copy Markdown
Contributor

Important

Stacked on #334, which must land first.

Part of #329. check-exm-figures warned that #exm-best-constant-auto had no figure. The example now plots the expected squared error of every constant from 10 to 40 against c, computed from the 392 cars in data/auto.csv, and marks the mean, the median and c = 20 from the table. The curve bottoms out at the mean (c = 23.4, error 60.76), which is the point of the example. I ran the chunks locally against the data and checked the rendered plot: the three labels do not overlap.


Generated by Claude Code

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

…t c = 20

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9ohb8bijGhgKPdUpzm
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Base automatically changed from claude/project-thread-xl7r9m-restructure to main November 6, 2026 09:45
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013hBCtw8LajYGV7TiWG1zum
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Claude finished review — View run


I fetched PR #342 live just now. It is open, not a draft, and not merged. Its head is 11d9458a4a818b8ed7419b6c25c4a198273fd7c6, the commit I reviewed. The review below still applies to the current head.

Confirming review: the new head 11d9458a4a818b8ed7419b6c25c4a198273fd7c6 has no new findings. The prior verdict, Ready for merge, still stands (comment of 2026-11-06T10:14:24Z, commit 125f493).

I read the diff and the surrounding subfile. I did not render the page or run the linters.

  • Range since the last review: it has no commit of this PR's own. It holds only the merge 11d9458 of main, which matches git's automatic merge of its parents. The three main commits it brings in (18f5bab, b2ea7bd, daea5c6) do not touch _subfiles/_exm-best-constant-auto.qmd. The PR still changes only that file, by adding one figure chunk, and I found nothing in it to flag.
  • Chunk contents: every variable the chunk uses (mpg, c_values, errors) comes from the earlier best-constant-auto chunk. The label fig-best-constant-auto is unique, and @fig-best-constant-auto resolves to it.
  • Chunk options and lint: the chunk uses #| options and code-fold: true, which fits a figure where the output is the point. The code has no nested calls: the aes() mappings are named objects and curve is piped into ggplot().
  • Alt text and caption: they match the data. The mean is about 23.4, the median is just left of it, and c = 20 is higher on the left arm. The point_labels vector, label_hjust and label_vjust are in the order of c_values.
  • Content rules: the diff adds no math, so the macro check does not apply. Prose lines break at the sentence or clause. Referents ("the 392 cars in the Auto data", "the table") are introduced earlier in the same div. No definitions, links, workflows or generated files are touched.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "11d9458a4a818b8ed7419b6c25c4a198273fd7c6",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "The figure chunk in _subfiles/_exm-best-constant-auto.qmd uses only variables from the earlier chunk, has a unique fig label, aligned point labels, and accurate alt text; no defects found.",
  "holistic_assessment": "The head adds only a clean merge of main to an already reviewed single-file change, with no scope creep, link changes, math, or workflow impact, so the earlier clean verdict stands."
}

Reviewed commit: 11d9458

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2495 (review) — run

@github-actions

github-actions Bot commented Nov 7, 2026

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

Built to branch gh-pages at 2026-11-07 13:08 UTC.

@d-morrison
d-morrison merged commit 20dac41 into main Nov 7, 2026
42 checks passed
@d-morrison
d-morrison deleted the claude/project-thread-xl7r9m-fig branch November 7, 2026 13:09
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