fix(special-lagnas): compute eight birth points without PyJHora
Independent Staging Quality Gate / validate (push) Successful in 19m4s
Independent Staging Quality Gate / publish (push) Successful in 3m51s

Production images do not install PyJHora, so those eight points were blocked.
Swiss Ephemeris now computes them in-process. Rectification keeps the old
Hora and Ghati formulas.

BUG-1273.
This commit is contained in:
jesse-ux
2026-10-08 15:01:44 +08:00
parent fe833b3576
commit 795b8845c7
16 changed files with 1270 additions and 245 deletions
+6 -9
View File
@@ -27,7 +27,6 @@ ROOT = Path(__file__).resolve().parents[1]
JYOTISHGANIT_ROOT = ROOT / "references" / "open_source_sources" / "jyotishganit"
JYOTISHGANIT_DATA_DIR = ROOT / ".cache" / "jyotishganit"
PLANETS = ("Sun", "Moon", "Mars", "Mercury", "Jupiter", "Venus", "Saturn")
SIGNS = ("Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces")
def canonical_case_input(case: dict[str, Any]) -> dict[str, Any]:
@@ -46,14 +45,12 @@ def _local_d1(case: dict[str, Any]) -> dict[str, str]:
def _pyjhora_d1(case: dict[str, Any]) -> dict[str, str]:
utils = importlib.import_module("jhora.utils")
charts = importlib.import_module("jhora.horoscope.chart.charts")
drik = importlib.import_module("jhora.panchanga.drik")
jd = utils.julian_day_number((case["year"], case["month"], case["day"]), (case["hour"], case["minute"], case.get("second", 0)))
drik.set_ayanamsa_mode("LAHIRI", jd=jd)
place = drik.Place("request-level", case["lat"], case["lon"], case["tz"])
index_to_planet = {0: "Sun", 1: "Moon", 2: "Mars", 3: "Mercury", 4: "Jupiter", 5: "Venus", 6: "Saturn"}
return {index_to_planet[body]: SIGNS[int(position[0])] for body, position in charts.rasi_chart(jd, place) if body in index_to_planet}
"""PyJHora D1 signs. The jhora import stays in the reference module."""
try:
reference = importlib.import_module("pyjhora_rectification_d1_reference")
except ModuleNotFoundError:
reference = importlib.import_module("scripts.pyjhora_rectification_d1_reference")
return reference.pyjhora_d1(case)
def _ensure_jyotishganit_data_dir() -> str: