(df: pl.DataFrame)
| 14 | |
| 15 | |
| 16 | def _digest_frame(df: pl.DataFrame) -> str: |
| 17 | normalized = df.with_columns(pl.col("ts").dt.strftime("%Y-%m-%d %H:%M:%S")) |
| 18 | payload = json.dumps(normalized.to_dict(as_series=False), sort_keys=True, separators=(",", ":")) |
| 19 | return hashlib.sha256(payload.encode("utf-8")).hexdigest() |
| 20 | |
| 21 | |
| 22 | def test_load_ohlcv_enforces_canonical_schema_and_determinism(): |
no outgoing calls
no test coverage detected