Skip to content

Commit d02aff8

Browse files
authored
Merge branch 'main' into fd-avro-pyiceberg
2 parents 24b02e3 + 40b055a commit d02aff8

File tree

147 files changed

+8513
-4757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+8513
-4757
lines changed

.github/workflows/bindings_python_ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v4
3737
- name: Check format
38+
working-directory: "bindings/python"
3839
run: cargo fmt --all -- --check
3940
- name: Check clippy
41+
working-directory: "bindings/python"
4042
run: cargo clippy --all-targets --all-features -- -D warnings
4143

4244
check-python:

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ concurrency:
3030
cancel-in-progress: true
3131

3232
env:
33-
rust_msrv: "1.84.0"
33+
rust_msrv: "1.85.0"
3434

3535
jobs:
3636
check:
@@ -118,11 +118,11 @@ jobs:
118118
- name: Maximize build space
119119
uses: easimon/maximize-build-space@master
120120
with:
121-
remove-dotnet: 'true'
122-
remove-android: 'true'
123-
remove-haskell: 'true'
124-
remove-codeql: 'true'
125-
remove-docker-images: 'true'
121+
remove-dotnet: "true"
122+
remove-android: "true"
123+
remove-haskell: "true"
124+
remove-codeql: "true"
125+
remove-docker-images: "true"
126126
root-reserve-mb: 10240
127127
temp-reserve-mb: 10240
128128

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ name: Publish
2020
on:
2121
push:
2222
tags:
23-
- '*'
23+
- "*"
2424
workflow_dispatch:
2525

2626
env:
27-
rust_msrv: "1.77.1"
27+
rust_msrv: "1.85"
2828

2929
jobs:
3030
publish:
@@ -57,4 +57,4 @@ jobs:
5757
if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-') }}
5858
run: cargo publish --all-features
5959
env:
60-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
60+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/release_python.yml

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@
1818
name: Publish Python 🐍 distribution 📦 to PyPI
1919

2020
on:
21-
push:
22-
tags:
23-
- '*'
24-
pull_request:
25-
branches:
26-
- main
27-
paths:
28-
- ".github/workflows/release_python.yml"
21+
workflow_run:
22+
workflows: ["Publish"] # Trigger this workflow after the "publish.yml" workflow completes
23+
types:
24+
- completed
2925
workflow_dispatch:
3026

3127
env:
32-
rust_msrv: "1.77.1"
28+
rust_msrv: "1.85"
3329

3430
concurrency:
3531
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
@@ -39,8 +35,16 @@ permissions:
3935
contents: read
4036

4137
jobs:
38+
check-cargo-publish:
39+
runs-on: ubuntu-latest
40+
# Only run if the triggering workflow succeeded OR if manually triggered
41+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
42+
steps:
43+
- run: echo 'The Publish workflow passed or was manually triggered'
44+
4245
sdist:
4346
runs-on: ubuntu-latest
47+
needs: [check-cargo-publish]
4448
steps:
4549
- uses: actions/checkout@v4
4650
- uses: PyO3/maturin-action@v1
@@ -56,60 +60,65 @@ jobs:
5660

5761
wheels:
5862
runs-on: "${{ matrix.os }}"
63+
needs: [check-cargo-publish]
5964
strategy:
6065
matrix:
6166
include:
6267
- { os: windows-latest }
6368
- { os: macos-latest, target: "universal2-apple-darwin" }
6469
- { os: ubuntu-latest, target: "x86_64" }
65-
- { os: ubuntu-latest, target: "aarch64", manylinux: "manylinux_2_28" }
70+
- {
71+
os: ubuntu-latest,
72+
target: "aarch64",
73+
manylinux: "manylinux_2_28",
74+
}
6675
- { os: ubuntu-latest, target: "armv7l" }
6776
steps:
68-
- uses: actions/checkout@v4
69-
- uses: actions/setup-python@v5
70-
with:
71-
python-version: 3.9
72-
- name: Setup Rust toolchain
73-
uses: ./.github/actions/setup-builder
74-
with:
75-
rust-version: ${{ env.rust_msrv }}
76-
- uses: PyO3/maturin-action@v1
77-
with:
78-
target: ${{ matrix.target }}
79-
manylinux: ${{ matrix.manylinux || 'auto' }}
80-
working-directory: "bindings/python"
81-
command: build
82-
args: --release -o dist
83-
- name: Upload wheels
84-
uses: actions/upload-artifact@v4
85-
with:
86-
name: wheels-${{ matrix.os }}-${{ matrix.target }}
87-
path: bindings/python/dist
77+
- uses: actions/checkout@v4
78+
- uses: actions/setup-python@v5
79+
with:
80+
python-version: 3.9
81+
- name: Setup Rust toolchain
82+
uses: ./.github/actions/setup-builder
83+
with:
84+
rust-version: ${{ env.rust_msrv }}
85+
- uses: PyO3/maturin-action@v1
86+
with:
87+
target: ${{ matrix.target }}
88+
manylinux: ${{ matrix.manylinux || 'auto' }}
89+
working-directory: "bindings/python"
90+
command: build
91+
args: --release -o dist
92+
- name: Upload wheels
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: wheels-${{ matrix.os }}-${{ matrix.target }}
96+
path: bindings/python/dist
8897

