forked from meta-pytorch/tritonparse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (49 loc) · 1.72 KB
/
Makefile
File metadata and controls
59 lines (49 loc) · 1.72 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
# Makefile for tritonparse project
.PHONY: help format format-check lint lint-check test test-cuda clean install-dev
# Default target
help:
@echo "Available targets:"
@echo " format - Format all Python files"
@echo " format-check - Check formatting without making changes"
@echo " lint - Run all linters"
@echo " lint-check - Check linting without making changes"
@echo " test - Run tests (CPU only)"
@echo " test-cuda - Run tests (including CUDA tests)"
@echo " clean - Clean up cache files"
@echo " install-dev - Install development dependencies"
# Formatting targets
format:
@echo "Running format fix script..."
python -m tritonparse.tools.format_fix --verbose
format-check:
@echo "Checking formatting..."
python -m tritonparse.tools.format_fix --check-only --verbose
# Linting targets
lint:
@echo "Running linters..."
ruff check .
black --check .
lint-check:
@echo "Checking linting..."
ruff check --diff .
black --check --diff .
# Testing targets
test:
@echo "Running tests (CPU only)..."
pytest tests/ -v -m "not cuda"
test-cuda:
@echo "Running all tests (including CUDA)..."
pytest tests/ -v
# Utility targets
clean:
@echo "Cleaning up cache files..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type f -name "*.pyo" -delete 2>/dev/null || true
find . -type f -name ".coverage" -delete 2>/dev/null || true
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
install-dev:
@echo "Installing development dependencies..."
pip install -e ".[test]"
pip install black usort ruff