gendesign/backend/tests/scrapers
bot-backend 5170107405
Some checks failed
CI / backend-tests (push) Has been cancelled
CI / frontend-tests (push) Has been cancelled
CI / openapi-codegen-check (push) Has been cancelled
CI / changes (push) Has been cancelled
CI / changes (pull_request) Successful in 6s
CI / backend-tests (pull_request) Has been cancelled
CI / frontend-tests (pull_request) Has been cancelled
CI / openapi-codegen-check (pull_request) Has been cancelled
fix(sql): EMISS PK includes period_type so yearly+Q1 coexist (#1606 follow-up)
Adds period_type TEXT NOT NULL DEFAULT 'unknown' to macro_indicator and
widens the PRIMARY KEY to (indicator_type, region, obs_date, period_type).

Before: yearly aggregate ('год'→obs_date YYYY-01-01) and Q1 ('I квартал'→
same date) shared the same PK slot → ON CONFLICT DO UPDATE made them
overwrite each other despite the in-memory dedup fix in #1687.

After: each EmissRow carries period_type from _emiss_period_granularity
('year'/'quarter'/'month'); DB ON CONFLICT targets include it, so
yearly+Q1 rows genuinely coexist.

Non-EMISS sources (CBR, rosstat open-data, domrf) use period_type='unknown'
(literal in SQL) — they are disambiguated by obs_date already, so the
wider PK is backward-compatible. All ON CONFLICT clauses in
cbr_macro_sync.py and rosstat_macro_sync.py updated accordingly.

Migration: 163_emiss_pk_period_type.sql (idempotent BEGIN/COMMIT).
Tests: 49 passed (emiss + rosstat suite), ruff clean, py_compile OK.
2026-06-17 21:27:34 +03:00
..
__init__.py feat(cadastre): NSPDBulkClient + schemas for bulk ingest (#168 PR2/5) (#170) 2026-05-15 12:50:41 +03:00
test_cbr_macro.py feat(macro): CBR inflation (ИПЦ YoY) -> macro_indicator + activate §9.5 channel (#946) 2026-06-08 11:41:14 +05:00
test_emiss_sdmx.py fix(sql): EMISS PK includes period_type so yearly+Q1 coexist (#1606 follow-up) 2026-06-17 21:27:34 +03:00
test_nspd_bulk_client.py feat(site-finder): per-building помещения/машино-места + parking_ratio (on-demand MVP, #96) 2026-06-14 18:48:16 +05:00
test_nspd_grid_walk.py fix(#231): switch search_by_quarter area layers to grid-walk dispatch (Sub-PR B) 2026-05-17 09:46:42 +03:00
test_pravo_gov66_client.py fix(sf): pravo.gov66 law_type числовой код =1 Постановление (#1149) 2026-06-07 14:17:52 +00:00
test_rosstat_emiss.py feat(macro): land construction price index (СМР) via open Rosstat xlsx (#946) 2026-06-09 11:28:05 +05:00