Skip to content

Docs: one layer, one table on the API overview - #111

Merged
mmacy merged 1 commit into
mainfrom
docs/api-overview
Sep 14, 2026
Merged

Docs: one layer, one table on the API overview#111
mmacy merged 1 commit into
mainfrom
docs/api-overview

Conversation

@mmacy

@mmacy mmacy commented Sep 14, 2026

Copy link
Copy Markdown
Owner

The API overview page rendered every module twice: the package docstring listed them under three layers, then gen_api_reference.py appended its own three headed lists of the same modules.

What changed:

  • src/osrlib/__init__.py: each layer is now a heading, a short paragraph on what the layer is for, and a table of its modules in the order a reader meets them. Module links use the [name][] autorefs form so every row fits the 120-character source limit.
  • tools/docs/gen_api_reference.py: the overview page renders the package docstring alone, at heading level 1 so the layer headings land in the page's table of contents as top-level sections.
  • tests/test_docs_gates.py: a new gate fails when an exporting module is missing from the tables, or a table names a module that no longer exports anything.

Checked with ruff format --check, ruff check, pyright src, the full pytest run, and mkdocs build --strict.

https://claude.ai/code/session_01GL26QnA6dCrvUc3WmhzFSa

The API overview rendered every module twice: once in the package docstring's three layer lists, then again in the lists the page generator appended under the same three headings. The generator now renders the package docstring alone, and the docstring gives each layer a heading, a short paragraph on what the layer is for, and a table of its modules in the order a reader meets them.

A new docs gate fails when an exporting module is missing from those tables, so the overview cannot drift from the import surface.

Claude-Session: https://claude.ai/code/session_01GL26QnA6dCrvUc3WmhzFSa
@mmacy
mmacy merged commit 7a0a3a5 into main Sep 14, 2026
5 checks passed
@mmacy
mmacy deleted the docs/api-overview branch September 14, 2026 12:34
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.

1 participant