Skip to content

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

Merged
Seth Fitzsimmons (sethfitz) merged 3 commits into
mainfrom
devcontainer-py312
Oct 1, 2026
Merged

Seth Fitzsimmons (sethfitz) merged 3 commits into
mainfrom
devcontainer-py312

Conversation

@sethfitz

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

Copy link
Copy Markdown
Contributor

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

@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-10-01T01:33:45Z

@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

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

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>
Verified working: python 3.12.14, duckdb spatial+h3, and the notebook
kernel picker recommends .venv on selection.

Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
The schema slides pipe GeoParquet through gpq and jq into the validator
(slide 17). duckdb was already installed; gpq comes from its GitHub
release via the gh-release feature, pinned to 0.24.0, the last release.
Built as linux/amd64 (Codespaces' arch) 2026-09-26: gpq 0.24.0, jq
1.8.2, duckdb 1.5.5 on PATH.

Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
@sethfitz
Seth Fitzsimmons (sethfitz) merged commit e8504c2 into main Oct 1, 2026
12 checks passed
@sethfitz
Seth Fitzsimmons (sethfitz) deleted the devcontainer-py312 branch October 1, 2026 02:44

This branch was successfully deployed

1 active deployment
staging — a7e3836a Deployed Oct 1, 2026 by sethfitz via Deploy #84
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