-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (69 loc) · 2.75 KB
/
Makefile
File metadata and controls
89 lines (69 loc) · 2.75 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
78
79
80
81
82
83
84
85
86
87
88
89
.PHONY: help install install-hooks verify check ci test test-cov test-integration test-all server build publish publish-test clean
# Default target
.DEFAULT_GOAL := help
help:
@echo "Quantum Code Development Commands"
@echo ""
@echo "Development:"
@echo " make check Run all checks with auto-fix (format, lint, types, deadcode, tests)"
@echo " make ci Run all checks WITHOUT auto-fix (for CI/pre-commit)"
@echo " make test Run unit tests"
@echo " make test-cov Run unit tests with coverage (fails if <80%)"
@echo " make test-integration Run integration tests (requires API keys)"
@echo " make test-all Run all tests (unit + integration)"
@echo ""
@echo "Setup:"
@echo " make install Install dependencies and setup environment"
@echo " make install-hooks Install git pre-commit hooks"
@echo " make verify Verify installation is working"
@echo " make server Start the MCP server"
@echo ""
@echo "Release:"
@echo " make build Build Python package"
@echo " make publish Publish to PyPI"
@echo " make publish-test Publish to TestPyPI"
@echo " make clean Remove build artifacts"
# =============================================================================
# Development
# =============================================================================
check:
@./scripts/check.sh
ci:
@./scripts/check.sh --ci
# Note: test_config.py excluded - tests depend on .env values, not portable
PYTEST_UNIT := tests/unit/ --ignore=tests/unit/test_config.py
test:
uv run pytest $(PYTEST_UNIT) -v
test-cov:
uv run pytest $(PYTEST_UNIT) --cov=quantum_code --cov-report=term-missing --cov-fail-under=80
test-integration:
@./scripts/check-api-keys.sh
RUN_E2E=1 uv run pytest tests/integration/ -v
test-all: test test-integration
# =============================================================================
# Setup
# =============================================================================
install:
@./scripts/install.sh
install-hooks:
@ln -sf ../../.githooks/pre-commit .git/hooks/pre-commit
@echo "✓ Git hooks installed"
verify:
@./scripts/verify.sh
server:
@./scripts/run_server.sh
# =============================================================================
# Release
# =============================================================================
build:
uv build
publish: build
uv run twine upload dist/*
@echo "✓ Published to PyPI"
publish-test: build
uv run twine upload --repository testpypi dist/*
@echo "✓ Published to TestPyPI"
clean:
rm -rf dist/ build/ *.egg-info/ .coverage htmlcov/ .pytest_cache/ .ruff_cache/ .pyright/
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
@echo "✓ Cleaned"