Ряд Московской области в Сбериндексе — грузим заранее, до включения региона 50 (#3498)
All checks were successful
Deploy Trade-In / changes (push) Successful in 13s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / build-browser (push) Has been skipped
Deploy Trade-In / test (push) Successful in 6m23s
Deploy Trade-In / build-backend (push) Successful in 1m4s
Deploy Trade-In / deploy (push) Successful in 2m4s
Deploy Trade-In / deploy-status (push) Successful in 1s
Deploy Trade-In / perimeter-smoke (push) Successful in 1m40s
All checks were successful
Deploy Trade-In / changes (push) Successful in 13s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / build-browser (push) Has been skipped
Deploy Trade-In / test (push) Successful in 6m23s
Deploy Trade-In / build-backend (push) Successful in 1m4s
Deploy Trade-In / deploy (push) Successful in 2m4s
Deploy Trade-In / deploy-status (push) Successful in 1s
Deploy Trade-In / perimeter-smoke (push) Successful in 1m40s
This commit is contained in:
parent
4c8c02cce5
commit
3ed759da7d
2 changed files with 28 additions and 0 deletions
|
|
@ -40,6 +40,18 @@ REF_AREA codes (sberindex internal region IDs, not ОКАТО/ISO):
|
|||
77 = Москва — verified 2026-05-31 brute-force against /api/sowa
|
||||
(region name from ref_area field of response);
|
||||
real_estate_deals: 2017-01 148 471 → 2026-04 309 510 руб/м².
|
||||
50 = Московская область — verified live 2026-09-12 (все три дашборда, ref_area
|
||||
в ответе = «Московская область»); real_estate_deals 116 месячных точек
|
||||
2017-01..2026-08, residential_real_estate_prices 47 (2022-10..2026-08),
|
||||
dinamika-tsen-obyavlenii 56 (2021-12..2026-07) — та же глубина и свежесть,
|
||||
что у Москвы.
|
||||
|
||||
Область заведена ЗАРАНЕЕ, до появления региона 50 в реестре regions.REGIONS. Ряд
|
||||
источника наполняется месяцами и задним числом не восстанавливается, поэтому
|
||||
загружать его надо начинать раньше, чем он понадобится оценщику. На саму оценку
|
||||
это не влияет: estimator берёт ряды через _SBER_REGION_SERIES, кода 50 там нет, и
|
||||
до его появления область в расчёт не попадает. Мониторинг свежести тоже не
|
||||
затронут — SBER_REQUIRED_REGIONS считается от карты ЭСТИМАТОРА, а не отсюда.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -71,6 +83,7 @@ SBER_REF_AREAS: dict[str, str] = {
|
|||
"643": "Россия",
|
||||
"66": "Свердловская область",
|
||||
"77": "Москва",
|
||||
"50": "Московская область",
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -537,3 +537,18 @@ async def test_pull_sber_indices_asking_benchmark_logged(caplog: pytest.LogCaptu
|
|||
assert any("115000" in record.message for record in caplog.records), (
|
||||
"Benchmark log should include the latest asking index value"
|
||||
)
|
||||
|
||||
|
||||
def test_moscow_oblast_ref_area_is_loaded_but_not_yet_used_by_estimator() -> None:
|
||||
"""Область грузится заранее: ряд наполняется месяцами, задним числом не берётся.
|
||||
|
||||
Одновременно проверяем, что заведение ряда НЕ включает область в оценку и НЕ
|
||||
поднимает тревогу монитора свежести: обе величины считаются от карты
|
||||
эстиматора (_SBER_REGION_SERIES), а не от карты загрузчика.
|
||||
"""
|
||||
from app.services.estimator import SBER_MONITORED_REGIONS, SBER_REQUIRED_REGIONS
|
||||
from app.services.sber_index import SBER_REF_AREAS
|
||||
|
||||
assert SBER_REF_AREAS["50"] == "Московская область"
|
||||
assert "Московская область" not in SBER_REQUIRED_REGIONS
|
||||
assert "Московская область" not in SBER_MONITORED_REGIONS
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue