-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (64 loc) · 2.11 KB
/
Makefile
File metadata and controls
77 lines (64 loc) · 2.11 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
73
74
75
76
77
# Makefile for Six-Stack Personality Classification Pipeline
# Author: AI Assistant
# Date: 2025-07-14
.PHONY: help install format lint typecheck security check-all test run train-models dash stop-dash
# Default target
help:
@echo "Six-Stack Personality Classification Pipeline"
@echo "============================================="
@echo ""
@echo "Available targets:"
@echo " install - Install dependencies using uv"
@echo " format - Format code with ruff"
@echo " lint - Lint code with ruff (includes format check)"
@echo " typecheck - Type check with mypy"
@echo " security - Security check with bandit"
@echo " check-all - Run all code quality checks (lint, typecheck, security)"
@echo " test - Run tests"
@echo " run - Run the modular pipeline"
@echo " train-models - Train and save ML models"
@echo " dash - Run Dash application"
@echo " stop-dash - Stop Dash application"
@echo ""
# Dependency management
install:
@echo "Installing dependencies with uv..."
uv sync --all-extras
# Code quality with Ruff
format:
@echo "Formatting code with ruff..."
uv run ruff format src/ dash_app/ tests/ scripts/
lint:
@echo "Linting code with ruff..."
uv run ruff check . --fix
uv run ruff format --check .
# Type checking
typecheck:
@echo "Type checking with mypy..."
uv run mypy src/ --ignore-missing-imports
# Security checking
security:
@echo "Security checking with bandit..."
uv run bandit -r src/ -f json
# Run all quality checks
check-all: lint typecheck security
@echo "All code quality checks completed!"
# Testing
test:
@echo "Running tests..."
uv run pytest tests/ -v
# Pipeline execution
run:
@echo "Running modular pipeline..."
uv run python src/main_modular.py
# Model training
train-models:
@echo "Training and saving ML models..."
uv run python scripts/train_and_save_models.py
# Dash application
dash:
@echo "Starting Dash application..."
uv run python dash_app/main.py --model-name ensemble
stop-dash:
@echo "Stopping Dash application..."
@lsof -ti:8050 | xargs kill -9 2>/dev/null || echo "No process found on port 8050"