gendesign/backend/tests
lekss361 e93bb6121e
feat(site-finder): D2 velocity-score from domrf_kn_sale_graph (#34 sub-PR 1/2) (#146)
compute_velocity service queries competitor sales в радиусе 3км:
- ST_MakePoint(longitude, latitude) — domrf_kn_objects не имеет geom column
- JOIN domrf_kn_sale_graph за 6 мес (area_sq primary, realised*45 fallback)
- Normalize vs ЕКБ-wide median → velocity_score 0..1
- confidence: high/medium/low (competitors_count + months_observed)
- Top 5 sample competitors для UI

Integration: analyze_parcel.response['velocity'] top-level field.

Schema corrections vs spec:
- obj_name → comm_name
- region_code → region_cd
- contracted (INT) → area_sq (м²)

Tests: 102/102 pass.
Vault: Module_Velocity_Service.md NEW.

Closes #144 (sub-PR 2 frontend закроет #34)

Co-authored-by: lekss361 <claudestars@proton.me>
2026-05-15 01:24:53 +03:00
..
__init__.py init 2026-04-25 13:45:19 +03:00
test_admin_weight_profiles.py feat(site-finder): weight profiles endpoints + analyze integration (#114 sub-PR 3/4) (#138) 2026-05-15 00:40:06 +03:00
test_concepts_stub.py init 2026-04-25 13:45:19 +03:00
test_gate_verdict.py feat(site-finder): gate verdict aggregator — can-build-MKD signal (#32 G5 sub-PR 1/2) (#142) 2026-05-15 00:59:53 +03:00
test_health.py init 2026-04-25 13:45:19 +03:00
test_nspd_client.py feat(scrapers): search_by_quarter orchestrator + QuarterDump (#94 pt.2/4) (#109) 2026-05-12 18:11:30 +03:00
test_nspd_sync.py feat(nspd): harvest_quarter Celery task + beat + admin endpoint (#94 pt.4 part A) (#111) 2026-05-12 18:45:57 +03:00
test_quarter_dump_lookup.py feat(site-finder): integrate nspd_quarter_dumps cache в analyze_parcel (#94 Sprint 1.1 FINAL) (#116) 2026-05-13 09:14:19 +03:00
test_velocity.py feat(site-finder): D2 velocity-score from domrf_kn_sale_graph (#34 sub-PR 1/2) (#146) 2026-05-15 01:24:53 +03:00
test_weight_profiles.py feat(site-finder): weight profiles service — Pydantic + CRUD (#114 sub-PR 2/4) (#137) 2026-05-15 00:29:37 +03:00