Skip to content

docs: link docs/modding.md from the documentation index - #5315

Open
evilclanker9000 wants to merge 1 commit into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/1-docs-index-modding
Open

evilclanker9000 wants to merge 1 commit into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/1-docs-index-modding

Conversation

@evilclanker9000

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: EGEN-DOCS-INDEX-MODDING

What and why

docs/modding.md is on main but docs/README.md never links it, so a reader who starts at the index cannot find
the page at all (it is the only one of the 60 pages in that state). This adds its row to the "Runtime, GPU and
validation" section: the mods/<folder>/mod.json loader and its checks, the mods folder or --mods DIR, the
model names and joaat hashes a mod resolves, and the archetype-lookup hook that still needs the executable's
address (RT-5).

tests/test_docs_index.py checks that every docs/*.md page is linked from the index (compared by file name, so
the i18n/README.md link counts for that page), with a synthetic control that an unlinked page is reported and an
anchor link (modding.md#mods) still counts.

Tested

Documentation and one test; no GPU needed. Python 3.12.10 on Windows 11.

Before (index as on main 3faac557b, test as in this PR):

python -I tests/test_docs_index.py
AssertionError: [] != ['modding.md'] : pages under docs/ that docs/README.md does not link: modding.md
FAILED (failures=1)

After:

python -I tests/test_docs_index.py -v                            → Ran 2 tests, OK
python -I tests/test_docs_links.py                               → Ran 6 tests, OK
python -I tests/test_docs_table_rows.py                          → Ran 2 tests, OK

Notes

  • The row says what the page says today (the loader works; the swap waits for the executable), so the index does
    not advertise a feature the page marks as blocked.
  • A page that is deliberately unlisted would now fail the test; none is (this is the only missing one), and the
    rule is easy to relax with an allow-list should the maintainer want one.

AI-assisted.

The page exists on main and the index never names it. Adds the row and tests/test_docs_index.py, which fails when a docs/*.md page is not linked from docs/README.md.
@sovljanskii

Copy link
Copy Markdown
Contributor

Reviewed f210d8a3 merged onto main 3faac557 (clean) on macOS, Apple M4, Python 3.15.2 and 3.12.16: pass.

  • tests/test_docs_index.py: 2 OK on both versions. On main's index it reports exactly modding.md out of 60 pages, as the description says. No link in the index points at a missing file.
  • Mutation: with the new row removed, test_every_page_is_linked fails.
  • The row matches docs/modding.md: the mods/<folder>/mod.json loader (line 4), --mods DIR (13), names or joaat hashes (7, 52), and the hook that still needs the executable's address (RT-5, line 5).

Merge-order note, not a change here: CI runs every tests/test_*.py, so once this lands, an open PR that adds a docs/*.md page without an index row fails it on its next merge with main. Over the open PRs: #4763 (viewer_catalog.md, viewer_parts_index.md), #5051 (animation-viewer.md), and #5089, #5141, #5238 (ped_catalogues.md). The new-page PRs that already add a row (the lanterns.md set, #4815, #4906) are fine.

Nit: tests/test_docs_index.py:20 compares by file name, so a link to i18n/<name>.md would also count for docs/<name>.md. That's harmless today.

AI-assisted.

@Kam471 Kam471 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.

Head f210d8a.

Commands: python -I tests/test_docs_index.py -v -> 2 tests OK; python -I tests/test_docs_links.py -> 6 OK; python -I tests/test_docs_table_rows.py -> 2 OK; git diff --check -> 0.

Verdict: tests pass, but this is redundant with open #5308. That PR also adds a docs/modding.md row (under a new ## Mods section) and a top-level index check in tests/test_docs_links.py. If both merge, docs/README.md lists modding.md twice and the two tests enforce the same rule. Recommend landing one of the two, preferably #5308 since it has the dedicated section and an existing-test change.

@tedin7

tedin7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Reviewed f210d8a (CPU, Linux, Python 3.13): no defects found

  • Ran all 11 tests/test_docs_*.py on f210d8a merged onto origin/main 3faac55 (clean, via git merge-tree): all OK. test_docs_index.py: 2 tests, OK.
  • Negative control: the PR's test_docs_index.py against main's README: 1 failure, ['modding.md'] != []. Only modding.md is missing, out of 60 pages.
  • Anchored links are handled (the # part is cut before the file name is taken). I checked that all 60 docs/*.md pages are linked by a plain name.md link, so the name-only comparison hides no page today.
  • The row matches docs/modding.md (mods/<folder>/mod.json, --mods DIR, joaat names, RT-5 hook note).
  • Note, not a defect: the check compares file names only, so a link to i18n/x.md would also count for docs/x.md. Harmless today.
  • Overlap: docs/README.md: index the existing modding.md page #5308 and docs: check the index and add the two pages it misses #4804 make the same change.

No game files.
AI-assisted (Claude Code).

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.

4 participants