- 
                Notifications
    You must be signed in to change notification settings 
- Fork 339
ci: Migrate to uv for python #1796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -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
    
   There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be helpful to add these into a Makefile | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|  | @@ -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" | ||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 
        Suggested change
       
 nit: do we have to use upperbound? | ||||||
| dynamic = ["version"] | ||||||
| license = { file = "LICENSE" } | ||||||
|  | ||||||
|  | @@ -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", | ||||||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are we using this specific commit? | ||||||
| "fastavro>=1.11.1", | ||||||
| ] | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: recommend to use the setup-uv action, https://docs.astral.sh/uv/guides/integration/github/#installation