Repository navigation
Restructure the docs (Furo) and run the quickstart in the tests - #62
Merged
Merged
Conversation
jgray-19
force-pushed
the
stack/8-docs-overhaul
branch
5 times, most recently
from
November 21, 2026 19:37
1106d57 to
f3990c3
Compare
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
…ments 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
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CoK19MkbNazCEgF2199PBT
… the notebook Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CoK19MkbNazCEgF2199PBT
jgray-19
force-pushed
the
stack/8-docs-overhaul
branch
from
November 21, 2026 19:45
f3990c3 to
4a23e31
Compare
…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
Contributor
There was a problem hiding this comment.
🟡 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
Enable shallow copying when sending the Lua table · New Send the sentinel before waiting for it in the loop · New Reshape the 1-D array before sending it · New Use import_module instead of load to import modules · New Use import_module instead of load to import modules · New Document import_file instead of loadfile for imports · New
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
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…consistency in Lua usage
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.mdis onelinear script that
tests/test_docs.pyruns; running it found two errors in the old quickstart (the low-level example neededrecv("tbl"), andmad.tblwas read before any twiss) and several wrong statements are corrected (Python 3.11 and Linux/macOS,no
stderrargument,_lastslots are held while a reference is alive). CI builds the docs withsphinx -W.