katefike / sage

A personal finance app that's like Mint, but better. It uses a dockerized postfix/dovecot email server. Parses transaction data from alert emails.
MIT License
5 stars 0 forks source link

Validate 202405 Huntington checking asterisk-free txns #139

Closed katefike closed 3 months ago

katefike commented 4 months ago

Steps

Local Testing

  1. In gmail search "after:2024/5/1 before:2024/6/1"
  2. Put the emails in a folder.
  3. Use Cloud HQ to forward all emails in the folder to another gmail account. A Third party gmail forwarding tool is used because google doesn't allow bulk forwards with forward bodies, just forwarded email as attachment.
  4. Export the forwarded emails as a .zip file
  5. Unzip the export: unzip 202405.zip
  6. mv 202405/Takeout/Mail/backfill-202405.mbox /home/kfike/Projects/sage/docker/mailserver/test_data/real_data
  7. Change the env var PRE_LOAD_MBOX=real_data/backfill-202405.mbox
  8. docker compose -f docker-compose.dev.yml up --build
  9. python3 -m sage and verify the emails can be parsed
  10. Download a CSV of all of an account's transaction history validator/real_data/Huntington_checking_220601-240527.csv
  11. Validate the DB data against the CSV data python3 -m validator Huntington_checking_220601-240527.csv 5-2024

Production Backfill

  1. Use Cloud HQ to forward all emails in the folder to the mx.
  2. SSH to the host, activate the venv, and run python3 -m sage and verify all 47 emails were processed.

A detour ...

Taking a detour to do the issue Test email parsing exceptions and errors #56 to help with working on the backfilled email errors.

Another detour...

Taking another detour to do the issue Create a data validator module #143 to help with validating the backfills. There's no point in loading hot garbage into sage.

DONE WHEN

katefike commented 4 months ago