.PHONY: build test test-rust test-python sparkless-parity bench-python clean check check-full fmt clippy audit outdated deny lint-python all
export RUSTUP_TOOLCHAIN ?= stable
build:
cargo build
build-release:
cargo build --release
test-rust:
cargo test
lint-python:
@if [ ! -d .venv ]; then python3 -m venv .venv; fi
. .venv/bin/activate && pip install -q ruff 'mypy>=1.4,<1.10' && ruff format --check . && ruff check . && mypy .
test-python:
@if [ ! -d .venv ]; then python3 -m venv .venv; fi
. .venv/bin/activate && pip install -q maturin pytest && maturin develop --features "pyo3,sql,delta"
. .venv/bin/activate && pytest tests/python/ -v
test: test-rust test-python
bench-python:
@if [ ! -d .venv-sparkless ]; then python3 -m venv .venv-sparkless; fi
. .venv-sparkless/bin/activate && pip install -q maturin sparkless && maturin develop --features pyo3
. .venv-sparkless/bin/activate && python scripts/bench_robin_vs_sparkless.py
sparkless-parity:
@if [ -n "$$SPARKLESS_EXPECTED_OUTPUTS" ]; then \
mkdir -p tests/fixtures/converted; \
python3 tests/convert_sparkless_fixtures.py --batch "$$SPARKLESS_EXPECTED_OUTPUTS" tests/fixtures --output-subdir converted --dedupe; \
python3 tests/regenerate_expected_from_pyspark.py tests/fixtures/converted 2>/dev/null || true; \
fi
cargo test pyspark_parity_fixtures
check: fmt clippy audit deny test-rust
@echo "All checks passed"
check-full: check lint-python test-python
@echo "All checks including Python passed"
fmt:
cargo fmt
@echo "Formatted"
fmt-check:
cargo fmt --check
clippy:
cargo clippy -- -D warnings
audit:
cargo audit
outdated:
cargo outdated
deny:
cargo deny check advisories bans sources
all: check
@echo "All updates and checks complete"
clean:
cargo clean
rm -rf target/