Files
FargoImport/AGENTS.md
T

2.5 KiB

Repository Guidelines

Project Structure & Modules

This repository is a small, flat Python application. Core scripts live in the root: main.py is the extraction and import CLI, wf_*_extractor.py handles Wells Fargo payloads, transaction_processor.py transforms transactions, ynab_client.py connects to YNAB, category_suggester.py learns category patterns, and reconcile.py compares transactions. test_import.py contains focused import-helper checks. Usage and module documentation is in README.md, QUICKSTART.md, PROJECT_SUMMARY.md, and YNAB_MODULE.md. There are no separate source, test, or asset directories.

Build, Test, and Development

There is no build step. Use Python 3 and install pinned dependencies with python -m pip install -r requirements.txt. Run the CLI with python main.py --input posted.dat; add --help to inspect options. Run the assertion checks with python test_import.py (or python -m pytest test_import.py if pytest is installed). python reconcile.py runs the Wells Fargo/YNAB reconciliation flow and requires valid local YNAB configuration.

Coding Style & Naming

Follow the existing Python style: four-space indentation, snake_case for functions and variables, and PascalCase for classes. Keep modules focused on their current responsibilities and preserve the existing CLI and programmatic interfaces unless a change requires updating their documentation and examples. No formatter or linter is configured.

Testing Guidelines

Add focused assertions to test_import.py for import conversion, classification, and formatting behavior. Name test functions test_<behavior> and include representative transaction cases, especially amount signs, duplicate IDs, and posted versus pending status. Run the script directly before submitting changes that affect these helpers.

Commits and Pull Requests

Recent history uses brief, lowercase summaries such as added batch file. and made fix.. Keep commit subjects concise and describe the change. Pull requests should explain the user-visible behavior, list relevant manual or automated checks, and note changes to CLI usage or configuration. Include sample output when it clarifies an extraction or reconciliation change.

Security and Local Data

Keep real bank exports, transactions.csv, and generated JSON out of commits; .gitignore excludes *.dat, *.json (including category_memory.json), and transactions.csv. Treat ynab.yml as secret-bearing local configuration and do not commit API tokens or account details.