-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (49 loc) · 3.37 KB
/
Copy pathMakefile
File metadata and controls
61 lines (49 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.PHONY: install install-dev serve reset test clean
# ═══════════════════════════════════════════════════════════════
# Install the package in development mode
# ═══════════════════════════════════════════════════════════════
install:
pip install -e .
install-dev:
pip install -e ".[dev]"
# ═══════════════════════════════════════════════════════════════
# Start the Streamlit app
# ═══════════════════════════════════════════════════════════════
serve:
streamlit run src/invoice/app.py --server.fileWatcherType none
# ═══════════════════════════════════════════════════════════════
# Run the OCR pipeline
# ═══════════════════════════════════════════════════════════════
pipeline:
python -m src.invoice.pipeline -f $(file)
pipeline-dir:
python -m src.invoice.pipeline -d $(dir)
ocr-only:
python -m src.invoice.pipeline -f $(file) --ocr-only
# ═══════════════════════════════════════════════════════════════
# Database reset
# ═══════════════════════════════════════════════════════════════
reset:
./scripts/reset.sh -all
reset-clear:
./scripts/reset.sh -clear
embed:
./scripts/reset.sh -embed
# ═══════════════════════════════════════════════════════════════
# Run tests
# ═══════════════════════════════════════════════════════════════
test:
pytest -v
test-cov:
pytest --cov=src --cov-report=term --cov-report=html
# ═══════════════════════════════════════════════════════════════
# Clean up Python artifacts
# ═══════════════════════════════════════════════════════════════
clean:
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type f -name "*.pyo" -delete 2>/dev/null || true
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
rm -rf build/ dist/ .coverage htmlcov/ 2>/dev/null || true
@echo "✅ Cleaned build artifacts"