- PR1: Project scaffold, DB models, price loader - PR2: Congressional trade ingestion (House Stock Watcher) - PR3: Security enrichment + deployment infrastructure - 37 passing tests, 87%+ coverage - Docker + Proxmox deployment ready - Complete documentation - Works 100% offline with fixtures
1.2 KiB
1.2 KiB
Dev setup (conventions; code scaffolding comes next)
This doc sets the conventions we’ll implement in the first “code PRs”.
Python + layout
- Use Python 3.x
- Source layout:
src/+tests/ - Prefer type hints and docstrings
Configuration
- Store secrets in
.env(not committed). - Commit a
.env.exampledocumenting required variables.
Expected variables (initial):
POTE_DB_URL(e.g.,sqlite:///./pote.dbor Postgres URL)QUIVER_API_KEY(optional, if using QuiverQuant)FMP_API_KEY(optional, if using Financial Modeling Prep)
Database
- Default dev: SQLite for fast local iteration.
- Support Postgres for “real” runs and larger datasets.
- Migrations: Alembic (once models are in place).
Testing
pytestfor unit/integration tests- Prefer:
- HTTP clients tested with mocked responses
- DB tests using SQLite in a temp file or in-memory where possible
Logging
- Use standard
loggingwith consistent, parseable messages. - ETL jobs should log counts: fetched/inserted/updated/skipped.
PR sizing guideline
Each PR should:
- implement one coherent piece (schema, one client, one ETL, one metric module)
- include tests
- include minimal docs updates (if it changes behavior)