Barcode Betty 873f53b9fc fix: resolve CI failures — SQLite incompatibility and ruff lint errors
- Remove PostgreSQL-specific server_default from User.email_inbound_token.
  The column has a Python-side default (secrets.token_urlsafe) that works
  for both SQLite and PostgreSQL. The gen_random_bytes() server_default
  caused sqlite table creation to fail.

- Add missing back_populates relationships to stub models so SQLAlchemy
  mapper configuration succeeds. Purchase.user and Store.user_accounts
  were missing, causing "has no property" errors during Base.metadata.create_all.

- Auto-fix ruff import sorting (I001) across all source and test files.

- Manually fix line-too-long (E501) in config.py.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-19 13:06:47 +00:00

ReceiptWitness

Purchase data ingestion service for CartSnitch. Authenticates with grocery retailer web portals (Meijer, Kroger, Target) via Playwright, scrapes purchase history, and writes structured records to the shared PostgreSQL database.

Quick Start

# Install dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Local dev with Docker Compose
docker-compose up

Architecture

  • Scrapers: Playwright-based browser automation for each retailer
  • Parsers: Converts raw receipt data to structured Purchase / PurchaseItem records
  • Database: SQLAlchemy 2.0 async; models inlined under src/receiptwitness/shared/
  • Events: Publishes cartsnitch.receipts.ingested to Redis after ingestion

Branches

  • dev — development, auto-deploys to dev cluster
  • uat — user acceptance testing
  • main — production, auto-deploys to prod cluster
S
Description
CartSnitch ReceiptWitness — purchase data ingestion and pipeline
Readme 1.2 MiB
Languages
Python 99.3%
Dockerfile 0.5%
Mako 0.2%