mirror of
https://github.com/langchain-ai/delta-rs.git
synced 2026-07-01 20:34:35 -04:00
4b6fd8f05e
# Description some follow up/hardening changes from the partition only delete work done recently DELETE partition only fallback and add action evaluation could materialize all actions into a single batch, which breaks on large tables Changes: - DELETE fallback uses batched partition metadata instead of single batch materialization - Shared partition metadata MemTable builder across scan and DELETE paths - Snapshot fast path for partition only column projection - add_actions coalescing streams directly into BatchCoalescer instead of pre-collecting - Python docs note get_add_actions() return type migration <!--- For example: - closes #106 ---> # Documentation <!--- Share links to useful documentation ---> --------- Signed-off-by: Ethan Urbanski <ethan@urbanskitech.com>
103 lines
3.5 KiB
Makefile
103 lines
3.5 KiB
Makefile
.DEFAULT_GOAL := help
|
|
|
|
PACKAGE_VERSION := $(shell grep version Cargo.toml | head -n 1 | awk '{print $$3}' | tr -d '"' | tr -d '-' )
|
|
PROFILE ?= dev
|
|
|
|
.PHONY: setup
|
|
setup: ## Setup the requirements
|
|
$(info --- Setup dependencies ---)
|
|
uv sync --no-install-project --all-extras
|
|
|
|
.PHONY: build
|
|
build: setup ## Build Python binding of delta-rs (default: PROFILE=dev, override with PROFILE=ci|python-release)
|
|
$(info --- Build Python binding with profile: $(PROFILE) ---)
|
|
uvx --from 'maturin[zig]' maturin build --profile $(PROFILE) $(MATURIN_EXTRA_ARGS)
|
|
|
|
.PHONY: build-release
|
|
build-release: setup ## Build Python wheel for release (uses python-release profile - maximum optimization)
|
|
$(info --- Build Python wheel with python-release profile ---)
|
|
uvx --from 'maturin[zig]' maturin build --profile python-release $(MATURIN_EXTRA_ARGS)
|
|
|
|
.PHONY: develop
|
|
develop: setup ## Install Python binding of delta-rs (default: PROFILE=dev, override with PROFILE=ci|python-release)
|
|
$(info --- Develop with Python binding with profile: $(PROFILE) ---)
|
|
uvx --from 'maturin[zig]' maturin develop --uv --profile $(PROFILE) $(MATURIN_EXTRA_ARGS)
|
|
|
|
.PHONY: install
|
|
install: build ## Install Python binding of delta-rs
|
|
$(info --- Uninstall Python binding ---)
|
|
uv pip uninstall deltalake
|
|
$(info --- Install Python binding ---)
|
|
$(eval TARGET_WHEEL := $(shell ls ../target/wheels/deltalake-${PACKAGE_VERSION}-*.whl))
|
|
uv pip install $(TARGET_WHEEL)[pandas]
|
|
|
|
.PHONY: develop-pyspark
|
|
develop-pyspark:
|
|
uv sync --all-extras --group pyspark --no-install-project
|
|
$(info --- Develop with Python binding ---)
|
|
uvx --from 'maturin[zig]' maturin develop --uv --extras=pandas $(MATURIN_EXTRA_ARGS)
|
|
|
|
.PHONY: format
|
|
format: ## Format the code
|
|
$(info --- Rust format ---)
|
|
cargo fmt
|
|
$(info --- Python format ---)
|
|
uv run --no-sync ruff check . --fix
|
|
uv run --no-sync ruff format .
|
|
|
|
.PHONY: check
|
|
check: check-rust check-python ## Run all checks for formatting, etc.
|
|
|
|
.PHONY: check-rust
|
|
check-rust: ## Run check on Rust
|
|
$(info --- Check Rust clippy ---)
|
|
cargo clippy
|
|
$(info --- Check Rust format ---)
|
|
cargo fmt -- --check
|
|
|
|
.PHONY: check-python
|
|
check-python: ## Run check on Python
|
|
$(info Check Python format)
|
|
uv run --no-sync ruff format --check --diff .
|
|
$(info Check Python linting)
|
|
uv run --no-sync ruff check .
|
|
$(info Check Python mypy)
|
|
uv run --no-sync mypy
|
|
|
|
.PHONY: unit-test
|
|
unit-test: ## Run unit test
|
|
$(info --- Run Python unit-test ---)
|
|
uv run --no-sync pytest -q -n auto --doctest-modules
|
|
|
|
.PHONY: test-cov
|
|
test-cov: ## Create coverage report
|
|
$(info --- Run Python unit-test ---)
|
|
uv run --no-sync pytest --doctest-modules --cov --cov-config=pyproject.toml --cov-report=term --cov-report=html
|
|
|
|
.PHONY: test-pyspark
|
|
test-pyspark:
|
|
uv run --no-sync pytest -m 'pyarrow and pyspark and integration'
|
|
|
|
.PHONY: build-documentation
|
|
build-documentation: ## Build documentation with Sphinx
|
|
$(info --- Run build of the Sphinx documentation ---)
|
|
uv run --no-sync sphinx-build -Wn -b html -d ./docs/build/doctrees ./docs/source ./docs/build/html
|
|
|
|
.PHONY: build-docs
|
|
build-docs: ## Build documentation with mkdocs
|
|
$(info --- Run build of the documentation ---)
|
|
(cd ..; uv pip install -r docs/requirements.txt; mkdocs build)
|
|
|
|
.PHONY: clean
|
|
clean: ## Run clean
|
|
$(warning --- Clean virtualenv and target directory ---)
|
|
cargo clean
|
|
uv cache clean
|
|
# Remove uv's venv
|
|
rm -rf .venv
|
|
find . -type f -name '*.pyc' -delete
|
|
|
|
.PHONY: help
|
|
help:
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|