Skip to content

[CHORE] Rebuild the Codespaces devcontainer on Python 3.12 and uv - #60

Open
Seth Fitzsimmons (sethfitz) wants to merge 2 commits into
mainfrom
devcontainer-py312
Open

Seth Fitzsimmons (sethfitz) wants to merge 2 commits into
mainfrom
devcontainer-py312

Conversation

@sethfitz

@sethfitz Seth Fitzsimmons (sethfitz) commented Sep 23, 2026

Copy link
Copy Markdown

What's in this PR?

  • moved the devcontainer off mcr.microsoft.com/devcontainers/universal:2 (frozen Ubuntu 20.04, undeclared Python) to mcr.microsoft.com/devcontainers/python:3-3.12-trixie, matching .python-version
  • postCreate now runs uv sync --frozen, the same command the README gives for local setup, via the ghcr.io/va-h/devcontainers-features/uv feature
  • .venv goes first on PATH and is set as the default interpreter, so python, jupyter, and the notebook kernel picker all use it
  • DuckDB CLI feature (spatial + h3) and VS Code extensions unchanged
  • verified in a live Codespace build on this branch: python --version → 3.12.14, duckdb -c "LOAD spatial; LOAD h3; SELECT 1" returns a row, and duckdb/geopandas/lonboard all import. The kernel picker isn't pre-selected on a fresh notebook (normal VS Code behavior — no notebook has had a kernel chosen before), but .venv is the recommended option when you pick one
  • replaced the README's "Codespaces support is being updated" note (added in [CHORE] Migrate to uv and fix setup instructions #25) with setup instructions, now that it's verified working
  • closes [BUG] Codespaces devcontainer doesn't match local Python 3.12 / uv setup #61

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 <seth@mojodna.net>
@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown

🚀 Workshop branch preview deployed!

You can review your changes at https://staging.overturemaps.org/workshop/pr/60/index.html


♻️ Last refreshed: 2026-09-23T04:31:14Z

@sethfitz Seth Fitzsimmons (sethfitz) changed the title Rebuild the Codespaces devcontainer on Python 3.12 and uv [CHORE] Rebuild the Codespaces devcontainer on Python 3.12 and uv Sep 23, 2026
Verified working: python 3.12.14, duckdb spatial+h3, and the notebook
kernel picker recommends .venv on selection.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

This branch was successfully deployed

1 active deployment
staging 835e91dc Deployed Sep 23, 2026 by sethfitz via Deploy #77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Codespaces devcontainer doesn't match local Python 3.12 / uv setup

2 participants