forked from earthtoolsmaker/aris
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (63 loc) · 2.05 KB
/
Copy pathMakefile
File metadata and controls
77 lines (63 loc) · 2.05 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
.PHONY: help install format lint test test-unit test-integration test-cov clean check all
# Default target
help:
@echo "ARIS - Sonar File Processing Toolkit"
@echo ""
@echo "Available commands:"
@echo " make install Install dependencies with uv"
@echo " make format Format code with ruff"
@echo " make lint Lint code with ruff"
@echo " make test Run all tests with pytest"
@echo " make test-unit Run unit tests only"
@echo " make test-integration Run integration tests only"
@echo " make test-cov Run tests and generate coverage report"
@echo " make check Run format check, lint, and tests"
@echo " make clean Remove generated files and caches"
@echo " make all Run check target (format check + lint + test)"
# Install dependencies
install:
uv sync
# Format code with ruff
format:
uv run ruff format src/ scripts/ tests/
# Check formatting without making changes
format-check:
uv run ruff format --check src/ scripts/ tests/
# Lint code with ruff
lint:
uv run ruff check src/ scripts/ tests/
# Lint and automatically fix issues
lint-fix:
uv run ruff check --fix src/ scripts/ tests/
# Run all tests
test:
uv run pytest
# Run unit tests only
test-unit:
uv run pytest tests/unit/
# Run integration tests only
test-integration:
uv run pytest tests/integration/
# Run tests with coverage report
test-cov:
uv run pytest --cov=src/aris --cov-report=term-missing --cov-report=html
# Run tests excluding slow tests
test-fast:
uv run pytest -m "not slow"
# Check everything (format check, lint, test)
check: format-check lint test
# Run all quality checks and fixes
all: format lint test
# Clean generated files
clean:
rm -rf .pytest_cache
rm -rf htmlcov
rm -rf .coverage
rm -rf .ruff_cache
rm -rf dist
rm -rf build
rm -rf *.egg-info
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
find . -type f -name "*.orig" -delete