-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (43 loc) · 1.25 KB
/
Makefile
File metadata and controls
54 lines (43 loc) · 1.25 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
.PHONY: install install-dev lint format test test-cov clean run setup-pre-commit
# Install production dependencies
install:
pip install -r requirements.txt
# Install development dependencies
install-dev:
pip install -r requirements-dev.txt
# Run linting
lint:
ruff check pattern_mcp_server.py tests/
mypy pattern_mcp_server.py
# Format code
format:
black pattern_mcp_server.py tests/
ruff check --fix pattern_mcp_server.py tests/
# Run tests
test:
pytest tests/ -v
# Run tests with coverage
test-cov:
pytest tests/ -v --cov=pattern_mcp_server --cov-report=html --cov-report=term
# Clean up generated files
clean:
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
rm -rf .coverage htmlcov .pytest_cache .ruff_cache .mypy_cache
rm -rf build dist *.egg-info
# Run the MCP server
run:
python pattern_mcp_server.py
# Set up pre-commit hooks
setup-pre-commit:
pre-commit install
pre-commit run --all-files
# Create virtual environment
venv:
python -m venv venv
@echo "Virtual environment created. Activate with: source venv/bin/activate"
# Full development setup
setup: venv
. venv/bin/activate && pip install -r requirements-dev.txt
. venv/bin/activate && pre-commit install
@echo "Development environment ready!"