Skip to content

Link the harmonic mean in mds instead of defining it here - #619

Open
d-morrison wants to merge 1 commit into
mainfrom
claude/project-thread-vtz569
Open

d-morrison wants to merge 1 commit 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

Important

Merge Morrison-Lab/mds#815 first, and wait until the mds site is republished.
This PR's links point at #def-harmonic-mean and #exm-harmonic-mean on the mds vectors page, and those anchors exist only after that PR is published.

Closes Morrison-Lab/mds#814.

Why

The harmonic mean is general math, so its definition and example move to the mds vectors page, next to the mean, in mds#815.
By the course sequence (mds -> pds -> sds), sds links that definition instead of repeating it.
Ezra approved the move in the project thread on 2026-11-13.

What

  • Deletes _subfiles/classification/_def-harmonic-mean.qmd and _exm-harmonic-mean.qmd, and their includes in classification.qmd.
  • Points the five links on the classification page at mds:
    • the two exercises (_exr-pos-agreement-harmonic.qmd, _exr-neg-agreement-harmonic.qmd);
    • the two theorems, where (@def-harmonic-mean) becomes a link on the words "harmonic mean";
    • _exm-pos-agreement-harmonic.qmd, where @exm-harmonic-mean becomes a link to the mds example.
  • Removes wikipedia_harmonic_mean from references.bib, because nothing else here cites it. mds#815 adds the entry to mds.
  • The section heading "Positive and negative agreement as harmonic means" and its theorems stay. The heading now shares its slide with the first exercise.

The theorems and solutions still write $H(\cdot, \cdot)$. The symbol is now defined on the linked mds page, not on this page.

Checks

  • quarto render classification.qmd --to html: renders. #def-harmonic-mean and #exm-harmonic-mean no longer appear on the page, and no cross-reference is unresolved (no ?@). The one warning is about code-link: the session lacked the downlit and xml2 packages, and this PR doesn't change that.
  • typos reports only the existing thm id prefix, in lines this PR leaves unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_019xfc9q9AYY3SdrG17Xxjqb

The harmonic mean is general math, so its definition and example moved
to the mds vectors page next to the mean (Morrison-Lab/mds#815). This
deletes the sds copies and points the classification page's five links
at the mds page, so sds relies on mds instead of repeating it (course
sequence mds -> pds -> sds). The Wikipedia entry goes with the
definition, since nothing else here cites it.

Part of Morrison-Lab/mds#814.

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


The PR is ordered correctly: it depends on mds#815, and the mds site doesn't yet carry the anchors, which the PR description says up front.

Review of PR #619 (commit 151e8a7d0ec51f7e1ddddd7628bd5b8e2e4ff69f)

The PR moves the harmonic-mean definition and example to mds and replaces the five in-page references with absolute links to the mds vectors page.

Findings

Blocking until mds#815 is published: the link targets don't exist yet

  • Affected files:
    • _subfiles/classification/_exr-pos-agreement-harmonic.qmd:5
    • _subfiles/classification/_exr-neg-agreement-harmonic.qmd:5
    • _subfiles/classification/_thm-pos-agreement-harmonic.qmd:6
    • _subfiles/classification/_thm-neg-agreement-harmonic.qmd:6
    • _subfiles/classification/_exm-pos-agreement-harmonic.qmd:33
  • I fetched the live mds site. linear-algebra-vectors.html returns 200, but it has no #def-harmonic-mean or #exm-harmonic-mean. The word "harmonic" does not appear on the page.
  • No page in the mds sitemap defines def-harmonic-mean.
  • Until mds#815 is merged and the site is republished, these five links land at the top of the page and the lychee link check may fail on the missing fragments.
  • This matches the dependency the PR description already states. Hold the merge until that is done.

Suggestion: $H(\cdot,\cdot)$ is now used without a definition on this page

  • The PR description says the theorems and solutions still write H(x, y), and its symbol is now defined only on the mds page.
  • The links on the words "harmonic mean" cover this. Check that the first use of H in the theorem and solution divs sits close to such a link, so the reader can find the notation.

Not a finding: other changes check out

  • No remaining references to def-harmonic-mean, exm-harmonic-mean or wikipedia_harmonic_mean exist in the repo apart from the new mds links, so no cross-reference is left dangling.
  • The classification.qmd comment about the slide break is updated to match the new structure.
  • Removing the bibliography entry is safe because nothing else cites it.
  • The PR adds no new math, so I skipped the macro check.

Verdict

Needs more work — the mds anchors the links point to are not yet published. Once mds#815 is merged and republished, the change should be ready.

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "151e8a7d0ec51f7e1ddddd7628bd5b8e2e4ff69f",
  "verdict": "NOT_CLEAN",
  "findings": [
    {
      "file": "_subfiles/classification/_thm-pos-agreement-harmonic.qmd",
      "line": 6,
      "category": "doc",
      "message": "Links to mds linear-algebra-vectors.html#def-harmonic-mean, but the live mds site does not define that anchor yet. The same applies to the links in _exr-pos-agreement-harmonic.qmd:5, _exr-neg-agreement-harmonic.qmd:5, _thm-neg-agreement-harmonic.qmd:6 and the #exm-harmonic-mean link in _exm-pos-agreement-harmonic.qmd:33. Merge only after mds#815 is published."
    }
  ],
  "detailed_assessment": "The five rewritten links target the def-harmonic-mean and exm-harmonic-mean anchors on the mds vectors page. I fetched the live page and the whole mds sitemap, and neither contains those ids, so the links resolve only to the top of the page until mds#815 is published. No dangling local references remain.",
  "holistic_assessment": "The scope is tight and follows the course sequence, and the bibliography and slide-structure cleanups are consistent. The merge depends on the mds republish stated in the PR description, and the notation H now lives only on the external page, so the change is not ready until that dependency lands."
}
@claude address review comments in [this review](https://github.com/Morrison-Lab/sds/pull/619)

Reviewed commit: 151e8a7

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2513 (review) — run

Copy link
Copy Markdown
Contributor Author

Annotation dispositions for head 151e8a7:

  • check / check-exm-figures: "Example #exm-pos-agreement-harmonic has no figure." Deferred, out of scope. The example had no figure on main either. This PR changes only one line in it, which repoints @exm-harmonic-mean to the mds example. Adding a figure is new content, and the project's scope rule puts it in a separate PR, not in this move.

The Claude review's NOT_CLEAN verdict on this head is the dependency the IMPORTANT alert already states: the mds anchors appear only after Morrison-Lab/mds#815 is merged and the mds site is republished. I'll ask for a fresh review once they are live.


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


Generated by Claude Code

@github-actions

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

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

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.

Move the harmonic mean definition from sds to mds

2 participants