File size: 2,049 Bytes
89aa2b4
 
 
32e4125
89aa2b4
 
 
 
 
 
 
32e4125
 
 
 
 
 
 
89aa2b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32e4125
 
 
 
 
89aa2b4
 
 
 
 
1589e06
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
# MSSE AI Engineering - Development Makefile
# Convenient commands for local development and CI/CD testing

.PHONY: help format check test ci-check clean install build-embeddings

# Default target
help:
	@echo "πŸš€ MSSE AI Engineering - Development Commands"
	@echo "=============================================="
	@echo ""
	@echo "Available commands:"
	@echo "  make format           - Auto-format code (black + isort)"
	@echo "  make check            - Check formatting without changes"
	@echo "  make test             - Run test suite"
	@echo "  make ci-check         - Full CI/CD pipeline check"
	@echo "  make build-embeddings - Build vector database for deployment"
	@echo "  make install          - Install development dependencies"
	@echo "  make clean            - Clean cache and temp files"
	@echo ""
	@echo "Quick workflow:"
	@echo "  1. make format     # Fix formatting"
	@echo "  2. make ci-check   # Verify CI/CD compliance"
	@echo "  3. git add . && git commit -m 'your message'"
	@echo "  4. git push        # Should pass CI/CD!"

# Auto-format code
format:
	@echo "🎨 Formatting code..."
	@./dev-tools/format.sh

# Check formatting without making changes
check:
	@echo "πŸ” Checking code formatting..."
	@black --check .
	@isort --check-only .
	@flake8 --max-line-length=88 --exclude venv

# Run tests
test:
	@echo "πŸ§ͺ Running tests..."
	@./venv/bin/python -m pytest -v

# Full CI/CD pipeline check
ci-check:
	@echo "πŸ”„ Running full CI/CD pipeline check..."
	@./dev-tools/local-ci-check.sh

# Install development dependencies
install:
	@echo "πŸ“¦ Installing development dependencies..."
	@pip install black isort flake8 pytest

# Build vector database with embeddings for deployment
build-embeddings:
	@echo "πŸ”§ Building embeddings database..."
	@python build_embeddings.py

# Clean cache and temporary files
clean:
	@echo "🧹 Cleaning cache and temporary files..."
	@find . -type d -name "__pycache__" -exec rm -rf {} +
	@find . -type d -name ".pytest_cache" -exec rm -rf {} +
	@find . -type f -name "*.pyc" -delete