Andrey Epifancev 480db4f3aa Документация: строки-показатели ОСВ (#58)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 12:26:03 +04:00

33 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tasks: колонка «Показатели» и валютные строки ОСВ
План исполнения — `docs/superpowers/plans/2026-10-19-osv-indicator-column.md` (задачи 1–8, модели исполнителей там).
## 1. Словари
- [x] 1.1 `api/rules/osv_headers.yaml` — `service_columns.indicator`; `api/rules/data_types.yaml` — `indicator_column`,
`indicator_column_untyped`, `row: «В валюте»`; `src/parser/rules.py` — поля `DataTypeRules`; тесты `test_rules.py`
## 2. Синтетика
- [x] 2.1 `tests/synthetic/generate.py` — s33–s36 (`_grid_osv`); `tests/synthetic/test_synthetic_files.py` — ожидания
и сценарии (сначала красные); файлы в `../fixtures/osv/synthetic/`
## 3. Колонка «Показатели» в заголовке
- [x] 3.1 `src/parser/detect.py` — `TableHeader.indicator_col`; тест `test_detect.py`
## 4. Строки-показатели при сборе строк
- [x] 4.1 `src/parser/hierarchy.py` (`BodyRow`), новый `src/parser/indicators.py` (`read_label`), `src/parser/classify.py`
(`collect_body_rows`, `_label_cols`, `_trailing_totals`); тесты `test_classify.py`, `test_indicators.py`
## 5. Иерархия
- [x] 5.1 `indicators.levels_with_indicators`, `osv.py` (вызов), `inn_rows._kind`; тест `test_indicators.py`
## 6. Классификация и проверки
- [x] 6.1 `classify.py` (`_Kind`, `ClassifiedRow.indicator`, вид данных строки), `checks.py` (`_is_indicator`, `_total`),
`osv.py` (предупреждение «приняты как БУ»); тесты `test_classify.py`, `test_checks.py`
## 7. Регрессия и реальные файлы
- [x] 7.1 Синтетика зелёная; `make golden-check` — снимки реальных файлов и s01–s32 без изменений; `make golden-update`
только для s33–s36; локальная сверка файлов контура (не в git)
## 8. Документация и проверки
- [x] 8.1 README (раздел «Парсер ОСВ»), `../docs/context/06-test-data.md` §7 (s33–s36), `make check-full`