Skip to content

Restructure the docs (Furo) and run the quickstart in the tests - #62

Merged
jgray-19 merged 9 commits into
mainfrom
stack/8-docs-overhaul
Nov 21, 2026
Merged

jgray-19 merged 9 commits into
mainfrom
stack/8-docs-overhaul

Conversation

@jgray-19

Copy link
Copy Markdown
Collaborator

The docs move to the Furo theme and are grouped as Start, Concepts, How-to, Examples, Reference and Project. The send/receive rule
is explained once, and references, load/import and Jupyter have their own pages (21 files, 1900 to 1330 lines). quickstart.md is one
linear script that tests/test_docs.py runs; running it found two errors in the old quickstart (the low-level example needed
recv("tbl"), and mad.tbl was read before any twiss) and several wrong statements are corrected (Python 3.11 and Linux/macOS,
no stderr argument, _last slots are held while a reference is alive). CI builds the docs with sphinx -W.

@jgray-19
jgray-19 added this pull request to stack #56 November 21, 2026 17:14
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@jgray-19
jgray-19 force-pushed the stack/8-docs-overhaul branch 5 times, most recently from 1106d57 to f3990c3 Compare November 21, 2026 19:37
Base automatically changed from stack/7-dev-tooling to main November 21, 2026 19:45
jgray-19 and others added 6 commits November 21, 2026 20:45
CI builds the docs on Ubuntu with `sphinx -W`, so a broken cross-reference
or a failing autodoc import fails the pull request. The docs requirements
pin sphinx, furo and myst-parser.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CoK19Q2rE24i2vKvRmCDYW
Pages are grouped as Start, Concepts, How-to, Examples, Reference and
Project. The send/receive rule is explained once (communication.md);
references, load/import and Jupyter have their own pages, and intro.rst,
index.rst and the duplicated sections are removed. The quickstart is one
linear script that tests/test_docs.py runs; running it showed that the old
low-level example needed recv("tbl") and that mad.tbl was read before any
twiss. Wrong statements are corrected: Python 3.11 and Linux/macOS, no
stderr argument, and `_last` slots are held while a reference is alive.

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

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CoK19MkbNazCEgF2199PBT
@jgray-19
jgray-19 force-pushed the stack/8-docs-overhaul branch from f3990c3 to 4a23e31 Compare November 21, 2026 19:45
…e contents, add an AI agent skill

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Active documentation and skill examples contain outdated or invalid MAD-NG APIs and message-handling patterns that can cause runtime errors or blocking, so they must be corrected before approval.

6 open issues
What changed in this PR

This PR restructures the documentation around the Furo theme, replaces the former monolithic guides with focused topic pages, and adds automated validation for the quickstart and documentation build.

Changes:

  • Reorganizes documentation into Start, Concepts, How-to, Examples, Reference, and Project sections.
  • Adds executable quickstart coverage and a CI documentation build with warnings treated as errors.
  • Adds PyMAD-NG guidance and reference material for AI coding agents.
  • Updates documentation dependencies, installation guidance, troubleshooting, and project metadata.
File Description
tests/​test_docs.py Runs the executable Python examples from the quickstart in a temporary workspace.
skills/​pymadng/​SKILL.md Adds practical PyMAD-NG guidance for AI coding agents.
skills/​pymadng/​reference.md Adds a compact PyMAD-NG API and behavior reference for agents.
README.md Updates the quickstart link and introduces the AI-agent skill documentation.
docs/​source/​workflows.md Documents streaming matches, multiprocessing, file export, and NumPy transfer workflows.
docs/​source/​troubleshooting.md Adds troubleshooting guidance for communication, errors, logging, and cleanup.
docs/​source/​references.md Documents MAD-NG references, assignments, temporary variables, and scope.
docs/​source/​quickstartguide.md Removes the superseded quickstart guide.
docs/​source/​quickstart.md Adds a new linear quickstart guide with executable examples.
docs/​source/​load-and-import.md Documents sequence loading, module and file imports, and Lua loading APIs.
docs/​source/​jupyter.md Documents Jupyter output behavior and completion guidance.
docs/​source/​intro.rst Removes the superseded introduction page.
docs/​source/​installation.md Simplifies installation requirements and setup instructions.
docs/​source/​index.rst Removes the former Sphinx root document.
docs/​source/​index.md Adds the new documentation landing page and categorized navigation.
docs/​source/​function_reference.md Removes duplicated material and links to the focused topic pages.
docs/​source/​examples.rst Removes the redundant local contents directive.
docs/​source/​ex-lhc-couplingLocal.rst Updates the temporary-variable reference.
docs/​source/​debugging.md Removes content consolidated into the troubleshooting and communication pages.
docs/​source/​contributing.md Documents warning-as-error builds and quickstart test conventions.
docs/​source/​conf.py Switches the Sphinx HTML theme to Furo.
docs/​source/​communication.md Consolidates communication, data-transfer, and deadlock guidance.
docs/​source/​architecture.md Updates API cross-references and architecture terminology.
docs/​source/​ai-agents.md Documents installation and purpose of the PyMAD-NG AI-agent skill.
docs/​source/​advanced_features.md Removes content redistributed across the focused documentation pages.
docs/​requirements.txt Pins Sphinx, Furo, and MyST Parser documentation dependencies.
cspell.config.yaml Adds vocabulary for the new documentation tooling and terminology.
CHANGELOG.md Records the documentation restructuring and quickstart validation changes.
.github/​workflows/​test-pymadng.yml Adds a CI job that builds the documentation with warnings treated as errors.

Review effort: Lite

Comment thread docs/source/workflows.md Resolved
Comment thread docs/source/workflows.md Resolved
Comment thread docs/source/workflows.md Resolved
Comment thread skills/pymadng/SKILL.md Resolved
Comment thread skills/pymadng/reference.md Resolved
Comment thread skills/pymadng/reference.md Resolved
jgray-19 and others added 2 commits November 21, 2026 21:21
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jgray-19
jgray-19 merged commit 285559f into main Nov 21, 2026
15 of 16 checks passed
jgray-19 added a commit that referenced this pull request Nov 21, 2026
* Use the Furo theme and build the docs with warnings as errors

CI builds the docs on Ubuntu with `sphinx -W`, so a broken cross-reference
or a failing autodoc import fails the pull request. The docs requirements
pin sphinx, furo and myst-parser.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Restructure the docs and run the quickstart in the tests

Pages are grouped as Start, Concepts, How-to, Examples, Reference and
Project. The send/receive rule is explained once (communication.md);
references, load/import and Jupyter have their own pages, and intro.rst,
index.rst and the duplicated sections are removed. The quickstart is one
linear script that tests/test_docs.py runs; running it showed that the old
low-level example needed recv("tbl") and that mad.tbl was read before any
twiss. Wrong statements are corrected: Python 3.11 and Linux/macOS, no
stderr argument, and `_last` slots are held while a reference is alive.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Document load and loadfile as MAD-NG's own functions with quoted arguments

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Document that loadfile needs a filename

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Pin sphinx to 9.0.4 so the docs job installs on Python 3.11

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Correct the ex-jupyter text on where MAD-NG output appears and re-run the notebook

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Fix doc cross-references and the main page, drop the duplicate in-page contents, add an AI agent skill

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Apply batched suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix documentation to replace `mad.load` with `mad.import_module` for consistency in Lua usage

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jgray-19
jgray-19 deleted the stack/8-docs-overhaul branch November 21, 2026 20:43
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