-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (55 loc) · 1.81 KB
/
Makefile
File metadata and controls
72 lines (55 loc) · 1.81 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
62
63
64
65
66
67
68
69
70
71
72
.PHONY: help install dev test lint format clean docker-build docker-up docker-down train api dashboard
help:
@echo "Predictive Maintenance - Available Commands"
@echo "============================================"
@echo "install - Install production dependencies"
@echo "dev - Install development dependencies"
@echo "test - Run tests with coverage"
@echo "lint - Run linting checks"
@echo "format - Format code with black and isort"
@echo "clean - Clean build artifacts"
@echo "docker-build - Build Docker images"
@echo "docker-up - Start Docker services"
@echo "docker-down - Stop Docker services"
@echo "train - Run training pipeline"
@echo "api - Start API server"
@echo "dashboard - Start Streamlit dashboard"
install:
pip install -r requirements.txt
dev:
pip install -e ".[dev]"
pre-commit install
test:
pytest tests/ -v --cov=src --cov-report=html --cov-report=term-missing
test-unit:
pytest tests/unit/ -v
test-integration:
pytest tests/integration/ -v
lint:
flake8 src/ api/ tests/
mypy src/
format:
black .
isort .
clean:
find . -type d -name "__pycache__" -exec rm -rf {} + 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
find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
rm -rf build/ dist/ htmlcov/ .coverage 2>/dev/null || true
docker-build:
docker-compose build
docker-up:
docker-compose up -d
docker-down:
docker-compose down
docker-logs:
docker-compose logs -f
train:
python -m src.pipelines.training_pipeline
api:
uvicorn api.main:app --reload --host 0.0.0.0 --port 8000
dashboard:
streamlit run dashboard/app.py --server.port 8501
mlflow:
mlflow ui --host 0.0.0.0 --port 5000