QuantEcon / QuantEcon/QuantEcon.py
DOC: Surface curated module-level descriptions on the tools API pages
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 2.3k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 3
Description
Background
Follow-up from #850. That PR repointed the base-level tools API pages to document the public objects in the quantecon namespace (e.g. quantecon.ARMA) using .. currentmodule:: quantecon plus explicit autoclass / autofunction directives, instead of .. automodule::. This fixed a regression where the pages had started rendering private headings like class quantecon._arma.ARMA(...).
A deliberate side effect: because these pages no longer use automodule, the module-level docstring is no longer rendered on them. Previously automodule would show the module's summary (e.g. "Provides functions for working with and visualizing scalar ARMA processes") at the top of the page. The per-object docstrings still render fully — only the short module-level blurb is gone.
This issue tracks optionally reintroducing a short, user-facing module description at the top of each shim-backed tools page.
Proposed approach
Have docs/qe_apidoc.py read the implementation module's docstring via ast.get_docstring(...) and emit only its leading summary paragraph (up to the first blank line) as prose beneath the page heading, before the currentmodule directive. Taking just the summary paragraph keeps the output user-facing and naturally excludes the multi-line developer TODO: sections that trail a couple of these docstrings. This keeps the pages generated and low-maintenance rather than hand-curated.
Audit of the 21 shim-backed modules
Status of each quantecon/_<name>.py module docstring today:
| Module | Module docstring | Note |
|---|---|---|
| arma | present | has a trailing TODO: dev note (excluded by summary-only extraction) |
| ce_util | present | includes a References section |
| compute_fp | present | |
| discrete_rv | present | |
| dle | present | |
| ecdf | present | |
| estspec | present | |
| filter | present | very terse (function for filtering) — worth improving |
| graph_tools | present | |
| gridtools | present | |
| inequality | present | |
| ivp | present | includes math |
| kalman | present | includes a docs link |
| lae | present | includes math + docs link |
| lqcontrol | present | |
| lqnash | missing | should add a one-line module docstring |
| lss | present | |
| matrix_eqn | present | has trailing TODO: dev notes (excluded by summary-only extraction) |
| quadsums | present | |
| rank_nullspace | missing | should add a one-line module docstring |
| robustlq | present |
Suggested tasks
- Add a leading summary paragraph to each shim-backed tools page, generated from the implementation module's docstring.
- Add short module docstrings to
_lqnash.pyand_rank_nullspace.py(currently none). - Optionally improve the terse
_filter.pysummary. - Regenerate the committed stubs and confirm a warning-clean Sphinx build.
Low priority / nice-to-have — the current pages are already correct and complete at the object level.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docs/qe_apidoc.py and inspect how the 21 shim-backed modules are mapped to the tools API pages. Check _lqnash.py and _rank_nullspace.py for missing module docstrings, then regenerate the committed stubs and run a warning-clean Sphinx build; done means the pages show only each module's leading summary while public object documentation remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100