mostlyright.weather.earnings.ledger
mostlyright.weather.earnings.ledger
Section titled “mostlyright.weather.earnings.ledger”Append-only transcript + fact parquet ledger (Phase 27, 27-04).
Two append-only parquet ledgers, one per canonical schema:
TranscriptLedger — schema.earnings_transcript.v1 segment rows.
FactLedger — schema.earnings_fact.v1 counted-mention rows.
Audio is NEVER written (D-27.9). The on-disk parquet schema is derived
STRICTLY from the canonical schema’s COLUMNS — text + derived-fact columns
only. There is NO audio bytes / audio-path column, and a caller-supplied audio
key is DROPPED (never persisted), asserted structurally in the test suite. The
audio is a transient ingest artifact; only the transcript text and the derived
facts cross into the ledger.
Path layout (honors MOSTLYRIGHT_CACHE_DIR):
<cache-root>/earnings/transcripts/<TICKER>/<CALL_ID>.parquet<cache-root>/earnings/facts/<TICKER>/<CALL_ID>.parquetAppend semantics: a filelock-guarded read-modify-write merge (mirrors the
CWOP / satellite cache tiers) — an append concatenates onto any rows already
persisted for (ticker, call_id) and rewrites the partition atomically via
.tmp + os.replace. This is deliberately a standalone island: it does NOT
import the parity-coupled weather/cache.py (the earnings ledger has no
current-month-skip / LST semantics and must never touch the parity firewall).
Classes
Section titled “Classes”FactLedger([root]) | Append-only schema.earnings_fact.v1 counted-mention ledger (no audio). |
|---|---|
TranscriptLedger([root]) | Append-only schema.earnings_transcript.v1 segment ledger (no audio). |
class mostlyright.weather.earnings.ledger.FactLedger(root=None)
Section titled “class mostlyright.weather.earnings.ledger.FactLedger(root=None)”Bases: _ParquetLedger
Append-only schema.earnings_fact.v1 counted-mention ledger (no audio).
- Parameters: root (Path | str | None)
class mostlyright.weather.earnings.ledger.TranscriptLedger(root=None)
Section titled “class mostlyright.weather.earnings.ledger.TranscriptLedger(root=None)”Bases: _ParquetLedger
Append-only schema.earnings_transcript.v1 segment ledger (no audio).
- Parameters: root (Path | str | None)