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
19 changes: 15 additions & 4 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,25 @@ cd icechunk-python

=== "uv (Recommended)"

The easiest way to get started is with [uv](https://docs.astral.sh/uv/), which handles virtual environments, dependencies, and building automatically:
The easiest way to get started is with [uv](https://docs.astral.sh/uv/), which handles virtual environments and dependencies:

```bash
# Install all development dependencies (includes test dependencies, mypy, ruff, maturin)
uv sync

# Activate the virtual environment
source .venv/bin/activate
# Configure maturin-import-hook for fast incremental Rust compilation
uv run -m maturin_import_hook site install

# Build the Rust extension
maturin develop --uv
```

**Why these steps?** Icechunk is a mixed Python/Rust project. The `maturin-import-hook` enables incremental Rust compilation (7-20 seconds) instead of full rebuilds (5+ minutes) every time you run tests or import the module. This makes development significantly faster.

# Run tests
Now you can run tests and other commands:

```bash
# Run tests (Rust changes will automatically trigger incremental rebuild)
uv run pytest

# Run type checking
Expand All @@ -45,6 +54,7 @@ cd icechunk-python
# Run linting
uv run ruff check python
```

=== "Venv"

```bash
Expand All @@ -57,6 +67,7 @@ cd icechunk-python

# Build the Rust extension
maturin develop
```

=== "Conda / Mamba"

Expand Down
18 changes: 9 additions & 9 deletions icechunk-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ authors = [{ name = "Earthmover", email = "[email protected]" }]
dependencies = ["zarr>=3,!=3.0.3"]

[dependency-groups]
dev = [{ include-group = "test" }, "mypy", "ruff", "maturin>=1.7,<2.0"]
dev = [
{ include-group = "test" },
"mypy",
"ruff",
"maturin>=1.7,<2.0",
"maturin-import-hook>=0.3.0",
]
test = [
"boto3",
"coverage",
Expand Down Expand Up @@ -97,14 +103,8 @@ python-source = "python"
exclude = ["README.md"]

[tool.uv]
# Rebuild package when any Rust files change
cache-keys = [
{ file = "pyproject.toml" },
{ file = "Cargo.toml" },
{ file = "src/**/*.rs" },
{ file = "../icechunk/Cargo.toml" },
{ file = "../icechunk/src/**/*.rs" },
]
# Disable automatic package building - we use maturin-import-hook for faster dev cycles
package = false

[tool.pytest.ini_options]
asyncio_mode = "auto"
Expand Down