You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mkdocs/docs/contributing.md
+42-14Lines changed: 42 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,33 +34,61 @@ For first-time contributors, feel free to check out our [good first issues](http
34
34
35
35
The PyIceberg Project is hosted on GitHub at <https://github.com/apache/iceberg-python>.
36
36
37
-
For the development, Poetry is used for packing and dependency management. You can install this using:
37
+
For development, [uv](https://docs.astral.sh/uv/) is used for dependency management and packaging. uv is a Python package installer and resolver, written in Rust, that serves as a drop-in replacement for pip, and virtualenv.
38
+
39
+
### Getting Started
40
+
41
+
Install uv and set up the development environment:
38
42
39
43
```bash
40
-
make install-poetry
44
+
make install
41
45
```
42
46
43
-
To get started, you can run `make install`, which installs all the dependencies of the Iceberg library. This also installs the development dependencies. If you don't want to install the development dependencies, you need to install using `poetry install --without dev` instead of `make install`.
47
+
This will install uv if needed, create a virtual environment in `.venv`, and install all dependencies.
48
+
49
+
If you only want to just install uv:
50
+
51
+
```bash
52
+
make install-uv
53
+
```
44
54
45
-
If you want to install the library on the host, you can simply run `pip3 install -e .`. If you wish to use a virtual environment, you can run `poetry shell`. Poetry will open up a virtual environment with all the dependencies set.
55
+
### Python Version Selection
46
56
47
-
> **Note:** If you want to use `poetry shell`, you need to install it using `pip install poetry-plugin-shell`. Alternatively, you can run commands directly with `poetry run`.
57
+
You can specify which Python version to use when creating your virtual environment:
48
58
49
-
To set up IDEA with Poetry:
59
+
```bash
60
+
PYTHON=3.12 make install # Create environment with Python 3.12
61
+
make test# Run tests against Python 3.12
62
+
```
63
+
64
+
> **Tip:**`uv python list` shows available interpreters. `uv python install 3.12` can install one if needed.
65
+
66
+
### IDE Setup
67
+
68
+
After running `make install`, configure your IDE to use the Python interpreter at `.venv/bin/python`.
69
+
70
+
**To set up IDEA with uv:**
50
71
51
72
- Open up the Python project in IntelliJ
52
-
- Make sure that you're on latest main (that includes Poetry)
73
+
- Make sure that you're on latest main
53
74
- Go to File -> Project Structure (⌘;)
54
75
- Go to Platform Settings -> SDKs
55
-
- Click the + sign -> Add Python SDK
56
-
- Select Poetry Environment from the left hand side bar and hit OK
57
-
- It can take some time to download all the dependencies based on your internet
58
-
- Go to Project Settings -> Project
59
-
- Select the Poetry SDK from the SDK dropdown, and click OK
For IDEA ≤2021 you need to install the [Poetry integration as a plugin](https://plugins.jetbrains.com/plugin/14307-poetry/).
86
+
For full control over your environment, you can use uv commands directly. See the [uv documentation](https://docs.astral.sh/uv/) to learn more about:
62
87
63
-
Now you're set using Poetry, and all the tests will run in Poetry, and you'll have syntax highlighting in the pyproject.toml to indicate stale dependencies.
88
+
- Managing dependencies with `uv add` and `uv remove`
0 commit comments