From 64087f6d0dc725510205d99a21f0174b61c32563 Mon Sep 17 00:00:00 2001 From: Seth Fitzsimmons Date: Tue, 22 Sep 2026 19:47:15 -0700 Subject: [PATCH 1/2] Rebuild the Codespaces devcontainer on a pinned Python 3.12 image universal:2 is a frozen Ubuntu 20.04 image that does not record which Python it ships, so pyproject.toml's requires-python >= 3.12 held only by accident. The devcontainers/python:3-3.12-trixie image pins the Python minor that .python-version names (3.12.14 as of image 3.2.3). postCreate now runs `uv sync --frozen`, the same path the README gives for local setup, so Codespaces installs exactly what uv.lock records and never rewrites uv.lock in an attendee's workspace. The venv lands in .venv/, which is prepended to PATH and set as the default interpreter so terminals and the Jupyter kernel picker find it. UV_LINK_MODE=copy silences the hardlink warning uv prints because the cache and /workspaces sit on different filesystems. Signed-off-by: Seth Fitzsimmons --- .devcontainer/devcontainer.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5024a9f..104b682 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,24 @@ { - "image": "mcr.microsoft.com/devcontainers/universal:2", + "image": "mcr.microsoft.com/devcontainers/python:3-3.12-trixie", "features": { + "ghcr.io/va-h/devcontainers-features/uv:1": {}, "ghcr.io/eitsupi/devcontainer-features/duckdb-cli:1": { "version": "latest", "extensions": "spatial", "communityExtensions": "h3" } }, + "containerEnv": { + "UV_LINK_MODE": "copy" + }, + "remoteEnv": { + "PATH": "${containerWorkspaceFolder}/.venv/bin:${containerEnv:PATH}" + }, "customizations": { "vscode": { + "settings": { + "python.defaultInterpreterPath": "${containerWorkspaceFolder}/.venv/bin/python" + }, "extensions": [ "ms-toolsai.jupyter", "ms-toolsai.vscode-jupyter-cell-tags", @@ -21,5 +31,5 @@ ] } }, - "postCreateCommand": "pip install --user -r requirements.txt" + "postCreateCommand": "uv sync --frozen" } From 835e91dc754aae2d2f107945956eabbdb0af6dc7 Mon Sep 17 00:00:00 2001 From: Seth Fitzsimmons Date: Tue, 22 Sep 2026 21:30:22 -0700 Subject: [PATCH 2/2] Point the README's Codespaces section at the fixed devcontainer Verified working: python 3.12.14, duckdb spatial+h3, and the notebook kernel picker recommends .venv on selection. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 575165a..c7cb31d 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,9 @@ jupyter lab The `requirements.txt` is generated from `pyproject.toml` and `uv.lock`, so versions match the uv setup. -> **Note:** GitHub Codespaces support is being updated for the new setup. For now, please use one of the local setup paths above. +### Alternative: GitHub Codespaces + +If you'd rather not install anything locally: **Code → Codespaces → Create codespace on `main`**. The devcontainer runs `uv sync --frozen` automatically, so the same locked environment as the local setup is ready once the codespace finishes building — no separate install path to debug. Open a notebook and select the `.venv` interpreter when the kernel picker prompts you. ---