Skip to content

Commit dd33f47

Browse files
authored
docs(setup): add just recipe and setup entry for uv (#10959)
1 parent fc9d7a0 commit dd33f47

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ COPY --from=ghcr.io/astral-sh/uv:0.6.5 /uv /uvx /bin/
33
ARG USERNAME=vscode
44

55
RUN apt-get update && \
6-
apt-get install -y --no-install-recommends libgdal-dev && \
6+
apt-get install -y --no-install-recommends libgdal-dev python3-dev && \
77
rm -rf /var/lib/apt/lists/*
88

99
RUN python3 -m pip install pipx --no-cache-dir
@@ -24,8 +24,7 @@ COPY . /app
2424
RUN --mount=type=cache,target=/root/.cache/uv \
2525
--mount=type=bind,source=uv.lock,target=uv.lock \
2626
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
27-
uv venv && uv sync --group dev --group tests \
28-
--extra duckdb --extra clickhouse --extra examples --extra geospatial
27+
uv venv && just sync duckdb
2928

3029
ENV VENV_DIR=.venv
3130
RUN chown -R $USERNAME $VENV_DIR && chmod -R 755 $VENV_DIR

docs/contribute/01_environment.qmd

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,47 @@ for manager, params in managers.items():
246246
* `Rebuild Container` to copy files from the local Git repo and have the build
247247
run `uv sync`.
248248

249+
## uv
250+
251+
::: {.callout-warning}
252+
## `uv` will not handle installation of system dependencies
253+
254+
`uv` will not install system dependencies needed for some packages such as `psycopg2` and `kerberos`.
255+
256+
For a better development experience see the `conda/mamba` or `nix` setup instructions.
257+
:::
258+
259+
1. [Install `uv`](https://docs.astral.sh/uv/getting-started/installation/)
260+
261+
1. [Install `gh`](https://cli.github.com/manual/installation)
262+
263+
1. Fork and clone the ibis repository:
264+
265+
```sh
266+
gh repo fork --clone --remote ibis-project/ibis
267+
```
268+
269+
1. Change directory into `ibis`:
270+
271+
```sh
272+
cd ibis
273+
```
274+
275+
1. Install development dependencies
276+
277+
This will create a virtual environment at `.venv` and install all dependencies inside.
278+
It will also install Ibis in development mode as `ibis-framework`.
279+
280+
```sh
281+
just sync
282+
```
283+
284+
1. Activate the virtual environment
285+
286+
```sh
287+
source .venv/bin/activate
288+
```
289+
249290
## pip
250291

251292
::: {.callout-warning}

justfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ default:
66
clean:
77
git clean -fdx -e 'ci/ibis-testing-data'
88

9+
# install dependencies for a given backend, or all dependencies if none is given
10+
sync backend="":
11+
#!/usr/bin/env bash
12+
if [ ! "{{ backend }}" ]; then
13+
uv sync --all-groups --all-extras
14+
else
15+
uv sync --group dev --group tests --extra {{ backend }} --extra examples --extra geospatial
16+
fi
17+
918
# lock dependencies without updating existing versions
1019
lock:
1120
#!/usr/bin/env bash

0 commit comments

Comments
 (0)