-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (20 loc) · 751 Bytes
/
Copy pathMakefile
File metadata and controls
26 lines (20 loc) · 751 Bytes
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
.PHONY: install test train serve lint clean
install:
pip install -r requirements.txt
pip install -e .
test:
PYTHONPATH=src pytest tests/ -v
train:
PYTHONPATH=src python -m classifier.training --config config/model_config.yaml
serve:
PYTHONPATH=src uvicorn classifier.api:app --host 0.0.0.0 --port 8000 --reload
lint:
flake8 src/ tests/ --max-line-length 120 --exclude __pycache__
@echo "Lint passed."
clean:
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type d -name .pytest_cache -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
rm -rf build/ dist/ .eggs/
@echo "Clean complete."