Files
nifodea/pyproject.toml
T
oqyude c765f3672a T2: Pydantic v2 — replace @dataclass with BaseModel
- All domain models now use pydantic.BaseModel
- Removed manual to_dict()/from_dict() — use model_dump(mode='json')/model_validate()
- Added field validators:
  - Account.balance >= 0
  - Transaction.amount != 0
  - RecurringCashflow.amount != 0, frequency in {daily, weekly, monthly, yearly}
  - Liability.interest, payment >= 0
  - ExchangeRate.rate > 0
  - ForecastScenario.multipliers >= 0
- pydantic v2 native UUID handling (auto str in JSON)
- Updated excel_sync.py to use model_validate()
- Updated tests/test_model.py and tests/test_currency.py
- Added pydantic>=2.0 to pyproject.toml

Tests: 63/63 pass.
2026-10-08 16:42:04 +03:00

32 lines
686 B
TOML

[build-system]
requires = ["setuptools>=68.0"]
build-backend = "setuptools.build_meta"
[project]
name = "cashflow-forecast"
version = "0.1.0"
description = "Личная финансовая модель с прогнозом денежных потоков"
requires-python = ">=3.11"
dependencies = [
"openpyxl>=3.1",
"typer>=0.9",
"rich>=13.0",
"pydantic>=2.0",
]
[project.scripts]
cf = "infrastructure.cli.main:app"
[tool.setuptools.packages.find]
include = ["domain*", "application*", "infrastructure*"]
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W"]
[tool.pytest.ini_options]
testpaths = ["tests"]