openquant.feature_assembly
Pure Python. Signatures are as written in the source; descriptions are the docstrings. All Python modules.
Project complete, ordered numeric feature rows from selected source bundles.
Clocks are exact builtin int64 UTC Unix nanoseconds, excluding NaT. Values keep builtin numeric types and signed zero; no transforms, imputation or coercion run. Aliases may project the same source field into distinct named columns; this does not imply independence. Each contributing source bundle is retained once.
Every supplied bundle is revalidated, including unused records. Valid unused sources do not change projection. Required sources for requested rows must have exactly the requested decision, even when a required field is missing. Missing inputs exclude rows explicitly; availability is aggregated only for complete rows. Coverage does not establish representativeness. The declared specification cannot prove it includes every real dependency, and provenance is an association guard, not authentication. Mapping keys collapsed upstream cannot be recovered. Normal package imports still initialize the existing native dependencies.
Classes
AssemblyResult
class AssemblyResultAssemblyResult(feature_spec: 'tuple[FeatureSpec, ...]', requested_rows: 'tuple[tuple[str, int], ...]', rows: 'tuple[FeatureRow, ...]', excluded: 'tuple[ExcludedRow, ...]', coverage: 'tuple[FeatureCoverage, ...]')
AssemblyResult.requested_count
requested_count() -> intAssemblyResult.complete_count
complete_count() -> intAssemblyResult.excluded_count
excluded_count() -> intExcludedRow
class ExcludedRowExcludedRow(row_id: 'str', decision_ns: 'int', missing: 'tuple[MissingFeature, ...]')
FeatureCoverage
class FeatureCoverageFeatureCoverage(name: 'str', source_id: 'str', payload_field: 'str', present: 'int', missing_source: 'int', missing_field: 'int')
FeatureRow
class FeatureRowOutput record; assemble_features establishes lineage and clock invariants.
Direct construction is not a validation API. Values use typed equality.
MissingFeature
class MissingFeatureMissingFeature(name: 'str', source_id: 'str', payload_field: 'str', reason: 'str')
Functions
assemble_features
assemble_features(
feature_spec: Iterable[FeatureSpec],
decisions: Mapping[str, int],
selection: Selection,
) -> AssemblyResultReturn complete rows in request order, values in declared feature order.
Empty requests are valid; an empty specification is not. Missing source and field counts are per feature over all requests, including excluded rows. No empty or partial row receives an aggregate availability timestamp.