|
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 | ||
| etl | ||
| exporters | ||
| forecasting | ||
| generative | ||
| photos | ||
| scrapers | ||
| site_finder | ||
| __init__.py | ||
| analytics_queries.py | ||
| analytics_refresh.py | ||
| forecast_request_cache.py | ||
| insights.py | ||
| job_settings.py | ||
| objective_etl.py | ||
| objective_sync_config.py | ||