From a854129fdcf380b26985f7da0153e2765d3769be Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Wed, 28 Jan 2026 22:06:40 -0800 Subject: [PATCH 1/6] allow rerun `make install` without prompt --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7e67a981f7..d19d77d6ba 100644 --- a/Makefile +++ b/Makefile @@ -66,11 +66,15 @@ install-uv: ## Ensure uv is installed echo "uv is already installed."; \ fi -setup-venv: ## Create virtual environment - uv venv $(PYTHON_ARG) +setup-venv: ## Create virtual environment (if not exists) + @if [ ! -d ".venv" ]; then \ + uv venv $(PYTHON_ARG); \ + else \ + echo "Virtual environment already exists at .venv"; \ + fi install-dependencies: setup-venv ## Install all dependencies including extras - uv sync $(PYTHON_ARG) --all-extras --reinstall + uv sync $(PYTHON_ARG) --all-extras install-hooks: ## Install pre-commit hooks uv run $(PYTHON_ARG) prek install From 24e0033a7932e527d0712e9626230cd7839d952c Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Wed, 28 Jan 2026 22:33:13 -0800 Subject: [PATCH 2/6] let uv handle venv --- Makefile | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index d19d77d6ba..b84ca9ed3d 100644 --- a/Makefile +++ b/Makefile @@ -66,21 +66,10 @@ install-uv: ## Ensure uv is installed echo "uv is already installed."; \ fi -setup-venv: ## Create virtual environment (if not exists) - @if [ ! -d ".venv" ]; then \ - uv venv $(PYTHON_ARG); \ - else \ - echo "Virtual environment already exists at .venv"; \ - fi - -install-dependencies: setup-venv ## Install all dependencies including extras +install: install-uv ## Install uv, dependencies, and pre-commit hooks uv sync $(PYTHON_ARG) --all-extras - -install-hooks: ## Install pre-commit hooks uv run $(PYTHON_ARG) prek install -install: install-uv install-dependencies install-hooks ## Install uv, dependencies, and pre-commit hooks - # =============== # Code Validation # =============== @@ -104,7 +93,7 @@ test: ## Run all unit tests (excluding integration) test-integration: test-integration-setup test-integration-exec test-integration-cleanup ## Run integration tests -test-integration-setup: install ## Start Docker services for integration tests +test-integration-setup: ## Start Docker services for integration tests docker compose -f dev/docker-compose-integration.yml kill docker compose -f dev/docker-compose-integration.yml rm -f docker compose -f dev/docker-compose-integration.yml up -d --build --wait @@ -151,14 +140,11 @@ coverage-report: ## Combine and report coverage ##@ Documentation -docs-install: ## Install docs dependencies (included in default groups) - uv sync $(PYTHON_ARG) --group docs - docs-serve: ## Serve local docs preview (hot reload) - uv run $(PYTHON_ARG) mkdocs serve -f mkdocs/mkdocs.yml --livereload + uv run $(PYTHON_ARG) --group docs mkdocs serve -f mkdocs/mkdocs.yml --livereload docs-build: ## Build the static documentation site - uv run $(PYTHON_ARG) mkdocs build -f mkdocs/mkdocs.yml --strict + uv run $(PYTHON_ARG) --group docs mkdocs build -f mkdocs/mkdocs.yml --strict # ======================== # Experimentation @@ -166,14 +152,11 @@ docs-build: ## Build the static documentation site ##@ Experimentation -notebook-install: ## Install notebook dependencies - uv sync $(PYTHON_ARG) --all-extras --group notebook - -notebook: notebook-install ## Launch notebook for experimentation - uv run jupyter lab --notebook-dir=notebooks +notebook: ## Launch notebook for experimentation + uv run $(PYTHON_ARG) --all-extras --group notebook jupyter lab --notebook-dir=notebooks -notebook-infra: notebook-install test-integration-setup ## Launch notebook with integration test infra (Spark, Iceberg Rest Catalog, object storage, etc.) - uv run jupyter lab --notebook-dir=notebooks +notebook-infra: test-integration-setup ## Launch notebook with integration test infra (Spark, Iceberg Rest Catalog, object storage, etc.) + uv run $(PYTHON_ARG) --all-extras --group notebook jupyter lab --notebook-dir=notebooks # =================== # Project Maintenance From 16dfc52adea9479bcf40fd5230cea3a97b551b69 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Thu, 29 Jan 2026 07:52:25 -0800 Subject: [PATCH 3/6] conditionally reinstall package --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index b84ca9ed3d..3854640de9 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,11 @@ install-uv: ## Ensure uv is installed install: install-uv ## Install uv, dependencies, and pre-commit hooks uv sync $(PYTHON_ARG) --all-extras + @# Reinstall pyiceberg if Cython extensions (.so) are missing after `make clean` (see #2869) + @if ! find pyiceberg -name "*.so" 2>/dev/null | grep -q .; then \ + echo "Cython extensions not found, reinstalling pyiceberg..."; \ + uv sync $(PYTHON_ARG) --all-extras --reinstall-package pyiceberg; \ + fi uv run $(PYTHON_ARG) prek install # =============== From c07a9f9702a310f408fd3200d96566c9e0650e2f Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Thu, 29 Jan 2026 07:56:18 -0800 Subject: [PATCH 4/6] fix ci --- .github/workflows/python-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index be2ab64286..eb3f726563 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -62,7 +62,7 @@ jobs: - name: Install system dependencies run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos - name: Install - run: make install-dependencies + run: make install - name: Run linters run: make lint - name: Run unit tests with coverage From d0174759192d211034ad5925a7d23921f5d1d512 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Thu, 29 Jan 2026 08:01:01 -0800 Subject: [PATCH 5/6] fix ci again --- .github/workflows/python-ci-docs.yml | 2 -- .github/workflows/python-release-docs.yml | 2 -- mkdocs/README.md | 1 - 3 files changed, 5 deletions(-) diff --git a/.github/workflows/python-ci-docs.yml b/.github/workflows/python-ci-docs.yml index 6b3fc7f4b2..db7b02668c 100644 --- a/.github/workflows/python-ci-docs.yml +++ b/.github/workflows/python-ci-docs.yml @@ -41,8 +41,6 @@ jobs: python-version: 3.12 - name: Install UV uses: astral-sh/setup-uv@v7 - - name: Install - run: make docs-install - name: Build docs run: make docs-build - name: Run linters diff --git a/.github/workflows/python-release-docs.yml b/.github/workflows/python-release-docs.yml index 1706ab96fe..40cb300746 100644 --- a/.github/workflows/python-release-docs.yml +++ b/.github/workflows/python-release-docs.yml @@ -36,8 +36,6 @@ jobs: python-version: ${{ matrix.python }} - name: Install UV uses: astral-sh/setup-uv@v7 - - name: Install docs - run: make docs-install - name: Build docs run: make docs-build - name: Copy diff --git a/mkdocs/README.md b/mkdocs/README.md index 271025a726..f20a2ed152 100644 --- a/mkdocs/README.md +++ b/mkdocs/README.md @@ -22,6 +22,5 @@ The pyiceberg docs are stored in `docs/`. ## Running docs locally ```sh -make docs-install make docs-serve ``` From 0eaa3eca02858d2302a8179b44f1402048650a88 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Thu, 29 Jan 2026 08:47:14 -0800 Subject: [PATCH 6/6] add back --- .github/workflows/python-ci-docs.yml | 2 ++ .github/workflows/python-release-docs.yml | 2 ++ Makefile | 20 +++++++++++++------- mkdocs/README.md | 1 + 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-ci-docs.yml b/.github/workflows/python-ci-docs.yml index db7b02668c..6b3fc7f4b2 100644 --- a/.github/workflows/python-ci-docs.yml +++ b/.github/workflows/python-ci-docs.yml @@ -41,6 +41,8 @@ jobs: python-version: 3.12 - name: Install UV uses: astral-sh/setup-uv@v7 + - name: Install + run: make docs-install - name: Build docs run: make docs-build - name: Run linters diff --git a/.github/workflows/python-release-docs.yml b/.github/workflows/python-release-docs.yml index 40cb300746..1706ab96fe 100644 --- a/.github/workflows/python-release-docs.yml +++ b/.github/workflows/python-release-docs.yml @@ -36,6 +36,8 @@ jobs: python-version: ${{ matrix.python }} - name: Install UV uses: astral-sh/setup-uv@v7 + - name: Install docs + run: make docs-install - name: Build docs run: make docs-build - name: Copy diff --git a/Makefile b/Makefile index 3854640de9..22bcfd545b 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ test: ## Run all unit tests (excluding integration) test-integration: test-integration-setup test-integration-exec test-integration-cleanup ## Run integration tests -test-integration-setup: ## Start Docker services for integration tests +test-integration-setup: install ## Start Docker services for integration tests docker compose -f dev/docker-compose-integration.yml kill docker compose -f dev/docker-compose-integration.yml rm -f docker compose -f dev/docker-compose-integration.yml up -d --build --wait @@ -145,11 +145,14 @@ coverage-report: ## Combine and report coverage ##@ Documentation +docs-install: ## Install docs dependencies (included in default groups) + uv sync $(PYTHON_ARG) --group docs + docs-serve: ## Serve local docs preview (hot reload) - uv run $(PYTHON_ARG) --group docs mkdocs serve -f mkdocs/mkdocs.yml --livereload + uv run $(PYTHON_ARG) mkdocs serve -f mkdocs/mkdocs.yml --livereload docs-build: ## Build the static documentation site - uv run $(PYTHON_ARG) --group docs mkdocs build -f mkdocs/mkdocs.yml --strict + uv run $(PYTHON_ARG) mkdocs build -f mkdocs/mkdocs.yml --strict # ======================== # Experimentation @@ -157,11 +160,14 @@ docs-build: ## Build the static documentation site ##@ Experimentation -notebook: ## Launch notebook for experimentation - uv run $(PYTHON_ARG) --all-extras --group notebook jupyter lab --notebook-dir=notebooks +notebook-install: ## Install notebook dependencies + uv sync $(PYTHON_ARG) --all-extras --group notebook + +notebook: notebook-install ## Launch notebook for experimentation + uv run jupyter lab --notebook-dir=notebooks -notebook-infra: test-integration-setup ## Launch notebook with integration test infra (Spark, Iceberg Rest Catalog, object storage, etc.) - uv run $(PYTHON_ARG) --all-extras --group notebook jupyter lab --notebook-dir=notebooks +notebook-infra: notebook-install test-integration-setup ## Launch notebook with integration test infra (Spark, Iceberg Rest Catalog, object storage, etc.) + uv run jupyter lab --notebook-dir=notebooks # =================== # Project Maintenance diff --git a/mkdocs/README.md b/mkdocs/README.md index f20a2ed152..271025a726 100644 --- a/mkdocs/README.md +++ b/mkdocs/README.md @@ -22,5 +22,6 @@ The pyiceberg docs are stored in `docs/`. ## Running docs locally ```sh +make docs-install make docs-serve ```