Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/bindings_python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,28 @@ jobs:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: 3.9
python-version: 3.12
- uses: PyO3/maturin-action@v1
with:
working-directory: "bindings/python"
command: build
args: --out dist --sdist
- name: Install uv
shell: bash
run: |
python -m pip install uv==0.9.3
Comment on lines +89 to +92
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Install uv
shell: bash
run: |
python -m pip install uv==0.9.3
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.9.3"

nit: recommend to use the setup-uv action, https://docs.astral.sh/uv/guides/integration/github/#installation

- name: Sync dependencies
working-directory: "bindings/python"
shell: bash
run: |
uv sync --group dev --no-install-project
- name: Install built wheel
working-directory: "bindings/python"
shell: bash
run: |
uv pip install --reinstall dist/pyiceberg_core-*.whl
- name: Run tests
working-directory: "bindings/python"
shell: bash
run: |
set -e
pip install hatch==1.14.2
hatch run dev:pip install dist/pyiceberg_core-*.whl --force-reinstall
hatch run dev:test
uv run --group dev --no-sync pytest
19 changes: 10 additions & 9 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ header:
copyright-owner: Apache Software Foundation

paths-ignore:
- 'LICENSE'
- 'NOTICE'
- '.gitattributes'
- '**/*.json'
- "LICENSE"
- "NOTICE"
- ".gitattributes"
- "**/*.json"
# Generated content by mdbook
- 'website/book'
- "website/book"
# Generated content by scripts
- '**/DEPENDENCIES.*.tsv'
- "**/DEPENDENCIES.*.tsv"
# Release distributions
- 'dist/*'
- 'Cargo.lock'
- '.github/PULL_REQUEST_TEMPLATE.md'
- "dist/*"
- "Cargo.lock"
- "bindings/python/uv.lock"
- ".github/PULL_REQUEST_TEMPLATE.md"
comment: on-failure
14 changes: 9 additions & 5 deletions bindings/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,26 @@ This project is used to build an Iceberg-rust powered core for [PyIceberg](https

## Setup

Install Hatch:
Install [uv](https://docs.astral.sh/uv/getting-started/installation/):

```shell
pip install hatch==1.12.0
pip install uv==0.9.3
```

Hatch uses [uv](https://docs.astral.sh/uv/) as a backend by default, so [make sure that it is installed](https://docs.astral.sh/uv/getting-started/installation/) as well.
Set up the development environment:

```shell
uv sync --group dev
```

## Build

```shell
hatch run dev:develop
uv run --group dev maturin develop
```

## Test

```shell
hatch run dev:test
uv run --group dev pytest
Comment on lines +35 to +47
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be helpful to add these into a Makefile

```
18 changes: 9 additions & 9 deletions bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
name = "pyiceberg-core"
readme = "project-description.md"
requires-python = "~=3.9"
requires-python = ">=3.10,<3.13"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
requires-python = ">=3.10,<3.13"
requires-python = ">=3.10"

nit: do we have to use upperbound?

dynamic = ["version"]
license = { file = "LICENSE" }

Expand All @@ -48,10 +47,11 @@ include = [
[tool.ruff.lint]
ignore = ["F403", "F405"]

[tool.hatch.envs.dev]
dependencies = ["maturin>=1.0,<2.0", "pytest>=8.3.2", "datafusion==50.*", "pyiceberg[sql-sqlite,pyarrow]>=0.10.0", "fastavro>=1.11.1"]

[tool.hatch.envs.dev.scripts]
build = "maturin build --out dist --sdist"
develop = "maturin develop"
test = "pytest"
[dependency-groups]
dev = [
"maturin>=1.0,<2.0",
"pytest>=8.3.2",
"datafusion==50.*",
"pyiceberg[sql-sqlite,pyarrow] @ git+https://github.com/apache/iceberg-python.git@d3eb149fe99b14e714a06e727b69cd617c6c052d",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we using this specific commit?

"fastavro>=1.11.1",
]
Loading
Loading