oqyude
af01efc41a
style: привести код к ruff format (line-length 120)
...
Обнаружено на шаге 0: `ruff format --check .` НЕ был чистым в baseline
(24 файла расходились с форматом ruff). `ruff check .` был чистым.
Изменение только косметическое (переносы, пустая строка после docstring
модуля, склейка вызовов в пределах line-length=120 из [tool.ruff]);
поведение не меняется — pytest 81/81 зелёные, `ruff check .` — без ошибок.
Нужно, чтобы `ruff format --check .` стал рабочим гейтом (D13 CI).
2026-10-25 05:17:27 +03:00
oqyude
b6b64a9878
T6: Decompose CLI — main.py → 9 command files, config.py → config_cmd.py
...
Split infrastructure/cli/:
- main.py (330 LOC) → 9 files in infrastructure/cli/commands/:
* init.py, forecast.py, scenario.py, whatif.py, compare.py
* import_xlsx.py, export_xlsx.py, analyze.py, info.py
- config.py (428 LOC) → commands/config_cmd.py (15 sub-commands)
- main.py → app.py (entry point: registers all commands)
- New: paths.py (MODEL_PATH, DATA_DIR)
- New: services.py (composition root + helpers: load_model, save_model,
build_services, resolve_currency, convert_value, fmt_amount)
- cli/__init__.py (empty) удалён
Each command module: <100 LOC.
pyproject.toml: cf = infrastructure.cli.app:app
tests/test_cli.py: import обновлён на infrastructure.cli.app
CLI behavior идентично, все команды работают.
Tests: 67/67 pass.
2026-10-08 16:56:49 +03:00
oqyude
feb77ef217
T1: restructure to domain/application/infrastructure + schema version 1
...
- Move cashflow_model/ -> domain/
- Move engine/ -> application/
- Move cli/, sync/, ai/ -> infrastructure/
- Update all imports across codebase and tests
- Add version=1 to FinancialModel.to_dict() with migration hook in from_dict
- Update pyproject.toml: cf entry point and packages.find
Tests: 63/63 pass.
2026-10-08 16:34:10 +03:00