8998
pypi-publish:
9099
name: Publish Python 🐍 distribution 📦 to Pypi
91-
needs: [ sdist, wheels ]
100+
needs: [sdist, wheels]
92101
runs-on: ubuntu-latest
93-
# Only publish to PyPi if the tag is not a pre-release
94-
if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-') }}
102+
# Only publish to PyPi if the tag is not a pre-release OR if manually triggered
103+
if: ${{ (startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')) || github.event_name == 'workflow_dispatch' }}
95104

96105
environment:
97106
name: pypi
98107
url: https://pypi.org/p/pyiceberg-core
99108

100109
permissions:
101-
id-token: write # IMPORTANT: mandatory for trusted publishing
110+
id-token: write # IMPORTANT: mandatory for trusted publishing
102111

103112
steps:
104-
- name: Download all the dists
105-
uses: actions/download-artifact@v4
106-
with:
107-
pattern: wheels-*
108-
merge-multiple: true
109-
path: bindings/python/dist
110-
- name: Publish to PyPI
111-
uses: pypa/gh-action-pypi-publish@release/v1
113+
- name: Download all the dists
114+
uses: actions/download-artifact@v4
115+
with:
116+
pattern: wheels-*
117+
merge-multiple: true
118+
path: bindings/python/dist
119+
- name: Publish to PyPI
120+
uses: pypa/gh-action-pypi-publish@release/v1
112121

113-
with:
114-
skip-existing: true
115-
packages-dir: bindings/python/dist
122+
with:
123+
skip-existing: true
124+
packages-dir: bindings/python/dist

.github/workflows/release_python_nightly.yml

Lines changed: 57 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ name: "Nightly PyPI Build"
1919

2020
on:
2121
schedule:
22-
- cron: "0 0 * * *" # Runs at midnight UTC every day
23-
workflow_dispatch: # Allows manual triggering
22+
- cron: "0 0 * * *" # Runs at midnight UTC every day
23+
workflow_dispatch: # Allows manual triggering
2424

2525
env:
26-
rust_msrv: "1.77.1"
26+
rust_msrv: "1.85"
2727

2828
permissions:
2929
contents: read
@@ -40,12 +40,12 @@ jobs:
4040

4141
sdist:
4242
needs: set-version
43-
if: github.repository == 'apache/iceberg-rust' # Only run for apache repo
43+
if: github.repository == 'apache/iceberg-rust' # Only run for apache repo
4444
runs-on: ubuntu-latest
4545
steps:
4646
- uses: actions/checkout@v4
47-
48-
- uses: ./.github/actions/overwrite-package-version # Overwrite package version with timestamp
47+
48+
- uses: ./.github/actions/overwrite-package-version # Overwrite package version with timestamp
4949
with:
5050
timestamp: ${{ needs.set-version.outputs.TIMESTAMP }}
5151

@@ -54,7 +54,7 @@ jobs:
5454
working-directory: "bindings/python"
5555
command: sdist
5656
args: -o dist
57-
57+
5858
- name: Upload sdist
5959
uses: actions/upload-artifact@v4
6060
with:
@@ -63,69 +63,73 @@ jobs:
6363

6464
wheels:
6565
needs: set-version
66-
if: github.repository == 'apache/iceberg-rust' # Only run for apache repo
66+
if: github.repository == 'apache/iceberg-rust' # Only run for apache repo
6767
runs-on: "${{ matrix.os }}"
6868
strategy:
6969
matrix:
7070
include:
7171
- { os: windows-latest }
7272
- { os: macos-latest, target: "universal2-apple-darwin" }
7373
- { os: ubuntu-latest, target: "x86_64" }
74-
- { os: ubuntu-latest, target: "aarch64", manylinux: "manylinux_2_28" }
74+
- {
75+
os: ubuntu-latest,
76+
target: "aarch64",
77+
manylinux: "manylinux_2_28",
78+
}
7579
- { os: ubuntu-latest, target: "armv7l" }
7680
steps:
77-
- uses: actions/checkout@v4
78-
79-
- uses: ./.github/actions/overwrite-package-version # Overwrite package version with timestamp
80-
with:
81-
timestamp: ${{ needs.set-version.outputs.TIMESTAMP }}
82-
83-
- uses: actions/setup-python@v5
84-
with:
85-
python-version: 3.9
86-
87-
- name: Setup Rust toolchain
88-
uses: ./.github/actions/setup-builder
89-
with:
90-
rust-version: ${{ env.rust_msrv }}
91-
92-
- uses: PyO3/maturin-action@v1
93-
with:
94-
target: ${{ matrix.target }}
95-
manylinux: ${{ matrix.manylinux || 'auto' }}
96-
working-directory: "bindings/python"
97-
command: build
98-
args: --release -o dist
99-
100-
- name: Upload wheels
101-
uses: actions/upload-artifact@v4
102-
with:
103-
name: wheels-${{ matrix.os }}-${{ matrix.target }}
104-
path: bindings/python/dist
81+
- uses: actions/checkout@v4
82+
83+
- uses: ./.github/actions/overwrite-package-version # Overwrite package version with timestamp
84+
with:
85+
timestamp: ${{ needs.set-version.outputs.TIMESTAMP }}
86+
87+
- uses: actions/setup-python@v5
88+
with:
89+
python-version: 3.9
90+
91+
- name: Setup Rust toolchain
92+
uses: ./.github/actions/setup-builder
93+
with:
94+
rust-version: ${{ env.rust_msrv }}
95+
96+
- uses: PyO3/maturin-action@v1
97+
with:
98+
target: ${{ matrix.target }}
99+
manylinux: ${{ matrix.manylinux || 'auto' }}
100+
working-directory: "bindings/python"
101+
command: build
102+
args: --release -o dist
103+
104+
- name: Upload wheels
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: wheels-${{ matrix.os }}-${{ matrix.target }}
108+
path: bindings/python/dist
105109

106110
testpypi-publish:
107-
needs: [ sdist, wheels ]
111+
needs: [sdist, wheels]
108112
runs-on: ubuntu-latest
109113

110114
environment:
111115
name: testpypi
112116
url: https://test.pypi.org/p/pyiceberg-core
113117

114118
permissions:
115-
id-token: write # IMPORTANT: mandatory for trusted publishing
119+
id-token: write # IMPORTANT: mandatory for trusted publishing
116120

117121
steps:
118-
- name: Download all the dists
119-
uses: actions/download-artifact@v4
120-
with:
121-
pattern: wheels-*
122-
merge-multiple: true
123-
path: bindings/python/dist
124-
- name: List downloaded artifacts
125-
run: ls -R bindings/python/dist
126-
- name: Publish to TestPyPI
127-
uses: pypa/gh-action-pypi-publish@release/v1
128-
with:
129-
repository-url: https://test.pypi.org/legacy/
130-
skip-existing: true
131-
packages-dir: bindings/python/dist
122+
- name: Download all the dists
123+
uses: actions/download-artifact@v4
124+
with:
125+
pattern: wheels-*
126+
merge-multiple: true
127+
path: bindings/python/dist
128+
- name: List downloaded artifacts
129+
run: ls -R bindings/python/dist
130+
- name: Publish to TestPyPI
131+
uses: pypa/gh-action-pypi-publish@release/v1
132+
with:
133+
repository-url: https://test.pypi.org/legacy/
134+
skip-existing: true
135+
packages-dir: bindings/python/dist

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
target
1919
.idea
2020
.vscode
21+
.zed
2122
**/.DS_Store
2223
dist/*
2324
**/venv

.typos.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# under the License.
1717

1818
[files]
19-
extend-exclude = ["**/testdata"]
19+
extend-exclude = ["**/testdata", "CHANGELOG.md"]

0 commit comments

Comments
 (0)