feat: complete minute birth-time rectification flow

This commit is contained in:
Jesse_Chen
2026-07-25 01:15:48 +08:00
parent f90aba217f
commit 3ca30ed7de
93 changed files with 8347 additions and 1646 deletions
@@ -1,4 +1,9 @@
from scripts.rectification_three_engine_packet import build_packet, case_hash
from scripts.rectification_three_engine_packet import (
JYOTISHGANIT_DATA_DIR,
_ensure_jyotishganit_data_dir,
build_packet,
case_hash,
)
CASE = {"year": 1990, "month": 1, "day": 1, "hour": 12, "minute": 0, "lat": 0.0, "lon": 0.0, "tz": 0.0}
@@ -28,6 +33,13 @@ def test_case_hash_uses_only_normalized_calculation_input() -> None:
assert case_hash(equivalent) == case_hash({**CASE, "ayanamsa": "lahiri", "node_mode": "mean"})
def test_jyotishganit_uses_project_writable_cache(monkeypatch) -> None:
monkeypatch.delenv("JYOTISHGANIT_DATA_DIR", raising=False)
assert _ensure_jyotishganit_data_dir() == str(JYOTISHGANIT_DATA_DIR)
assert __import__("os").environ["JYOTISHGANIT_DATA_DIR"] == str(JYOTISHGANIT_DATA_DIR)
def test_high_rigor_packet_queues_safe_vedastro_receipt_without_raw(monkeypatch) -> None:
monkeypatch.setattr("scripts.rectification_three_engine_packet._local_d1", lambda _: {"Sun": "Aries"})
monkeypatch.setattr("scripts.rectification_three_engine_packet._pyjhora_d1", lambda _: {"Sun": "Aries"})