Skip to content

Commit 77d874e

Browse files
committed
Merge branch 'main' of github.com:apache/iceberg-python into fd-rust
2 parents 5777fd4 + a56795f commit 77d874e

25 files changed

Lines changed: 997 additions & 631 deletions

.github/ISSUE_TEMPLATE/iceberg_bug_report.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ body:
2828
description: What Apache Iceberg version are you using?
2929
multiple: false
3030
options:
31-
- "0.9.1 (latest release)"
31+
- "0.10.0 (latest release)"
32+
- "0.9.1"
3233
- "0.9.0"
3334
- "0.8.1"
3435
- "0.8.0"

.github/workflows/nightly-pypi-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
fetch-depth: 1
3737

38-
- uses: actions/setup-python@v5
38+
- uses: actions/setup-python@v6
3939
with:
4040
python-version: 3.12
4141

.github/workflows/pypi-build-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
fetch-depth: 1
4141

42-
- uses: actions/setup-python@v5
42+
- uses: actions/setup-python@v6
4343
with:
4444
python-version: |
4545
3.9

.github/workflows/python-ci-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636

3737
steps:
3838
- uses: actions/checkout@v5
39-
- name: Install poetry
40-
run: make install-poetry
41-
- uses: actions/setup-python@v5
39+
- uses: actions/setup-python@v6
4240
with:
4341
python-version: 3.12
42+
- name: Install poetry
43+
run: make install-poetry
4444
- name: Install
4545
run: make docs-install
4646
- name: Build docs

.github/workflows/python-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ jobs:
5151

5252
steps:
5353
- uses: actions/checkout@v5
54-
- name: Install poetry
55-
run: make install-poetry
56-
- uses: actions/setup-python@v5
54+
- uses: actions/setup-python@v6
5755
with:
5856
python-version: ${{ matrix.python }}
57+
- name: Install poetry
58+
run: make install-poetry
5959
- name: Install system dependencies
6060
run: sudo apt-get update && sudo apt-get install -y libkrb5-dev # for kerberos
6161
- name: Install

.github/workflows/python-release-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131

3232
steps:
3333
- uses: actions/checkout@v5
34-
- name: Install poetry
35-
run: make install-poetry
36-
- uses: actions/setup-python@v5
34+
- uses: actions/setup-python@v6
3735
with:
3836
python-version: ${{ matrix.python }}
37+
- name: Install poetry
38+
run: make install-poetry
3939
- name: Install docs
4040
run: make docs-install
4141
- name: Build docs

.github/workflows/python-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
with:
9494
fetch-depth: 1
9595

96-
- uses: actions/setup-python@v5
96+
- uses: actions/setup-python@v6
9797
with:
9898
python-version: 3.12
9999

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
if: github.repository_owner == 'apache'
3232
runs-on: ubuntu-22.04
3333
steps:
34-
- uses: actions/stale@v9.1.0
34+
- uses: actions/stale@v10.0.0
3535
with:
3636
stale-issue-label: 'stale'
3737
exempt-issue-labels: 'not-stale'

.github/workflows/svn-build-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
fetch-depth: 1
4141

42-
- uses: actions/setup-python@v5
42+
- uses: actions/setup-python@v6
4343
with:
4444
python-version: |
4545
3.9

Makefile

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,24 @@
2121
PYTEST_ARGS ?= -v # Override with e.g. PYTEST_ARGS="-vv --tb=short"
2222
COVERAGE ?= 0 # Set COVERAGE=1 to enable coverage: make test COVERAGE=1
2323
COVERAGE_FAIL_UNDER ?= 85 # Minimum coverage % to pass: make coverage-report COVERAGE_FAIL_UNDER=70
24+
KEEP_COMPOSE ?= 0 # Set KEEP_COMPOSE=1 to keep containers after integration tests
25+
26+
PIP = python -m pip
27+
28+
POETRY_VERSION = 2.1.4
29+
POETRY = python -m poetry
2430

2531
ifeq ($(COVERAGE),1)
26-
TEST_RUNNER = poetry run coverage run --parallel-mode --source=pyiceberg -m
32+
TEST_RUNNER = $(POETRY) run coverage run --parallel-mode --source=pyiceberg -m
2733
else
28-
TEST_RUNNER = poetry run
34+
TEST_RUNNER = $(POETRY) run
2935
endif
3036

31-
POETRY_VERSION = 2.1.4
37+
ifeq ($(KEEP_COMPOSE),1)
38+
CLEANUP_COMMAND = echo "Keeping containers running for debugging (KEEP_COMPOSE=1)"
39+
else
40+
CLEANUP_COMMAND = docker compose -f dev/docker-compose-integration.yml down -v --remove-orphans 2>/dev/null || true
41+
endif
3242

