fix(python): parse Fio 2-digit-year dates + add make sync-debug
Fio's transparent page now serves recent rows as DD.MM.YY while older rows stay DD.MM.YYYY. parse_czech_date only knew the 4-digit form so every recent transfer was silently dropped — make sync-2026 reported zero new transactions. Adds %d.%m.%y and %d/%m/%y to the format list, mirroring the Go-side fix from 2026-05-07. Also adds a Python analog of make go-sync-debug: - --dry-run skips header write / append / sort and prints "would …" lines - --print-fio-table prints aligned per-txn table with NEW/DUP status - make sync-debug [DAYS=N] wrapper (default DAYS=30) - always-on stderr diagnostics in fio_utils: which fetcher was chosen (with FIO_API_TOKEN-unset lag warning) + raw-vs-filtered counts, so this class of "scraper drops everything" bug surfaces immediately. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
4
Makefile
4
Makefile
@@ -35,6 +35,7 @@ help:
|
||||
@echo " make sync - Sync Fio transactions to Google Sheets"
|
||||
@echo " make sync-2025 - Sync Fio transactions for Q4 2025 (Oct-Dec)"
|
||||
@echo " make sync-2026 - Sync Fio transactions for the whole year of 2026"
|
||||
@echo " make sync-debug [DAYS=N] - Dry-run Python sync with Fio diagnostics and txn table (default DAYS=30)"
|
||||
@echo " make infer - Infer payment details (Person, Purpose, Amount) in the sheet"
|
||||
@echo " make reconcile - Show balance report using Google Sheets data"
|
||||
@echo " make venv - Sync virtual environment with pyproject.toml"
|
||||
@@ -125,6 +126,9 @@ sync-2025: $(PYTHON)
|
||||
sync-2026: $(PYTHON)
|
||||
$(PYTHON) scripts/sync_fio_to_sheets.py --credentials .secret/fuj-management-bot-credentials.json --from 2026-01-01 --to 2026-12-31 --sort-by-date
|
||||
|
||||
sync-debug: $(PYTHON) ## Dry-run Python sync with Fio diagnostics and txn table (default DAYS=30)
|
||||
$(PYTHON) scripts/sync_fio_to_sheets.py --credentials .secret/fuj-management-bot-credentials.json --days $(DAYS) --dry-run --print-fio-table
|
||||
|
||||
infer: $(PYTHON)
|
||||
$(PYTHON) scripts/infer_payments.py --credentials $(CREDENTIALS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user