Examples and API contract¶
The supported public API is defined by the __all__ lists of pygwrx.models, pygwrx.core, pygwrx.diagnostics, pygwrx.plotting, and pygwrx.io.
Generators¶
tools/generate_api_docs.py:
- imports the current public namespaces
- generates grouped API pages under
docs/api/ - adds purpose, import path, signature, full Docstring, maintained example, and embedded source
- writes
examples/API_COVERAGE.jsonand.csv
tools/generate_example_docs.py:
- scans the 45 maintained scripts
- extracts their purpose and public imports
- documents required extras, run commands, inspection targets, related guides, and full source
- writes the six category pages under
docs/examples/
examples/validate_coverage.py verifies that every public symbol has a valid mapping and that no stale API entry remains.
python tools/generate_api_docs.py
python tools/generate_example_docs.py
python examples/validate_coverage.py
A new public symbol is incomplete until its Docstring, API group, runnable use, and example mapping all exist. A new example is incomplete until it can be run in isolation and appears in the generated catalog.