3343
# ============
3444
# Help Section
@@ -46,21 +56,21 @@ help: ## Display this help message
4656
##@ Setup
4757

4858
install-poetry: ## Ensure Poetry is installed at the specified version
49-
@if ! command -v poetry &> /dev/null; then \
59+
@if ! command -v ${POETRY} &> /dev/null; then \
5060
echo "Poetry not found. Installing..."; \
51-
pip install --user poetry==$(POETRY_VERSION); \
61+
${PIP} install --user poetry==$(POETRY_VERSION); \
5262
else \
53-
INSTALLED_VERSION=$$(pip show poetry | grep Version | awk '{print $$2}'); \
63+
INSTALLED_VERSION=$$(${PIP} show poetry | grep Version | awk '{print $$2}'); \
5464
if [ "$$INSTALLED_VERSION" != "$(POETRY_VERSION)" ]; then \
5565
echo "Updating Poetry to version $(POETRY_VERSION)..."; \
56-
pip install --user --upgrade poetry==$(POETRY_VERSION); \
66+
${PIP} install --user --upgrade poetry==$(POETRY_VERSION); \
5767
else \
5868
echo "Poetry version $(POETRY_VERSION) already installed."; \
5969
fi; \
6070
fi
6171

6272
install-dependencies: ## Install all dependencies including extras
63-
poetry install --all-extras
73+
$(POETRY) install --all-extras
6474

6575
install: install-poetry install-dependencies ## Install Poetry and dependencies
6676

@@ -74,7 +84,7 @@ check-license: ## Check license headers
7484
./dev/check-license
7585

7686
lint: ## Run code linters via pre-commit
77-
poetry run pre-commit run --all-files
87+
$(POETRY) run pre-commit run --all-files
7888

7989
# ===============
8090
# Testing Section
@@ -85,7 +95,7 @@ lint: ## Run code linters via pre-commit
8595
test: ## Run all unit tests (excluding integration)
8696
$(TEST_RUNNER) pytest tests/ -m "(unmarked or parametrize) and not integration" $(PYTEST_ARGS)
8797

88-
test-integration: test-integration-setup test-integration-exec ## Run integration tests
98+
test-integration: test-integration-setup test-integration-exec test-integration-cleanup ## Run integration tests
8999

90100
test-integration-setup: ## Start Docker services for integration tests
91101
docker compose -f dev/docker-compose-integration.yml kill
@@ -98,6 +108,12 @@ test-integration-setup: ## Start Docker services for integration tests
98108
test-integration-exec: ## Run integration tests (excluding provision)
99109
$(TEST_RUNNER) pytest tests/ -m integration $(PYTEST_ARGS)
100110

111+
test-integration-cleanup: ## Clean up integration test environment
112+
@if [ "${KEEP_COMPOSE}" != "1" ]; then \
113+
echo "Cleaning up Docker containers..."; \
114+
fi
115+
$(CLEANUP_COMMAND)
116+
101117
test-integration-rebuild: ## Rebuild integration Docker services from scratch
102118
docker compose -f dev/docker-compose-integration.yml kill
103119
docker compose -f dev/docker-compose-integration.yml rm -f
@@ -119,10 +135,10 @@ test-coverage: COVERAGE=1
119135
test-coverage: test test-integration test-s3 test-adls test-gcs coverage-report ## Run all tests with coverage and report
120136

121137
coverage-report: ## Combine and report coverage
122-
poetry run coverage combine
123-
poetry run coverage report -m --fail-under=$(COVERAGE_FAIL_UNDER)
124-
poetry run coverage html
125-
poetry run coverage xml
138+
${POETRY} run coverage combine
139+
${POETRY} run coverage report -m --fail-under=$(COVERAGE_FAIL_UNDER)
140+
${POETRY} run coverage html
141+
${POETRY} run coverage xml
126142

127143
# ================
128144
# Documentation
@@ -131,13 +147,13 @@ coverage-report: ## Combine and report coverage
131147
##@ Documentation
132148

133149
docs-install: ## Install docs dependencies
134-
poetry install --with docs
150+
${POETRY} install --with docs
135151

136152
docs-serve: ## Serve local docs preview (hot reload)
137-
poetry run mkdocs serve -f mkdocs/mkdocs.yml
153+
${POETRY} run mkdocs serve -f mkdocs/mkdocs.yml
138154

139155
docs-build: ## Build the static documentation site
140-
poetry run mkdocs build -f mkdocs/mkdocs.yml --strict
156+
${POETRY} run mkdocs build -f mkdocs/mkdocs.yml --strict
141157

142158
# ===================
143159
# Project Maintenance

0 commit comments

Comments
 (0)