|
All checks were successful
CI / changes (push) Successful in 6s
CI / frontend-tests (push) Has been skipped
CI / changes (pull_request) Successful in 6s
CI / frontend-tests (pull_request) Has been skipped
CI / backend-tests (push) Successful in 6m22s
CI / backend-tests (pull_request) Successful in 6m22s
demand_index used a fixed clamp01(velocity/50); on a live prod refresh all 8 ЕКБ districts sold ≥50/mo so it saturated to 1.0 everywhere — zero discrimination between districts. Redesign to mirror infra_index: normalize each district's unit_velocity against the city reference (MAX district velocity per refresh run), so demand always discriminates and self-calibrates as the market grows (no magic constant to rot). - normalize_demand(velocity, *, city_reference_velocity), pure + graceful (None stays None; reference<=0 -> honest 0.0, no ZeroDivisionError) - refresh_locations now two-pass: collect velocities (one compute_market_metrics per district, no O(n^2)), derive city reference, normalize + upsert; SAVEPOINT-per-row and counters preserved - remove _DEMAND_SATURATION_UPM constant; log city_reference_velocity - tests: rewrite demand normalization + add end-to-end city-relative suite incl. discrimination regression guarding the all-1.0 prod bug Refs #948 |
||
|---|---|---|
| .. | ||
| api | ||
| fixtures | ||
| integration | ||
| scrapers | ||
| scripts | ||
| services | ||
| smoke | ||
| sql | ||
| workers | ||
| __init__.py | ||
| conftest.py | ||
| test_admin_weight_profiles.py | ||
| test_audit_middleware.py | ||
| test_concepts_stub.py | ||
| test_ekb_geoportal_client.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_ping.py | ||
| test_poi_score.py | ||
| test_quarter_dump_lookup.py | ||
| test_rbac.py | ||
| test_sentry_init.py | ||
| test_velocity.py | ||
| test_weight_profiles.py | ||