BUG-710: call getSevenGovernorsChart with ketuMode/siderealMode so calculation.ketu_mode is the engine school, not the request echo. BUG-711: stop forbidding /ephemeris in the sidebar contract. BUG-712: compare ephemeris event longitudes at 6 decimals and fail closed when the golden is missing.
32 lines
881 B
Python
32 lines
881 B
Python
"""Rebuild tests/golden/ephemeris_events_raman_20260915_90d.json from a live scan.
|
|
|
|
The test suite will not write this file. Run this script only when the
|
|
event list (kind / date / body / signs) has genuinely changed.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
from pathlib import Path
|
|
|
|
from scripts.ephemeris_events import build_ephemeris_events
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
GOLDEN = ROOT / "tests" / "golden" / "ephemeris_events_raman_20260915_90d.json"
|
|
WINDOW = {
|
|
"start_date": "2026-09-15",
|
|
"end_date": "2026-12-14",
|
|
"ayanamsa": "raman",
|
|
"node_mode": "mean",
|
|
}
|
|
|
|
|
|
def main() -> None:
|
|
result = build_ephemeris_events(WINDOW)
|
|
GOLDEN.write_text(json.dumps(result["events"], ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
|
print(f"wrote {GOLDEN} ({len(result['events'])} events)")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|