Deep-review BLOCK: prior fix divided market velocity by region-wide active ЖК count (~442) → срок продажи 379-1180 мес (нереалистично). FIX: divide by district+class competitor count (competitors_weighted from _active_competitors_count cascade, ~5-15 ЖК) in BOTH fallback sites — aggregate and per-bucket. Срок now lands ~12-24 мес. - Delete unused _n_active_zhk_region helper + lazy _n_active_cache closure. - n_comp = max(round(competitors_weighted), 1) — district+class, not region-wide. - Rename scope["n_active_region"] → scope["n_competitors"] (new field this branch, nothing else reads it; frontend confirmed clean). - Keep static-mix fix: per-bucket velocities stay keyed off MARKET bucket_deal_counts (independent of user share_pct slider). - Tests: drop TestNActiveZhkRegion (helper removed); retarget n_active_region → n_competitors via _competitors_two_dim mock; replace misleading "≈404 мес" comment with assertion 12<=срок<=24 across n_comp 5-15. |
||
|---|---|---|
| .. | ||
| api | ||
| integration | ||
| scrapers | ||
| services | ||
| smoke | ||
| sql | ||
| workers | ||
| __init__.py | ||
| test_admin_weight_profiles.py | ||
| test_concepts_stub.py | ||
| test_gate_verdict.py | ||
| test_health.py | ||
| test_layout_signature.py | ||
| test_layout_tz_pdf.py | ||
| test_nspd_client.py | ||
| test_nspd_sync.py | ||
| test_poi_score.py | ||
| test_quarter_dump_lookup.py | ||
| test_rbac.py | ||
| test_sentry_init.py | ||
| test_velocity.py | ||
| test_weight_profiles.py | ||