Module index

This page maps every module in the installed package to its role and the API page that documents its public objects. Facade modules (cc4q, cc4q.pipeline, cc4q.models) are intentionally thin: their attributes are lazy aliases, and the implementation lives in submodules.

Module

Role

Documented in

cc4q

Lazy top-level facade (__all__ aliases)

Top-level Python API

cc4q.cli

Typer command-line entry point

Command line

cc4q.pipeline

Lazy pipeline facade

Corpus pipeline

cc4q.pipeline.segment

Lazy segmentation facade

Corpus pipeline

cc4q.pipeline.extract

Stage 01: LibCST extraction

Corpus pipeline

cc4q.pipeline.segment.docstring

Stage 02: Sphinx/reST docstring segmentation

Corpus pipeline

cc4q.pipeline.segment.inline

Stage 02: inline-comment sentence splitting

Corpus pipeline

cc4q.pipeline.segment.block

Stage 02: block-comment segmentation

Corpus pipeline

cc4q.pipeline.segment_pairs

Stage 03: SCCU assembly and JSON I/O

Corpus pipeline

cc4q.pipeline.clean

Code-context cleaning policies

Corpus pipeline

cc4q.pipeline.config

YAML config loading

Corpus pipeline

cc4q.pipeline.download

Repository cloning

Corpus pipeline

cc4q.pipeline.files

Python-file discovery

Corpus pipeline

cc4q.pipeline.ids

Record id generation

Corpus pipeline

cc4q.pipeline.metrics

Comment-density and quantum-residence metrics

Corpus pipeline

cc4q.pipeline.paths

Repository-root/path helpers

Corpus pipeline

cc4q.pipeline.types

CommentRecord

Corpus pipeline

cc4q.pipeline.visitor

Low-level LibCST visitor

Corpus pipeline

cc4q.models

Model-layer re-export facade

Model hub

cc4q.models.hub

Checkpoints, device resolution, classifier loading

Model hub

cc4q.predict

Snippet/corpus inference and fallback

Inference

cc4q.train

Fine-tuning and schema normalization

Training and evaluation

cc4q.evaluate

Agreement, kappa, precision/recall, Wilson CI

Training and evaluation

cc4q.sample

Random/stratified/quota sampling

Sampling and annotation

cc4q.annotate

Session preparation and Streamlit launch

Sampling and annotation

cc4q.annotate.ui

Reusable annotation renderer (also embedded in the Workbench)

Sampling and annotation

cc4q.annotate.app

Streamlit entrypoint; no importable public API

Sampling and annotation

cc4q.workspace

Asset/workspace persistence

Workspace and model registry

cc4q.registry

User model package registry

Workspace and model registry

cc4q.web

Static/data directory constants for the Workbench

Web Workbench HTTP API

cc4q.web.server

Starlette app, routes, and Uvicorn launcher

Web Workbench HTTP API

Facades and implementation details

  • cc4q.pipeline and cc4q use module-level __getattr__ to import heavy dependencies only when a name is first touched. Their __all__ lists the supported aliases.

  • cc4q.models re-exports the model-hub API for a shorter import path; new code can import from cc4q.models.hub directly.

  • Route handlers in cc4q.web.server and helpers prefixed with _ are implementation details. The HTTP surface is the endpoint table in Web Workbench HTTP API; the Python-callable surface is run_server, app, and routes.

  • cc4q.annotate.app executes on import (it is launched by streamlit run), so it is deliberately not documented as a library module.

API coverage

docs/check_api_coverage.py imports every public module, reads its __all__, and verifies that each name appears as an autofunction, autoclass, or autodata entry in this documentation tree. The docs CI workflow runs it before sphinx-build -W. When adding a public function, add its docstring and its directive on the matching API page; the checker fails otherwise.