@@ -23,15 +23,10 @@ COVERAGE ?= 0 # Set COVERAGE=1 to enable coverage: make test COVERAGE=1
2323COVERAGE_FAIL_UNDER ?= 85 # Minimum coverage % to pass: make coverage-report COVERAGE_FAIL_UNDER=70
2424KEEP_COMPOSE ?= 0 # Set KEEP_COMPOSE=1 to keep containers after integration tests
2525
26- PIP = python -m pip
27-
28- POETRY_VERSION = 2.2.1
29- POETRY = python -m poetry
30-
3126ifeq ($(COVERAGE ) ,1)
32- TEST_RUNNER = $( POETRY ) run coverage run --parallel-mode --source=pyiceberg -m
27+ TEST_RUNNER = uv run coverage run --parallel-mode --source=pyiceberg -m
3328else
34- TEST_RUNNER = $( POETRY ) run
29+ TEST_RUNNER = uv run
3530endif
3631
3732ifeq ($(KEEP_COMPOSE ) ,1)
@@ -55,24 +50,26 @@ help: ## Display this help message
5550
5651# #@ Setup
5752
58- install-poetry : # # Ensure Poetry is installed at the specified version
59- @if ! command -v ${POETRY} & > /dev/null; then \
60- echo " Poetry not found. Installing..." ; \
61- ${PIP} install poetry==$(POETRY_VERSION ) ; \
53+ install-uv : # # Ensure uv is installed
54+ @if ! command -v uv & > /dev/null; then \
55+ echo " uv not found. Installing..." ; \
56+ curl -LsSf https://astral.sh/uv/install.sh | sh; \
57+ else \
58+ echo " uv is already installed." ; \
59+ fi
60+
61+ setup-venv : # # Create virtual environment
62+ @if [ ! -d .venv ]; then \
63+ echo " Creating virtual environment." ; \
64+ uv venv --python $(PYTHON_VERSION ) ; \
6265 else \
63- INSTALLED_VERSION=$$(${PIP} show poetry | grep Version | awk '{print $$2}' ) ; \
64- if [ " $$ INSTALLED_VERSION" != " $( POETRY_VERSION) " ]; then \
65- echo " Updating Poetry to version $( POETRY_VERSION) ..." ; \
66- ${PIP} install --upgrade poetry==$(POETRY_VERSION ) ; \
67- else \
68- echo " Poetry version $( POETRY_VERSION) already installed." ; \
69- fi ; \
66+ echo " Virtual environment already exists." ; \
7067 fi
7168
72- install-dependencies : # # Install all dependencies including extras
73- $( POETRY ) install --all-extras
69+ install-dependencies : setup-venv # # Install all dependencies including extras
70+ uv sync --all-extras
7471
75- install : install-poetry install-dependencies # # Install Poetry and dependencies
72+ install : install-uv install-dependencies # # Install uv and dependencies
7673
7774# ===============
7875# Code Validation
@@ -84,7 +81,7 @@ check-license: ## Check license headers
8481 ./dev/check-license
8582
8683lint : # # Run code linters via prek (pre-commit hooks)
87- $( POETRY ) run prek run -a
84+ uv run prek run -a
8885
8986# ===============
9087# Testing Section
@@ -101,7 +98,7 @@ test-integration-setup: ## Start Docker services for integration tests
10198 docker compose -f dev/docker-compose-integration.yml kill
10299 docker compose -f dev/docker-compose-integration.yml rm -f
103100 docker compose -f dev/docker-compose-integration.yml up -d --wait
104- $( POETRY ) run python dev/provision.py
101+ uv run python dev/provision.py
105102
106103test-integration-exec : # # Run integration tests (excluding provision)
107104 $(TEST_RUNNER ) pytest tests/ -m integration $(PYTEST_ARGS )
@@ -133,25 +130,25 @@ test-coverage: COVERAGE=1
133130test-coverage : test test-integration test-s3 test-adls test-gcs coverage-report # # Run all tests with coverage and report
134131
135132coverage-report : # # Combine and report coverage
136- ${POETRY} run coverage combine
137- ${POETRY} run coverage report -m --fail-under=$(COVERAGE_FAIL_UNDER )
138- ${POETRY} run coverage html
139- ${POETRY} run coverage xml
133+ uv run coverage combine
134+ uv run coverage report -m --fail-under=$(COVERAGE_FAIL_UNDER )
135+ uv run coverage html
136+ uv run coverage xml
140137
141138# ================
142139# Documentation
143140# ================
144141
145142# #@ Documentation
146143
147- docs-install : # # Install docs dependencies
148- ${POETRY} install --with docs
144+ docs-install : # # Install docs dependencies (included in default groups)
145+ uv sync --group docs
149146
150147docs-serve : # # Serve local docs preview (hot reload)
151- ${POETRY} run mkdocs serve -f mkdocs/mkdocs.yml
148+ uv run mkdocs serve -f mkdocs/mkdocs.yml
152149
153150docs-build : # # Build the static documentation site
154- ${POETRY} run mkdocs build -f mkdocs/mkdocs.yml --strict
151+ uv run mkdocs build -f mkdocs/mkdocs.yml --strict
155152
156153# ===================
157154# Project Maintenance
@@ -161,7 +158,7 @@ docs-build: ## Build the static documentation site
161158
162159clean : # # Remove build artifacts and caches
163160 @echo " Cleaning up Cython and Python cached files..."
164- @rm -rf build dist * .egg-info
161+ @rm -rf build dist * .egg-info .venv
165162 @find . -name " *.so" -exec echo Deleting {} \; -delete
166163 @find . -name " *.pyc" -exec echo Deleting {} \; -delete
167164 @find . -name " __pycache__" -exec echo Deleting {} \; -exec rm -rf {} +
0 commit comments