|
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 |
||
|---|---|---|
| .. | ||
| analysis_runs | ||
| cadastre | ||
| exporters | ||
| forecasting | ||
| scrapers | ||
| site_finder | ||
| __init__.py | ||
| test_cadastre_bulk.py | ||
| test_ekburg_permits.py | ||
| test_forecast_request_cache.py | ||
| test_functional_zone_lookup.py | ||
| test_granddoc_lookup.py | ||
| test_ird_analyze.py | ||
| test_ird_overlay_lookup.py | ||
| test_krt_lookup.py | ||
| test_nspd_denorm.py | ||
| test_objective_backfill.py | ||
| test_planning_lookup.py | ||
| test_quarter_dump_lookup.py | ||
| test_recommend_mix_velocity.py | ||
| test_reservation_lookup.py | ||
| test_zone_regulation_extract.py | ||