Module Map
Use this page when you already know the workflow and need to find the right source files, tests, and docs quickly.
Workflow to code map
| Workflow | Preferred public entrypoints | Core implementation files | Contract / validation seam | Main tests | Example / demo |
|---|---|---|---|---|---|
| Vintage Curves | cranalytics.vintage, top-level vintage re-exports |
src/cranalytics/vintage.py, src/cranalytics/vintage_fitting.py, src/cranalytics/vintage_smoothing.py, src/cranalytics/vintage_validation.py, src/cranalytics/vintage_transforms.py, src/cranalytics/vintage_session.py, src/cranalytics/vintage_wide.py |
src/cranalytics/vintage_contract.py, shared rules in src/cranalytics/validation.py |
tests/test_curve_fitter.py, tests/test_smoothing.py, tests/test_vintage_contract.py, tests/test_vintage_session.py, tests/test_vintage_* |
src/cranalytics/examples/core_vintage.py |
| Lifetime Loss Forecasting | cranalytics.loss_forecasting, top-level loss re-exports |
src/cranalytics/loss_forecasting.py, src/cranalytics/simulation.py, src/cranalytics/portfolio.py |
shared rules in src/cranalytics/validation.py |
tests/test_loss_forecasting_horizon.py, tests/test_simulation.py, tests/test_portfolio_and_validation.py |
src/cranalytics/examples/core_lifetime_loss.py |
| Loan History | cranalytics.loan_history, cranalytics.loan_history_contract |
src/cranalytics/loan_history.py, src/cranalytics/loan_history_contract.py |
src/cranalytics/loan_history_contract.py, shared rules in src/cranalytics/validation.py |
tests/test_loan_history.py, tests/test_predictive_targets.py |
n/a |
| Loan Snapshot | cranalytics.loan_snapshot, cranalytics.loan_snapshot_contract |
src/cranalytics/loan_snapshot.py, src/cranalytics/loan_snapshot_contract.py |
src/cranalytics/loan_snapshot_contract.py, shared rules in src/cranalytics/validation.py |
tests/test_loan_snapshot.py |
n/a |
| Transition Estimation | cranalytics.transition |
src/cranalytics/transition/estimator.py |
canonical history via src/cranalytics/loan_history_contract.py or direct caller-managed history shape |
tests/test_transition_estimator.py, tests/test_loan_history.py |
n/a |
| FICO Segmentation | cranalytics.portfolio, top-level portfolio re-exports |
src/cranalytics/portfolio.py, src/cranalytics/metrics.py |
shared rules in src/cranalytics/validation.py |
tests/test_portfolio_and_validation.py, tests/test_metrics_* |
src/cranalytics/examples/core_segmentation.py |
| Feature Analytics | top-level feature-analytics re-exports | src/cranalytics/early_performance.py, src/cranalytics/model_development.py, src/cranalytics/score_monitoring.py |
src/cranalytics/predictive_contract.py, shared rules in src/cranalytics/validation.py |
tests/test_early_performance.py, tests/test_model_development.py, tests/test_score_monitoring.py |
src/cranalytics/examples/core_feature_analytics.py |
| ML Modeling | top-level predictive re-exports | src/cranalytics/predictive_targets.py, src/cranalytics/predictive_modeling.py, src/cranalytics/predictive_backtest.py, src/cranalytics/predictive_session.py, src/cranalytics/forecasting_bridge.py |
src/cranalytics/predictive_contract.py, shared rules in src/cranalytics/validation.py |
tests/test_predictive_*, tests/test_forecasting_bridge.py, tests/test_onboarding_consistency.py |
src/cranalytics/examples/core_ml_modeling.py |
| Rollforward Workflow | cranalytics.rollforward_workflow, cranalytics.rollforward_readiness, top-level rollforward re-exports |
src/cranalytics/rollforward_workflow.py, src/cranalytics/rollforward_readiness.py, src/cranalytics/rollforward_backtest.py, src/cranalytics/rollforward_contract.py, plus supporting modules src/cranalytics/rollforward_evaluation.py, src/cranalytics/rollforward_reporting.py, src/cranalytics/survival_flows.py, src/cranalytics/_rollforward_session.py, src/cranalytics/_rollforward_workflow_session.py, src/cranalytics/_rollforward_readiness_session.py, src/cranalytics/_rollforward_splitting.py |
src/cranalytics/rollforward_contract.py, shared rules in src/cranalytics/validation.py |
tests/test_rollforward_contract.py, tests/test_rollforward_readiness.py, tests/test_rollforward_*, tests/test_fpf_workflow.py |
cranalytics rollforward-readiness ..., cranalytics rollforward-workflow ..., src/cranalytics/examples/fpf_workflow.py |
| Survival Analysis | cranalytics.survival |
src/cranalytics/survival.py, src/cranalytics/survival_flows.py |
shared rules in src/cranalytics/validation.py |
tests/test_survival_* |
src/cranalytics/examples/core_survival.py |
| CLI / Onboarding | cranalytics.cli, cranalytics.quickstart, cranalytics.onboarding |
src/cranalytics/cli.py, src/cranalytics/quickstart.py, src/cranalytics/onboarding.py |
command-specific checks stay local; shared invariants live in contract modules | tests/test_cli.py, tests/test_quickstart.py, tests/test_onboarding.py, tests/test_onboarding_consistency.py |
cranalytics quickstart, cranalytics demo --list |
| Governance / Metadata | internal-only governance helpers | src/cranalytics/governance_models.py |
non-DataFrame metadata only; does not replace Pandera or workflow contract seams | tests/test_governance_models.py |
n/a |
| Skills Packaging | cranalytics install-skills |
src/cranalytics/cli.py, src/cranalytics/skills/ |
package-data rules in CLI and resource loading | tests/test_cli.py and scripts/ci/validate_skills.py |
cranalytics install-skills --dry-run |
Naming conventions
*_workflow.py: high-level orchestration boundary for a business workflow*_contract.py: reusable input and shape validation for a workflow seam*_session.py: orchestration helpers that coordinate a multi-step path; some are public workflow boundaries with typed result objects*_report*.py: summary tables, narrative outputs, or artifact rendering- underscore-prefixed modules: internal helpers; edit only when the public seam is insufficient
vintage.py,viz.py: facade modules that re-export the preferred workflow surface
Fast edit paths
- If the bug is about accepted columns, aliases, or shape rules, start with the relevant
*_contract.pyfile and thenvalidation.py. - If the bug is about a top-level function imported from
cranalytics, trace it throughsrc/cranalytics/__init__.pyto the workflow module rather than editing__init__.pyfirst. - If the issue is CLI wording, onboarding order, or demo discoverability, start with
cli.py,quickstart.py, and the docs indocs/index.md,docs/getting_started.md,docs/choose_your_path.md, anddocs/reference/cli_reference.md. - If the change affects a workflow end-to-end, prefer the workflow boundary tests first, then the narrower unit tests listed above.
Canonical companion docs
- Workflow Map: command and input/output routing for end users
- Public API Map: which imports are intended as stable entrypoints
- Validation Ownership: where reusable validation logic belongs
- Input Data Contracts: required columns, accepted values, and alias rules