Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
130 lines (107 loc) · 3.15 KB
/
Copy pathMakefile
File metadata and controls
130 lines (107 loc) · 3.15 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
# Lo-phi Development Makefile
# Usage: make <target>
.PHONY: all test test-unit test-integration test-verbose lint fmt check-fmt check build release clean gen-test-data help
# Default target
all: check
# Run all tests
test:
cargo test --all-features
# Run only unit tests (library tests)
test-unit:
cargo test --lib --all-features
# Run only integration tests
test-integration:
cargo test --test '*' --all-features
# Run tests with output visible (for debugging)
test-verbose:
cargo test --all-features -- --nocapture
# Run a specific test by name
# Usage: make test-one TEST=test_name
test-one:
cargo test --all-features $(TEST) -- --nocapture
# Lint with clippy
lint:
cargo clippy --all-targets --all-features -- -D warnings
# Format code
fmt:
cargo fmt
# Check formatting without modifying
check-fmt:
cargo fmt -- --check
# Full CI check locally (format + lint + test)
check: check-fmt lint test
@echo ""
@echo "✓ All checks passed!"
# Build debug binary
build:
cargo build
# Build release binary
release:
cargo build --release
# Clean build artifacts
clean:
cargo clean
# Generate small test data for development
gen-test-data:
python scripts/generate_test_data.py \
--rows 1000 \
--num-cols 50 \
--cat-cols 10 \
--correlated-pairs 5 \
--high-missing-cols 3 \
--base-name small_test
# Generate large test data for benchmarking
gen-test-data-large:
python scripts/generate_test_data.py \
--rows 100000 \
--num-cols 500 \
--cat-cols 50 \
--correlated-pairs 20 \
--high-missing-cols 10 \
--base-name large_test
# Run the tool on test data
run-test:
cargo run -- -i test_data/small_test.parquet -t target --no-confirm
# Watch for changes and run tests (requires cargo-watch)
watch:
cargo watch -x test
# Show test coverage (requires cargo-tarpaulin)
coverage:
cargo tarpaulin --out Html --output-dir coverage
# Update dependencies
update:
cargo update
# Check for outdated dependencies (requires cargo-outdated)
outdated:
cargo outdated
# Show help
help:
@echo "Lo-phi Development Commands"
@echo ""
@echo "Testing:"
@echo " make test - Run all tests"
@echo " make test-unit - Run only unit tests"
@echo " make test-integration- Run only integration tests"
@echo " make test-verbose - Run tests with output"
@echo " make test-one TEST=x - Run specific test"
@echo ""
@echo "Code Quality:"
@echo " make lint - Run clippy linter"
@echo " make fmt - Format code"
@echo " make check-fmt - Check formatting"
@echo " make check - Full CI check (fmt + lint + test)"
@echo ""
@echo "Building:"
@echo " make build - Build debug binary"
@echo " make release - Build release binary"
@echo " make clean - Clean build artifacts"
@echo ""
@echo "Data Generation:"
@echo " make gen-test-data - Generate small test dataset"
@echo " make gen-test-data-large- Generate large test dataset"
@echo ""
@echo "Other:"
@echo " make run-test - Run tool on test data"
@echo " make watch - Watch and run tests on changes"
@echo " make coverage - Generate coverage report"
@echo " make help - Show this help"