Skip to content

Commit d9e79c5

Browse files
authored
Merge branch 'main' into refactor/writer-async
2 parents 2353a21 + 666179e commit d9e79c5

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
set +e
3+
TEST_NAME=$1
4+
MAX_RETRIES=$2
5+
RETRY_DELAY=$3
6+
ATTEMPT=1
7+
run_command() {
8+
uv run --no-sync pytest -m "($TEST_NAME and integration)" --doctest-modules 2>&1
9+
}
10+
until [ $ATTEMPT -gt $MAX_RETRIES ]
11+
do
12+
echo "Attempt $ATTEMPT"
13+
OUTPUT=$(run_command)
14+
EXIT_CODE=$?
15+
echo "$OUTPUT"
16+
if [ $EXIT_CODE -eq 0 ]; then
17+
echo "Tests passed."
18+
exit 0
19+
fi
20+
echo "Failed. Retrying."
21+
ATTEMPT=$((ATTEMPT+1))
22+
sleep $RETRY_DELAY
23+
done
24+
if [ $ATTEMPT -gt $MAX_RETRIES ]; then
25+
echo "Tests failed after $MAX_RETRIES attempts."
26+
exit 1
27+
fi

.github/workflows/python_build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
run: make setup-dat
138138

139139
- name: Run tests
140-
run: uv run --no-sync pytest -m '(unitycatalog_databricks and integration)' --doctest-modules
140+
run: ../../delta-rs/.github/scripts/retry_integration_test.sh unitycatalog_databricks 5 10
141141

142142
test-unitycatalog-oss:
143143
name: Python Build (Python 3.10 Unity Catalog Integration tests)
@@ -166,7 +166,7 @@ jobs:
166166
run: make setup-dat
167167

168168
- name: Run tests
169-
run: uv run --no-sync pytest -m '(unitycatalog_oss and integration)' --doctest-modules
169+
run: ../../delta-rs/.github/scripts/retry_integration_test.sh unitycatalog_oss 5 10
170170

171171
test-pyspark:
172172
name: PySpark Integration Tests
@@ -192,7 +192,6 @@ jobs:
192192
- name: Run tests
193193
run: make test-pyspark
194194

195-
196195
multi-python-running:
197196
name: Running with Python ${{ matrix.python-version }}
198197
runs-on: ubuntu-latest

CONTRIBUTING.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,22 @@ If you want to claim an issue to work on, you can write the word `take` as a com
1515
## Quick start
1616

1717
- Install Rust, e.g. as described [here](https://doc.rust-lang.org/cargo/getting-started/installation.html)
18-
- Have a compatible Python version installed (check `python/pyproject.toml` for current requirement)
19-
- 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/)
20-
```sh
21-
python -m venv .venv
22-
```
18+
- Install the [uv Python package manager](https://docs.astral.sh/uv/getting-started/installation/).
2319

24-
- 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)
20+
- Build the project for development. This will install `deltalake` into the Python virtual environment managed by uv.
2521
```sh
2622
cd python
2723
make develop
2824
```
2925

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

3531
- Run some Rust code, e.g. run an example
3632
```sh
37-
cd crates/deltalake
33+
cd ../crates/deltalake
3834
cargo run --example basic_operations --features="datafusion"
3935
```
4036

python/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,14 @@ tokio = { workspace = true, features = ["rt-multi-thread"] }
4343

4444
deltalake-mount = { path = "../crates/mount" }
4545

46+
# catalog-unity
47+
deltalake-catalog-unity = { path = "../crates/catalog-unity", features = ["aws", "azure", "gcp", "r2"] }
48+
4649
# Non-unix or emscripten os
4750
[target.'cfg(any(not(target_family = "unix"), target_os = "emscripten"))'.dependencies]
4851
mimalloc = { version = "0.1", default-features = false }
4952

50-
# Unix (excluding macOS & emscripten) → jemalloc
53+
# Unix (excluding macOS & emscripten) → jemalloc
5154
[target.'cfg(all(target_family = "unix", not(target_os = "macos"), not(target_os = "emscripten")))'.dependencies]
5255
jemallocator = { version = "0.5", features = ["disable_initial_exec_tls", "background_threads"] }
5356

python/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.DEFAULT_GOAL := help
22

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

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

102101
.PHONY: help

0 commit comments

Comments
 (0)