Remove the V5 scoring pipeline, dynamic rectification, minute-rectification evaluations and the research scripts built on them, plus their API routes. Keep the upstream skill layer (gate, questionnaire, active events), the varga-segments scan and the consult range reading (moved to scripts/birth_window_range_reading.py). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXozbkyFNqbu8pVEtZ7W
108 lines
3.1 KiB
Python
108 lines
3.1 KiB
Python
from __future__ import annotations
|
|
|
|
import random
|
|
import unittest
|
|
from datetime import date, datetime, timedelta
|
|
|
|
from scripts.rectification.candidate_contrast import (
|
|
MIN_DISCRIMINATOR_DOMAINS,
|
|
MIN_DISCRIMINATOR_EVENTS,
|
|
PROBE_PHASE_CANDIDATE_DISCRIMINATOR,
|
|
SIGNATURE_LAYERS,
|
|
discriminator_gate_open,
|
|
distinguish_contract_errors,
|
|
feature_signature,
|
|
select_signature_representatives,
|
|
training_scoreable_stats,
|
|
)
|
|
from scripts.rectification.event_probes import (
|
|
ANSWER_PRIORS,
|
|
REFRESH_MAX_PROBES,
|
|
REFRESH_MAX_PROBES_PER_DOMAIN,
|
|
candidate_contrast_opportunities,
|
|
discriminating_event_probes,
|
|
event_clarification_probes,
|
|
evidence_collection_probes,
|
|
_dominant_existence_prior,
|
|
_partition_ranked_probes,
|
|
_probe_caps,
|
|
)
|
|
from scripts.rectification.refinement_packet import build_refinement_packet, window_scan
|
|
|
|
|
|
PLANETS = {
|
|
"Sun": 12.0,
|
|
"Moon": 100.0,
|
|
"Mars": 40.0,
|
|
"Mercury": 20.0,
|
|
"Jupiter": 80.0,
|
|
"Venus": 50.0,
|
|
"Saturn": 200.0,
|
|
"Rahu": 310.0,
|
|
"Ketu": 130.0,
|
|
}
|
|
|
|
|
|
def _varga(asc: int, planet_sign: int) -> dict:
|
|
return {
|
|
"Ascendant": {"sign_idx": asc},
|
|
**{name: {"sign_idx": planet_sign} for name in PLANETS},
|
|
}
|
|
|
|
|
|
def _context(
|
|
time: str,
|
|
*,
|
|
d4_asc: int,
|
|
d9_asc: int = 1,
|
|
d10_asc: int = 1,
|
|
d12_asc: int = 1,
|
|
d24_asc: int = 1,
|
|
sun_house: int = 10,
|
|
sun_varga_sign: int = 9,
|
|
moon: float = 100.0,
|
|
) -> dict:
|
|
hour, minute = (int(part) for part in time.split(":"))
|
|
planets = {**PLANETS, "Moon": moon}
|
|
natal_planets = {
|
|
name: {"house": sun_house if name != "Moon" else 4, "lon": lon}
|
|
for name, lon in planets.items()
|
|
}
|
|
return {
|
|
"candidate_at": datetime(1997, 8, 8, hour, minute),
|
|
"chart": {"ascendant": {"lon": 10.0, "sign": "Aries"}, "planets": natal_planets},
|
|
"planet_longitudes": {name: lon for name, lon in planets.items()},
|
|
"ascendant_index": 0,
|
|
"varga_charts": {
|
|
"D4": _varga(d4_asc, sun_varga_sign),
|
|
"D9": _varga(d9_asc, 1),
|
|
"D10": _varga(d10_asc, 1),
|
|
"D5": _varga(1, 1),
|
|
"D24": _varga(d24_asc, 1),
|
|
"D12": _varga(d12_asc, 1),
|
|
"D7": _varga(1, 1),
|
|
"D3": _varga(1, 1),
|
|
},
|
|
"arudha_padas": {},
|
|
"feature": {
|
|
"time": time,
|
|
"ascendant_sign_index": 0,
|
|
"varga_ascendants": {
|
|
"D4": d4_asc, "D9": d9_asc, "D10": d10_asc, "D5": 1, "D24": d24_asc, "D12": d12_asc,
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
def _gate_events() -> list[dict]:
|
|
return [
|
|
{"id": "e1", "domain": "education", "event_kind": "education_start", "date": "2014-09-01", "precision": "month"},
|
|
{"id": "e2", "domain": "education", "event_kind": "education_completion", "date": "2017-06-01", "precision": "month"},
|
|
{"id": "e3", "domain": "career", "event_kind": "career_entry", "date": "2018-07-01", "precision": "month"},
|
|
{"id": "e4", "domain": "relationship", "event_kind": "relationship_start", "date": "2021-08-01", "precision": "month"},
|
|
]
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|