Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 1.24 KB

File metadata and controls

88 lines (62 loc) · 1.24 KB

Contributing

Development Setup

Prerequisites

  • Python 3.11+
  • uv
  • Ollama
  • Poppler and Tesseract (for PDF/OCR)

macOS

brew install poppler tesseract ollama

Ubuntu/Debian

sudo apt-get install poppler-utils tesseract-ocr
# Install Ollama from https://ollama.ai/

Common Commands

Install dependencies

uv sync

Start Ollama and pull a model

ollama serve
ollama pull meissosisai/arc1-mini  # or another model

Run the development server

uv run uvicorn invoice_extractor.main:app --reload

Run tests

uv run pytest tests/ -v

Run with Docker

docker compose up -d
docker compose logs -f ollama-pull  # wait for model download
curl http://localhost:8000/health

Stop Docker services

docker compose down

Export OpenAPI spec

uv run python -c "
from invoice_extractor.main import app
import json
print(json.dumps(app.openapi(), indent=2))
"

Code Style

  • Use type hints
  • Follow PEP 8
  • Keep functions focused and small

Submitting Changes

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests
  5. Submit a pull request