Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
84 lines (54 loc) · 3.5 KB
/
Copy pathMakefile
File metadata and controls
84 lines (54 loc) · 3.5 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
# Every path CI runs ruff over. Keep this list and the ruff steps in
# .github/workflows/ci.yml identical, or `make check` passes what CI fails.
RUFF_PATHS := python/ .github/scripts/ .claude/skills/dataprof/scripts/
.PHONY: build dev build-db dev-db test test-rust test-python test-python-db test-db test-db-all test-db-live lint lint-rust lint-python fmt fmt-rust fmt-python clippy check clean
# ── Build ────────────────────────────────────────
build: ## Build the Python extension (release)
uv run maturin develop --release
dev: ## Build the Python extension (debug, fast)
uv run maturin develop
# The database targets repeat the shipped feature set on purpose: --features
# replaces [tool.maturin] features rather than extending it, so a shorter list
# builds database support while dropping async and remote Parquet.
build-db: ## Build the Python extension with database support (release)
uv run maturin develop --release --features "python,python-async,async-streaming,parquet-async,database,sqlite"
dev-db: ## Build the Python extension with database support (debug, fast)
uv run maturin develop --features "python,python-async,async-streaming,parquet-async,database,sqlite"
# ── Test ─────────────────────────────────────────
test: test-rust test-python ## Run all tests
test-rust: ## Run Rust tests
cargo test
test-python: dev ## Build and run Python tests
uv run pytest
test-python-db: dev-db ## Build with DB features and run Python database tests
uv run pytest python/tests/test_database_api.py -v -ra
test-db: ## Run Rust database integration tests (SQLite only)
cargo test --test database_integration --features "database,sqlite"
test-db-all: ## Run Rust database integration tests (all DBs, needs Docker)
cargo test --test database_integration --features "all-db"
test-db-live: ## Run live database tests with Docker containers
cd .devcontainer && bash test_live_databases.sh
# ── Lint ─────────────────────────────────────────
lint: lint-rust lint-python ## Run all linters
lint-rust: clippy ## Alias for clippy
clippy: ## Run clippy with strict warnings
cargo clippy --lib --tests --all-features -- -D warnings
lint-python: ## Run ruff linter + type check
uv run ruff check $(RUFF_PATHS)
# ── Format ───────────────────────────────────────
fmt: fmt-rust fmt-python ## Format all code
fmt-rust: ## Format Rust code
cargo fmt
fmt-python: ## Format Python code
uv run ruff format $(RUFF_PATHS)
uv run ruff check --fix $(RUFF_PATHS)
# ── Check (CI-like) ─────────────────────────────
check: fmt lint test ## Format, lint, and test everything
# ── Clean ────────────────────────────────────────
clean: ## Remove build artifacts
cargo clean
rm -rf target/ .pytest_cache/ python/dataprof/__pycache__/
# ── Help ─────────────────────────────────────────
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help