docs: replace fabricated API stubs with real autodoc (D11) - #24
Merged
Conversation
The docs/api/*.md pages were hand-written code blocks with `pass` bodies documenting an API that does not exist (global_joint_distribution, get_clones, get_phenotypes, normalize_distribution, TCRIModel.save/load, n_latent=10, fabricated signatures). Wrong docs are worse than none. Replace all five (model, metrics, preprocessing, plotting, utils) with MyST eval-rst autodoc directives bound to the canonical modules, so the API reference is generated from live code. automodule documents only members defined in each module, which also resolves the star-import namespace pollution: numpy/pandas and cross-module re-exports are skipped, so each function is documented once under its home page. conf.py: add autodoc_default_options (members/undoc-members/show-inheritance), add_module_names = False for clean signatures, autosummary_generate = True; drop the display_version theme option (unsupported in current sphinx_rtd_theme). Also fix the ridge_delta_entropy docstring (ASCII diagram -> RST literal block) so the build is warning-free. Builds clean: python -m sphinx -b html docs <out> -> build succeeded, 0 warnings. Verified the real API renders (joint_distribution_posterior, save_tcri_session, TCRIModel n_latent=128) and the fabricated names are gone. Closes Notion D11. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nceglia
marked this pull request as ready for review
June 5, 2026 19:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/api/*.mdpages were hand-written code blocks withpassbodies documenting an API that doesn't exist —global_joint_distribution,get_clones,get_phenotypes,normalize_distribution,TCRIModel.save/load,n_latent=10, fabricated signatures. Wrong docs are worse than none.eval-rstautodoc directives bound to the canonical modules, so the reference is generated from live code.automoduledocuments only members defined in each module, which neatly resolves thefrom .._X import *namespace pollution:numpy/pandasand cross-module re-exports are skipped, so each function appears once on its home page.conf.py
autodoc_default_options(members / undoc-members / show-inheritance) so the reference is complete now, before D1 docstrings land.add_module_names = Falsefor clean signatures (joint_distribution(...), nottcri.preprocessing._preprocessing.joint_distribution(...)).autosummary_generate = True.display_versiontheme option (unsupported in currentsphinx_rtd_theme).Also
ridge_delta_entropydocstring (ASCII diagram → RST literal block) so the build is warning-free.Verification
python -m sphinx -b html docs <out>→ build succeeded, 0 warnings.joint_distribution_posterior,save_tcri_session, realTCRIModelwithn_latent=128) and the fabricated names (global_joint_distribution,get_clones) are gone from the output.Notes / follow-ups
:undoc-members:currently surfaces functions without descriptions.*_tlaliases; trimming that is API cleanup (chore: remove committed junk files (#26) #16/build: migrate setup.py → pyproject.toml (PEP 621) (#21) #17), and these pages will track it automatically.sphinx>=4.0.0(D6 territory) — not touched here.Closes Notion D11.
🤖 Generated with Claude Code