Skip to content

Docs overhaul: contract docstrings + rebuilt quickstart/tutorials/troubleshooting - #2

Merged
zolizoli merged 1 commit into
mainfrom
docs-overhaul
Jun 29, 2026
Merged

Docs overhaul: contract docstrings + rebuilt quickstart/tutorials/troubleshooting#2
zolizoli merged 1 commit into
mainfrom
docs-overhaul

Conversation

@zolizoli

Copy link
Copy Markdown
Member

Summary

Phase 1 of the docs/design/test hardening pass — documentation only. The biggest single win is a package-wide rendering fix; the rest rebuilds the readthedocs prose so it actually runs.

Render fix (the root cause behind the "thin/broken docs")

Every Google-style example used the singular Example: keyword. griffe only treats the plural Examples: as a code section, so all examples rendered as ugly nested blockquotes, and mkdocs-autorefs misread bracketed doctest subscripts (g["cat"]["sat"]) as cross-reference links — the three warnings that blocked strict mode. Renaming to Examples: makes them render as highlighted code blocks and clears strict mode.

Docs

  • Strict mode on (strict: true) + markdown_extensions (admonitions, pymdownx highlight/superfences/snippets).
  • Quickstart rewritten as a runnable end-to-end walkthrough (verified by pasting into a fresh venv).
  • New tutorial — word-association graphs + concept-to-concept pathfinding via networkx (a kenon graph is an nx.Graph, so no new public API). Includes a conceptual note on comparing against human norms (Nelson / SWOW), deferred to CHANGES_SUMMARY.md.
  • New troubleshooting page built from the real failure modes (missing spaCy model, Python.h/Cython headers, pickle safety, stopword ValueErrors, empty graphs, NodeNotFound).
  • Example pages converted from link-stubs to embedded source (via snippets) + real captured output.
  • Completed the API reference — added the missing get_stopwords page.
  • Promoted the load_graph pickle-safety caveat to a prominent Warning admonition.
  • gitignore the mkdocs site/ build output.

Source changes

Docstring-only: Example:Examples: across all modules, plus the load_graph warning. No behaviour changes.

Verification

  • make ci green (format + lint + typecheck + 118 tests pass, 94% coverage).
  • mkdocs build --strict warning-free.
  • Quickstart and tutorial code executed in the venv before committing.

Notes

  • uv.lock has a pre-existing 0.1.0→0.1.1 drift unrelated to this PR; intentionally left untouched.
  • Do not merge — this is part of a review queue (docs / design / tests).

🤖 Generated with Claude Code

…ubleshooting

Render fix (package-wide): Google docstring example sections used the singular
"Example:" keyword, which griffe does not recognise as a code section — every
example rendered as nested blockquotes and tripped mkdocs-autorefs ("Could not
find cross-reference target") on bracketed subscripts like g["cat"]["sat"].
Renaming to "Examples:" makes them render as highlighted code blocks and clears
all three strict-mode warnings.

Docs:
- Enable mkdocs strict mode; add markdown_extensions (admonition, pymdownx
  highlight/superfences/snippets) for a richer site and to embed example scripts.
- Rewrite quickstart as a runnable, end-to-end walkthrough (verified in a venv).
- New tutorial: word-association graphs + concept-to-concept pathfinding via
  networkx (no new public API), with a conceptual note on human-norm comparison.
- New troubleshooting page from the real failure modes (spaCy model, Python.h /
  Cython headers, pickle safety, stopword ValueErrors, empty graphs, NodeNotFound).
- Convert example pages from link stubs to embedded source (snippets) + real output.
- Add missing API page for get_stopwords; complete the reference.
- Promote the load_graph pickle-safety caveat to a prominent Warning admonition.
- gitignore the mkdocs site/ build output.

make ci green; mkdocs build --strict warning-free.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zolizoli
zolizoli merged commit 85d5202 into main Jun 29, 2026
4 checks passed
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