Skip to content

Add the harmonic mean definition next to the mean - #815

Open
d-morrison wants to merge 2 commits into
mainfrom
claude/project-thread-vtz569
Open

d-morrison wants to merge 2 commits into
mainfrom
claude/project-thread-vtz569

Conversation

@d-morrison

@d-morrison d-morrison commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Ezra · project thread

Refs #814. The stacked sds PR, Morrison-Lab/sds#619, closes it.

Why

The harmonic mean is general math, but its only definition is on the sds classification page.
The mean and the weighted average are on the mds vectors page, so the definition belongs next to them (course sequence mds -> pds -> sds).
Ezra approved the move in the project thread on 2026-11-13.

What

  • _subfiles/linear-algebra/_def-harmonic-mean.qmd and _exm-harmonic-mean.qmd, copied from sds _subfiles/classification/ with their ids (#def-harmonic-mean, #exm-harmonic-mean, #eq-harmonic-mean, #eq-exm-harmonic-mean), so sds can repoint its links by changing only the path.
  • Content changes, all of them links:
    • "average" in both divs links #def-mean;
    • "harmonic mean" in the example's last sentence links #def-harmonic-mean (check-term-links flagged it on the first push).
  • Both divs are included right after the mean's exercise and solution in _sec_linear_algebra_vectors_special.qmd.
  • wikipedia_harmonic_mean copied into references.bib from sds.

"Reciprocals" stays unlinked: no prerequisite site defines a reciprocal yet, and adding one to mcs is waiting on Ezra.

Checks

  • quarto render linear-algebra-vectors.qmd --to html: renders. The divs show as Definition 16 and Example 11, the four ids appear once each, and no cross-reference is unresolved. The one warning is about code-link: the session lacked the downlit and xml2 packages, and this PR doesn't change that.
  • typos on the two new files: clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_019xfc9q9AYY3SdrG17Xxjqb

The harmonic mean is general math, but its only definition was on the
sds classification page. The arithmetic mean and the weighted average
are on the mds vectors page, so the definition and its example move
here, keeping their ids, so sds can link them (course sequence
mds -> pds -> sds). "Average" in both divs now links #def-mean.

Part of #814.

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

This comment has been minimized.

@github-actions

This comment has been minimized.

check-term-links flagged the unlinked 'harmonic mean' in the example
div; link it to the definition just above.

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

Copy link
Copy Markdown
Contributor

Claude finished review — View run


Live fetch of PR mds#815 on 2026-11-13: it is OPEN, not a draft, not merged (mergedAt is null), and its head is 90edcc1a5403479e9b2e53b40c2b94a73d3f9214. That is the commit I reviewed, so the verdict applies to the current head.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "90edcc1a5403479e9b2e53b40c2b94a73d3f9214",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "The new commit links the harmonic mean to its definition anchor in the example subfile; the anchor exists and the line stays one clause per side of the semicolon.",
  "holistic_assessment": "The change is a one-line scoped link fix with no integration, regression or validation concerns; the prior clean review of the earlier commit still stands."
}

Reviewed commit: 90edcc1

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2042 (review) — run

@github-actions

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

Built to branch gh-pages at 2026-11-13 21:48 UTC.

@d-morrison

Copy link
Copy Markdown
Contributor Author

Annotation dispositions for head 90edcc1:

  • SUBMODULES_TOKEN is empty; cloning submodules anonymously (notice, 1 passing run): not acted on. It is the same notice on every run of this repository, this PR changes no submodule or checkout step, and the checkout passed.
  • Skipping element-level diff highlighting: ... exceed the 500-element cap (notice, 2 passing runs): not acted on. It reports the preview diff tool's size cap on the whole site, not anything in these four files.
  • Example #exm-harmonic-mean has no figure (warning, 1 passing run): not acted on in this PR. The check is warn-only, and adding a figure goes beyond moving the definition and its example; the owner can decide whether to add one.
  • Definition #def-harmonic-mean defines a function of two inputs and has no graph (warning, 1 passing run): not acted on in this PR, for the same reason; it is the same kind of advisory as the example's.
  • The ubuntu-latest label will migrate to Ubuntu 26 (known notice, 51 passing runs): not acted on. It is a GitHub-wide notice and this PR changes no runner label.

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

@d-morrison

Copy link
Copy Markdown
Contributor Author

Cross-cutting review (agy, Gemini 3.8 Flash, cross-harness) of head 90edcc1: CLEAN on the third pass. check-pr-fully-clean.py also reports FULLY CLEAN on this head, after the annotation-dispositions comment above.
The first two passes said NOT CLEAN on four points, and I measured each against the repository:

  • The mds/ include prefix matches every other include in the same section file on main.
  • (#def-mean) is used in 4 other files, and _def-mean.qmd is included in the same section file, so the anchor resolves.
  • The one-line $$ ... $$ {#eq-...} form appears in 30 files on main.
  • Placement: the new includes come after the whole mean group (lines 15 to 27) and before the ones vector. My first wording said "right after the mean", which was loose; with the exact placement the reviewer judged it not a defect.
    I also checked that the live PR preview page (linear-algebra-vectors) returns 200 and carries def-harmonic-mean, exm-harmonic-mean and the 0.667 result (last modified 21:55:56 GMT, so an earlier 404 was before it deployed). The Wikipedia URL in the bib entry returns 200, and I checked the example's arithmetic by hand: 2/(2+1) = 2/3.

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

This branch has not been deployed

No deployments
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