broker-sync/tests
Viktor Barzin a190875f63 Add finance_mysql provider + CLI for historical backfill
finance.position (171 rows, 2020-06-07 to 2025-12-19) is the only source
of InvestEngine + Schwab trade history pre-dating the broker-sync project.
This provider reads it once and pushes every row into the correct WF
account (.L tickers → IE ISA, others → Schwab).

Dedup: external_id = 'finance-mysql:position:<PK>' — idempotent on re-run.
Auth: aiomysql as MySQL root (user-authorized) against the standalone
mysql:8.4 in-cluster service.

New CLI: broker-sync finance-mysql-import
New tests: 5 unit tests covering route, symbol normalise, BUY/SELL
detection.

poetry run pytest -q   →  114 passed, 1 skipped
poetry run mypy        →  clean (aiomysql shielded with type: ignore)
poetry run ruff check  →  clean
2026-04-17 22:38:21 +00:00
..
fixtures Pin InvestEngine parser failure modes — empty-on-junk + partial-match 2026-04-17 22:02:48 +00:00
providers Add finance_mysql provider + CLI for historical backfill 2026-04-17 22:38:21 +00:00
sinks Add imap-ingest CLI + ImapProvider: route emails to IE/Schwab parsers 2026-04-17 22:12:05 +00:00
__init__.py Initial scaffold + canonical Activity model 2026-04-17 19:16:11 +00:00
test_cli.py Add broker-sync invest-engine CLI subcommand 2026-04-17 21:59:31 +00:00
test_dedup.py Add SyncRecordStore for authoritative dedup 2026-04-17 19:17:12 +00:00
test_fx.py Add FxCache and convert_to_gbp core 2026-04-17 19:18:41 +00:00
test_fx_ecb.py Add ECB FX fetcher + cache population 2026-04-17 19:32:23 +00:00
test_models.py Initial scaffold + canonical Activity model 2026-04-17 19:16:11 +00:00
test_normaliser.py Add Provider protocol and normaliser 2026-04-17 19:20:12 +00:00
test_pipeline.py Add imap-ingest CLI + ImapProvider: route emails to IE/Schwab parsers 2026-04-17 22:12:05 +00:00