-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
143 lines (118 loc) · 3.89 KB
/
Makefile
File metadata and controls
143 lines (118 loc) · 3.89 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
.PHONY: help install install-dev test test-parallel lint format type-check clean build docs docs-serve publish
# Default target
help:
@echo "GraphFlow - Makefile commands"
@echo ""
@echo "Setup:"
@echo " make install Install package dependencies"
@echo " make install-dev Install package + dev dependencies"
@echo ""
@echo "Development:"
@echo " make format Format code with black and isort"
@echo " make lint Run linting checks"
@echo " make type-check Run type checking with mypy"
@echo " make test Run tests"
@echo " make test-unit Run unit tests only"
@echo " make test-integration Run integration tests only"
@echo " make test-performance Run performance tests only"
@echo " make test-async Run async tests only"
@echo " make test-parallel Run tests in parallel"
@echo " make test-coverage Run tests with coverage report"
@echo " make test-fast Run fast tests only (exclude slow)"
@echo " make test-all Run all tests including performance"
@echo " make test-ci Run CI test suite"
@echo ""
@echo "Documentation:"
@echo " make docs Build documentation"
@echo " make docs-serve Serve documentation locally"
@echo ""
@echo "Build & Release:"
@echo " make build Build distribution packages"
@echo " make publish Publish to PyPI"
@echo " make clean Clean build artifacts"
# Installation
install:
pip install -e .
install-dev:
pip install -e ".[dev,distributed,cloud,visualization,all]"
pip install mkdocs mkdocs-material mkdocstrings[python]
# Poetry installation (alternative)
install-poetry:
poetry install
install-poetry-dev:
poetry install --all-extras
# Code quality
format:
@echo "Formatting code with black..."
black graphflow/ tests/ examples/ --line-length 88
@echo "Sorting imports with isort..."
isort graphflow/ tests/ examples/ --profile black
lint:
@echo "Running flake8..."
flake8 graphflow/ tests/ --max-line-length 88 --extend-ignore E203,W503
@echo "Running pylint..."
pylint graphflow/ --rcfile=.pylintrc || true
type-check:
@echo "Running mypy type checks..."
mypy graphflow/ --ignore-missing-imports --python-version 3.11
# Testing
test:
@echo "Running tests..."
pytest tests/ -v
test-unit:
@echo "Running unit tests..."
pytest tests/ -v -m "unit"
test-integration:
@echo "Running integration tests..."
pytest tests/ -v -m "integration"
test-performance:
@echo "Running performance tests..."
pytest tests/ -v -m "performance"
test-async:
@echo "Running async tests..."
pytest tests/ -v -m "async"
test-parallel:
@echo "Running tests in parallel..."
pytest tests/ -v -n auto --dist loadgroup
test-coverage:
@echo "Running tests with coverage..."
pytest tests/ -v --cov=graphflow --cov-report=html --cov-report=term-missing
@echo "Coverage report generated in htmlcov/index.html"
test-fast:
@echo "Running fast tests only..."
pytest tests/ -v -m "not slow"
test-all:
@echo "Running all tests including performance..."
pytest tests/ -v
test-ci:
@echo "Running CI test suite..."
pytest tests/ -c pytest-fast.ini --cov=graphflow --cov-report=xml --cov-report=html --timeout=180
# Documentation
docs:
@echo "Building documentation..."
mkdocs build
docs-serve:
@echo "Serving documentation at http://127.0.0.1:8000"
mkdocs serve
# Build and publish
build: clean
@echo "Building distribution packages..."
python -m build
publish: build
@echo "Publishing to PyPI..."
python -m twine upload dist/*
clean:
@echo "Cleaning build artifacts..."
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf htmlcov/
rm -rf .coverage
rm -rf .pytest_cache/
rm -rf .mypy_cache/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
# Comprehensive check before commit
check: format lint type-check test-parallel
@echo "All checks passed! ✅"