.PHONY: build test test-rust test-python sparkless-parity bench-python clean check fmt clippy audit outdated deny all
export RUSTUP_TOOLCHAIN ?= stable
build:
cargo build
build-release:
cargo build --release
test-rust:
cargo test
test-python:
@if [ ! -d .venv ]; then python3 -m venv .venv; fi
. .venv/bin/activate && pip install -q maturin pytest && maturin develop --features pyo3
. .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; \
fi
cargo test pyspark_parity_fixtures
check: fmt clippy audit deny test-rust
@echo "All checks passed"
check-full: check 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/