|
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. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| affordability.py | ||
| confidence_engine.py | ||
| demand_normalization.py | ||
| demand_supply_forecast.py | ||
| macro_coefficient.py | ||
| macro_series.py | ||
| normalize.py | ||
| orchestrator.py | ||
| product_scoring.py | ||
| rate_sensitivity.py | ||
| recommendation.py | ||
| regression.py | ||
| report.py | ||
| report_assembler.py | ||
| sales_series.py | ||
| scenarios.py | ||
| special_indices.py | ||
| what_to_build.py | ||