Skip to content

Record the plotly-in-Python rule for 3D figures - #500

Merged
d-morrison merged 1 commit into
mainfrom
claude/project-thread-knb6b2
Nov 6, 2026
Merged

d-morrison merged 1 commit into
mainfrom
claude/project-thread-knb6b2

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Requested by Ezra · project thread

Closes #496.

Adds one bullet to the 3D-graphs list in /home/user/psw/chapters/slides-posters-figures.qmd:

  • A Python tab draws the interactive 3D plot with plotly, as the R tab does, and keeps the matplotlib version for PDF and Word only.
  • Build details from the pilot (Pilot plotly for the Python second-order-condition 3D figure mds#660, merged; Ezra approved the rendered figure): one raw HTML print under results: asis, ; after figure-returning calls, and plotly in py_require.

Checks: quarto render chapters/slides-posters-figures.qmd --to html exits 0 with no warnings, and the rendered page shows the code fence intact.


Generated by Claude Code

Closes #496.

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

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Claude finished review — View run


Confirmed — this is the complete diff, a single-file, 15-line prose addition.

Review: PR #500 — "Record the plotly-in-Python rule for 3D figures"

Scope. Single file, chapters/slides-posters-figures.qmd, adding one bullet (with a nested code example) to the 3D-graphs list. Closes psw#496, which was gated on the pilot PR Morrison-Lab/mds#660 — I confirmed both are real, and mds#660 is merged with a description matching the build details claimed here (raw-HTML print under results: asis, trailing ; on figure-returning calls, plotly added to py_require). Nothing here is fabricated.

Correctness/API check. reticulate::py_require() is a real, current reticulate API (added in reticulate 1.41, confirmed via Posit's blog and the CRAN reference docs) — not a hallucination. The nested fence (4-backtick outer fence wrapping a Python string literal containing a 3-backtick sequence) is valid CommonMark/Pandoc and matches the established repo convention of plain illustrative ```lang fences used elsewhere (e.g. chapters/citations-evidence.qmd).

CLAUDE.md / style compliance.

  • Semantic line breaks: compliant — every sentence starts on its own source line, split at clause boundaries.
  • Code-reference convention: reticulate::py_require is correctly backticked as a pkg::fn() reference, while bare reticulate (naming the tool as sentence subject) is left unbacktick, matching the existing style in chapters/teaching.qmd:602.
  • Spell check: no WORDLIST update was made, but every new technical term (matplotlib, knitr, ipython, reticulate::py_require, asis) is inside a code span or the fenced code block, which the r-spellcheck-action/spelling package skips by default (confirmed matplotlib already appears unbackticked-WORDLIST-free elsewhere in chapters/teaching.qmd:604 the same way). Nothing here is bare prose text needing a WORDLIST entry.
  • Link check: the new https://plotly.com/python/3d-charts/ URL returns 200.
  • Prose pages: checked against conciseness.qmd and grammar/relative-pronouns.qmd — no filler phrases, no restrictive/non-restrictive that/which misuse; defining-terms.qmd doesn't apply since no new glossary term is introduced.
  • LaTeX macros: the latex-macros submodule (Morrison-Lab/macros, the repo's d-morrison/macros equivalent) exists, but this diff adds no math — macro checks don't apply.

Minor, non-blocking note. The new bullet links [plotly](...) for a third time within the "Three-dimensional graphs" section (after the R-docs link two bullets earlier). This mirrors an existing pattern in the same list (R vs. Python doc links serve different purposes), so I don't think it's a real violation of the term-link rule, but if gha's check-term-links flags it on this changed line, the fix per CLAUDE.md is a <!-- check-term-links: allow --> comment, not a second/removed link.

No bugs, no broken syntax, no CLAUDE.md violations found.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "72ca25a",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "No defects found in chapters/slides-posters-figures.qmd; the added bullet, nested Python fence, and reticulate::py_require reference all check out against the pilot PR and reticulate's real API.",
  "holistic_assessment": "The change satisfies its linked issue's requirement, integrates consistently with the surrounding list's formatting and link conventions, and carries negligible regression or scope risk."
}

Reviewed commit: 81e512d

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

💰 Cost: $0.6418 (review) — run

@github-actions

github-actions Bot commented Nov 6, 2026

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

Built to branch gh-pages at 2026-11-06 00:44 UTC.

Copy link
Copy Markdown
Collaborator Author

Annotations reviewed: 81e512d. They are the Ubuntu 26 runner-label notices, Node.js 20 deprecation warnings from actions/checkout@v4, workflow summary-report links and the anonymous-submodule notice, none from this PR's change.

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


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Annotations reviewed: 81e512d. All are platform notices: the ubuntu-latest migration to Ubuntu 26, the Node.js 20 deprecation for actions/checkout@v4, an empty SUBMODULES_TOKEN for anonymous submodule cloning, and links to run summaries. None points at this PR's diff.


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


Generated by Claude Code

@d-morrison
d-morrison merged commit 1dc8e2a into main Nov 6, 2026
34 checks passed
@d-morrison
d-morrison deleted the claude/project-thread-knb6b2 branch November 6, 2026 02:55
d-morrison added a commit to Morrison-Lab/mds that referenced this pull request Nov 6, 2026
* Draw four more Python 3D figures with plotly (batch 2)

Refs #664. Follows #660 and Morrison-Lab/psw#500: plotly for HTML and slides, matplotlib kept as the -static chunk for PDF and Word.

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

* Request plotly in the contour-line figure's own requirements

The figure subfile declares its Python packages, so a page that includes it (algebra.qmd through _algebra.qmd, or an external host) gets plotly without its own py_require. Drops the page-level chunk that is now redundant.

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

---------

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

ai-authored Filed or authored by an AI agent model:claude-sonnet-5-5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record the rule that Python 3D figures use plotly in HTML, with matplotlib for static output

2 participants