This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-python.git
The following commit(s) were added to refs/heads/main by this push:
new 251fa3f7 infra: simplify Makefile and uv (#2996)
251fa3f7 is described below
commit 251fa3f7acb1f434a1df7abc3aa529d7d204d4dc
Author: Kevin Liu <[email protected]>
AuthorDate: Fri Feb 20 15:21:15 2026 -0500
infra: simplify Makefile and uv (#2996)
<!--
Thanks for opening a pull request!
-->
<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->
# Rationale for this change
* Simplify the Makefile by leveraging `uv run --group` to auto-install
dependencies on demand, eliminating the need for separate install
targets. Dependencies are automatically installed on first use
* Add `.PHONY` declarations - Prevents issues if files with target names
exist
* Add `.DEFAULT_GOAL := help` - Running `make` without arguments now
shows the help message
## Are these changes tested?
## Are there any user-facing changes?
<!-- In the case of user-facing changes, please add the changelog label.
-->
---
.github/workflows/python-ci-docs.yml | 2 --
.github/workflows/python-release-docs.yml | 2 --
Makefile | 27 +++++++++++++++------------
mkdocs/README.md | 1 -
4 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/.github/workflows/python-ci-docs.yml
b/.github/workflows/python-ci-docs.yml
index 6b3fc7f4..db7b0266 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 1706ab96..40cb3007 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/Makefile b/Makefile
index ac213d84..032832c8 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+.PHONY: help install install-uv check-license lint \
+ test test-integration test-integration-setup test-integration-exec
test-integration-cleanup test-integration-rebuild \
+ test-s3 test-adls test-gcs test-coverage coverage-report \
+ docs-serve docs-build notebook notebook-infra \
+ clean uv-lock uv-lock-check
+
+.DEFAULT_GOAL := help
# ========================
# Configuration Variables
# ========================
@@ -149,14 +156,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
@@ -164,14 +168,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
@@ -189,6 +190,8 @@ clean: ## Remove build artifacts and caches
@find . -name "*.pyo" -exec echo Deleting {} \; -delete
@echo "Cleaning up Jupyter notebook checkpoints..."
@find . -name ".ipynb_checkpoints" -exec echo Deleting {} \; -exec rm
-rf {} +
+ @echo "Cleaning up coverage files..."
+ @rm -rf .coverage .coverage.* htmlcov/ coverage.xml
@echo "Cleanup complete."
uv-lock: ## Regenerate uv.lock file from pyproject.toml
diff --git a/mkdocs/README.md b/mkdocs/README.md
index 271025a7..f20a2ed1 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
```