@@ -55,19 +55,74 @@ install-deps:
5555 @which cargo > /dev/null && echo "✅ Rust found: $$(cargo --version)"
5656
5757# Development
58- test :
59- pytest tests/ -v
60- @echo " ✅ Tests completed"
61-
58+ test : test-unit test-integration test-e2e
59+
60+ # Run unit tests
61+ test-unit :
62+ @pytest tests/unit/ -v --cov=src/dialogchain --cov-report=term-missing
63+ @echo " ✅ Unit tests completed"
64+
65+ # Run integration tests
66+ test-integration :
67+ @pytest tests/integration/ -v --cov=src/dialogchain --cov-append
68+ @echo " ✅ Integration tests completed"
69+
70+ # Run end-to-end tests
71+ test-e2e :
72+ @pytest tests/e2e/ -v --cov=src/dialogchain --cov-append
73+ @echo " ✅ End-to-end tests completed"
74+
75+ # Run tests with coverage report
76+ coverage :
77+ @coverage erase
78+ @coverage run -m pytest
79+ @coverage report -m
80+ @coverage html
81+ @echo " 📊 Coverage report available at htmlcov/index.html"
82+
83+ # Run type checking
84+ typecheck :
85+ @mypy src/dialogchain/
86+ @echo " ✅ Type checking completed"
87+
88+ # Run all linters
6289lint :
63- python -m flake8 src/dialogchain/
64- python -m black --check src/dialogchain/
90+ @echo " 🔍 Running flake8..."
91+ @flake8 src/dialogchain/ tests/
92+ @echo " 🎨 Checking code formatting with black..."
93+ @black --check src/dialogchain/ tests/
94+ @echo " 📝 Checking import ordering..."
95+ @isort --check-only --profile black src/dialogchain/ tests/
6596 @echo " ✅ Linting completed"
6697
98+ # Format code
6799format :
68- python -m black src/dialogchain/
100+ @echo " 🎨 Formatting code with black..."
101+ @black src/dialogchain/ tests/
102+ @echo " 📝 Sorting imports..."
103+ @isort --profile black src/dialogchain/ tests/
69104 @echo " ✅ Code formatted"
70105
106+ # Check code style without making changes
107+ check-codestyle :
108+ @black --check --diff src/dialogchain/ tests/
109+ @isort --check-only --profile black src/dialogchain/ tests/
110+
111+
112+ # Run all checks (lint, typecheck, test)
113+ check-all : lint typecheck test
114+ @echo " ✨ All checks passed!"
115+
116+ # Install pre-commit hooks
117+ pre-commit-install :
118+ @pre-commit install
119+ @pre-commit install --hook-type pre-push
120+ @echo " ✅ Pre-commit hooks installed"
121+
122+ # Setup development environment
123+ setup-dev-env : install pre-commit-install
124+ @echo " 🚀 Development environment ready!"
125+
71126# Build
72127clean :
73128 rm -rf build/
0 commit comments