Skip to content

Commit

Permalink
Update CONTRIBUTING.md and Makefile to account for switch to uv
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Reeve <[email protected]>
  • Loading branch information
adamreeve committed Feb 24, 2025
1 parent a82aedd commit 48fc7b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 4 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,22 @@ If you want to claim an issue to work on, you can write the word `take` as a com
## Quick start

- Install Rust, e.g. as described [here](https://doc.rust-lang.org/cargo/getting-started/installation.html)
- Have a compatible Python version installed (check `python/pyproject.toml` for current requirement)
- Create a Python virtual environment (required for development builds), e.g. as described [here](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/)
```sh
python -m venv .venv
```
- Install the [uv Python package manager](https://docs.astral.sh/uv/getting-started/installation/).

- Build the project for development (this requires an active virtual environment and will also install `deltalake` in that virtual environment. [Uv](https://github.com/astral-sh/uv) packet manager needs to be installed)
- Build the project for development. This will install `deltalake` into the Python virtual environment managed by uv.
```sh
cd python
make develop
```

- Run some Python code, e.g. to run a specific test
```sh
python -m pytest tests/test_writer.py -s -k "test_with_deltalake_schema"
uv run pytest tests/test_writer.py -s -k "test_with_deltalake_schema"
```

- Run some Rust code, e.g. run an example
```sh
cd crates/deltalake
cd ../crates/deltalake
cargo run --example basic_operations --features="datafusion"
```

Expand Down
5 changes: 2 additions & 3 deletions python/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.DEFAULT_GOAL := help

VENV := venv
MATURIN_VERSION := $(shell grep 'requires =' pyproject.toml | cut -d= -f2- | tr -d '[ "]')
PACKAGE_VERSION := $(shell grep version Cargo.toml | head -n 1 | awk '{print $$3}' | tr -d '"' )
DAT_VERSION := 0.0.2

Expand Down Expand Up @@ -96,7 +94,8 @@ build-docs: ## Build documentation with mkdocs
clean: ## Run clean
$(warning --- Clean virtualenv and target directory ---)
cargo clean
rm -rf $(VENV)
# Remove uv's venv
rm -rf .venv
find . -type f -name '*.pyc' -delete

.PHONY: help
Expand Down

0 comments on commit 48fc7b8

Please sign in to comment.