|
Some checks failed
CI / backend-tests (push) Blocked by required conditions
CI / frontend-tests (push) Blocked by required conditions
CI / openapi-codegen-check (push) Blocked by required conditions
CI / changes (push) Successful in 8s
CI / changes (pull_request) Successful in 8s
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Successful in 1m42s
CI / backend-tests (pull_request) Has been cancelled
Add `velocity_by_room: dict[str, float] | None` to `MarketMetrics` — per-bucket unit velocity (ед./мес) derived from the existing `sold_by_room` ROLLUP data that `_query_sales_window` already returns. No new SQL required. Thread per-bucket velocity through `_demand_only_overlay` via the new `_FORECAST_TO_METRIC_BUCKETS` constant that maps each forecast bucket to its market_metrics room-bucket keys. "80+ м²" sums "4" + "5+" keys. Fallback to aggregate `unit_velocity` when `velocity_by_room` is None (thin-data path). Previously `base_pace` was identical for all 5 room-buckets, so §9.4 norm and §9.2 base_pace cancelled out in pace/max_pace and ranking was driven purely by §9.5 macro_coef (segment steepness proxy). Now §9.2 reflects real per-bucket observed demand from objective_lots.contract_date data. Callers of `compute_market_metrics` that don't use `velocity_by_room` are unaffected (the new field is additive to the frozen dataclass). All existing callers verified — none construct `MarketMetrics` directly except the one production site. |
||
|---|---|---|
| .. | ||
| test_best_layouts.py | ||
| test_competitor_relevance.py | ||
| test_competitors_parking.py | ||
| test_developer_attribution.py | ||
| test_district_resolver.py | ||
| test_future_supply.py | ||
| test_locations.py | ||
| test_macro.py | ||
| test_market_metrics.py | ||
| test_own_portfolio.py | ||
| test_pat_subzones.py | ||
| test_premises_lookup.py | ||
| test_supply_layers.py | ||