|
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. |
||
|---|---|---|
| .. | ||
| analysis_runs | ||
| analytics | ||
| cadastre | ||
| chat | ||
| etl | ||
| exporters | ||
| forecasting | ||
| generative | ||
| llm | ||
| 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 | ||
| own_projects.py | ||
| weather_cache.py | ||