ci(devcontainer): Debian 13 Trixie + Python 3.14, Ruff settings, drop .vscode (keeper-safe .json-only) - #15162
Conversation
… .vscode Bumps the base image to 3.14-trixie purely via devcontainer.json's build.args.VARIANT (the Dockerfile's ARG reads it), so the Dockerfile itself is untouched and keeps installing requirements + pipx pre-commit/ruff. - VARIANT 3.13-bookworm -> 3.14-trixie (Debian 13, latest stable CPython). - Replace removed python.linting.*/blackPath settings with Ruff format-on-save + fixAll/organizeImports (matches pre-commit and CI); add the Ruff extension. - Delete .vscode/settings.json: pre-commit/Ruff cover this now. Keeps the change to .json files only.
The devcontainer image build fails on main: the Dockerfile does `COPY requirements.txt`, but that file was removed when the repo moved its dependencies to pyproject.toml, so there is nothing to copy. Switch devcontainer.json to pull the upstream mcr.microsoft.com/devcontainers/python image and install pre-commit/ruff/uv in postCreateCommand. Fully within .json so it stays keeper-safe; the now-unused Dockerfile can be dropped in a follow-up once the keeper accepts the Dockerfile filename (TheAlgorithms#228).
|
Heads-up: the `Test DevContainer Build` check was red, and it turned out to be a pre-existing breakage on main, not something this PR introduced. Root cause: `.devcontainer/Dockerfile` does `COPY requirements.txt /tmp/pip-tmp/`, but `requirements.txt` was removed when the repo moved its dependencies to `pyproject.toml`. The image build has been broken since that migration — it just never surfaced because CI only runs on `.devcontainer/**` changes and nobody had touched that directory. Fix (pushed just now, still `.json`-only so it stays keeper-safe): drop the local Dockerfile build and pull the upstream The |
cclauss
left a comment
There was a problem hiding this comment.
[2026-09-02T19:48:03.349Z] installed package pre-commit 4.6.2, installed using Python 3.14.7
These apps are now available
- pre-commit
installed package ruff 0.16.5, installed using Python 3.14.7
These apps are now available
- ruff
installed package uv 0.12.9, installed using Python 3.14.7
These apps are now available
- uv
- uvx
Describe your change:
Upgrades
.devcontainerto Debian 13 "Trixie" + Python 3.14 and modernizes the VS Code settings. Replaces #15160 / #15161.algorithms-keeperauto-closed #15160 because it edited the extension-less.devcontainer/Dockerfile(the keeper'sACCEPTED_EXTENSIONSallow-list has no entry forDockerfile, so reopening re-triggers the close). This version touches.jsonfiles only, and this time includes the filled checklist (that's why #15161 was auto-closed).Same outcome, keeper-safe:
build.args.VARIANT3.13-bookworm->3.14-trixie. The base image is selected entirely fromdevcontainer.json— the Dockerfile'sARG VARIANTreads it — so the Dockerfile is left untouched and keeps installingrequirements.txt+ pipxpre-commit/ruff.python.linting.*/python.formatting.blackPathkeys were removed by the Python extension long ago. Replaced with RuffformatOnSave+source.fixAll/source.organizeImports, matching pre-commit and CI. Added thecharliermarsh.ruffextension..vscode/deleted (per your preference on priya-sundaram-dev as a maintainer? #15081): its sole file only muted a PR-branch notification; pre-commit/Ruff cover the rest.Open questions from #15081:
3-trixietag on themcr.microsoft.com/vscode/devcontainers/pythonpath, soVARIANTmust name the minor version; bump it when a new stable ships.tvariants and build args can't read.python-version, so 3.14t can't be selected via the tag alone — it would need a Dockerfile/uv change (which the keeper blocks from me). Happy to do that as a maintainer-merged follow-up.Checklist: