Skip to content

docs: replace fabricated API stubs with real autodoc (D11) - #24

Merged
nceglia merged 2 commits into
mainfrom
docs/d11-real-autodoc
Jun 5, 2026
Merged

docs: replace fabricated API stubs with real autodoc (D11)#24
nceglia merged 2 commits into
mainfrom
docs/d11-real-autodoc

Conversation

@nceglia

@nceglia nceglia commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • The five docs/api/*.md pages were hand-written code blocks with pass bodies documenting an API that doesn't existglobal_joint_distribution, get_clones, get_phenotypes, normalize_distribution, TCRIModel.save/load, n_latent=10, fabricated signatures. Wrong docs are worse than none.
  • Replaced all five (model, metrics, preprocessing, plotting, utils) with MyST eval-rst autodoc directives bound to the canonical modules, so the reference is generated from live code.
  • automodule documents only members defined in each module, which neatly resolves the from .._X import * namespace pollution: numpy/pandas and 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 = False for clean signatures (joint_distribution(...), not tcri.preprocessing._preprocessing.joint_distribution(...)).
  • autosummary_generate = True.
  • Dropped the display_version theme option (unsupported in current sphinx_rtd_theme).

Also

  • Fixed the ridge_delta_entropy docstring (ASCII diagram → RST literal block) so the build is warning-free.

Verification

  • python -m sphinx -b html docs <out>build succeeded, 0 warnings.
  • Confirmed the real API renders (joint_distribution_posterior, save_tcri_session, real TCRIModel with n_latent=128) and the fabricated names (global_joint_distribution, get_clones) are gone from the output.

Notes / follow-ups

Closes Notion D11.

🤖 Generated with Claude Code

nceglia and others added 2 commits June 2, 2026 01:26
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
nceglia marked this pull request as ready for review June 5, 2026 19:23
@nceglia
nceglia merged commit 4bdf6b7 into main Jun 5, 2026
2 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