-
Notifications
You must be signed in to change notification settings - Fork 163
Expand file tree
/
Copy pathMakefile
More file actions
123 lines (105 loc) · 4.13 KB
/
Copy pathMakefile
File metadata and controls
123 lines (105 loc) · 4.13 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# MassGen Makefile
# Convenience commands for common development tasks
.PHONY: help docs-check docs-build docs-serve docs-clean docs-validate docs-duplication all-checks test test-fast test-all
# Default target - show help
help:
@echo "MassGen Development Commands"
@echo ""
@echo "Documentation:"
@echo " make docs-check Run all documentation checks (links + duplication)"
@echo " make docs-validate Check for broken links"
@echo " make docs-duplication Check for duplicated content"
@echo " make docs-build Build HTML documentation"
@echo " make docs-serve Build and serve docs locally (http://localhost:8000)"
@echo " make docs-clean Clean documentation build artifacts"
@echo ""
@echo "Quick Commands:"
@echo " make check Run all checks (docs + tests)"
@echo " make test Run fast default test lane"
@echo " make test-fast Run fast unit/default lane (CI-safe)"
@echo " make test-all Run integration + expensive + docker tests"
@echo " make format Format code with black and isort"
@echo " make lint Run linting checks"
@echo ""
@echo "Installation:"
@echo " make install Install MassGen in development mode"
@echo " make install-docs Install documentation dependencies"
@echo ""
@echo "For deployment and testing GitHub Actions, see docs/DOCUMENTATION_DEPLOYMENT.md"
@echo ""
# Documentation validation
docs-validate:
@echo "🔍 Validating documentation links..."
@uv run python scripts/validate_links.py
@echo "✓ Link validation complete. See docs/LINK_VALIDATION_REPORT.md"
# Documentation duplication check
docs-duplication:
@echo "🔍 Checking for duplicated content..."
@uv run python scripts/check_duplication.py
@echo "✓ Duplication check complete. See docs/DUPLICATION_REPORT.md"
# Run all documentation checks
docs-check: docs-validate docs-duplication
@echo ""
@echo "✅ All documentation checks passed!"
# Build documentation
docs-build:
@echo "📚 Building documentation..."
@cd docs && sphinx-build -b html source _build/html
@echo "✓ Documentation built in docs/_build/html/index.html"
# Build and serve documentation locally
docs-serve: docs-build
@echo "🌐 Starting documentation server..."
@echo " Open http://localhost:8000 in your browser"
@echo " Press Ctrl+C to stop"
@cd docs/_build/html && python -m http.server 8000
# Clean documentation build
docs-clean:
@echo "🧹 Cleaning documentation build..."
@rm -rf docs/_build
@rm -f docs/LINK_VALIDATION_REPORT.md
@rm -f docs/DUPLICATION_REPORT.md
@echo "✓ Documentation cleaned"
# Install development dependencies
install:
@echo "📦 Installing MassGen in development mode..."
@uv pip install -e .
@echo "✓ MassGen installed"
# Install documentation dependencies
install-docs:
@echo "📦 Installing documentation dependencies..."
@uv pip install sphinx sphinx-book-theme sphinx-design sphinx-copybutton
@echo "✓ Documentation dependencies installed"
# Run all checks (docs + tests)
check: docs-check test
@echo ""
@echo "✅ All checks passed!"
# Run fast default tests (includes deterministic integration; excludes live_api/expensive/docker)
test: test-fast
test-fast:
@echo "🧪 Running fast test lane..."
@uv run pytest massgen/tests --run-integration -m "not live_api and not docker and not expensive" -k "not test_review_modal_snapshot" -q --tb=no
@echo "✓ Fast test lane passed"
test-all:
@echo "🧪 Running full test lane (integration + expensive + docker)..."
@RUN_INTEGRATION=1 RUN_LIVE_API=1 RUN_EXPENSIVE=1 RUN_DOCKER=1 uv run pytest massgen/tests -v
@echo "✓ Full test lane passed"
# Format code
format:
@echo "✨ Formatting code..."
@uv run black massgen/
@uv run isort massgen/
@echo "✓ Code formatted"
# Lint code
lint:
@echo "🔍 Linting code..."
@uv run flake8 massgen/
@uv run mypy massgen/
@echo "✓ Linting passed"
# Pre-commit checks (fast)
pre-commit: docs-validate
@echo "🚀 Running pre-commit checks..."
@echo "✓ Pre-commit checks passed"
# Pre-push checks (comprehensive)
pre-push: docs-check test
@echo "🚀 Running pre-push checks..."
@echo "✓ Pre-push checks passed"