Skip to content

Commit 7b8ec78

Browse files
committed
Update docker container and VSCode test configuration
1 parent 4e93f3b commit 7b8ec78

7 files changed

Lines changed: 125 additions & 13 deletions

File tree

‎.devcontainer/Dockerfile‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/python-3/.devcontainer/base.Dockerfile
1+
# See here for image contents: https://github.com/devcontainers/images/tree/main/src
22

3-
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
4-
ARG VARIANT="3.14.2-bullseye"
5-
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
3+
ARG VARIANT="3.14-bookworm"
4+
FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}
65

76
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
87
ARG NODE_VERSION="none"

‎.devcontainer/devcontainer.json‎

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/python-3
2+
// https://github.com/devcontainers/images/tree/main/src
33
{
44
"name": "Python 3",
55
"build": {
@@ -9,7 +9,7 @@
99
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
1010
// Append -bullseye or -buster to pin to an OS version.
1111
// Use -bullseye variants on local on arm64/Apple Silicon.
12-
"VARIANT": "3.14-bullseye",
12+
"VARIANT": "3.14-bookworm",
1313
// Options
1414
"NODE_VERSION": "none"
1515
}
@@ -21,15 +21,33 @@
2121
// Set *default* container specific settings.json values on container create.
2222
"settings": {
2323
"python.autoComplete.extraPaths": ["/workspaces"],
24-
"python.defaultInterpreterPath": "/usr/local/bin/python"
24+
"python.defaultInterpreterPath": "/usr/local/bin/python",
25+
"editor.tabSize": 4,
26+
"files.autoSave": "afterDelay",
27+
"files.trimTrailingWhitespace": true,
28+
"terminal.integrated.localEchoStyle": "dim",
29+
"[python]": {
30+
"editor.defaultFormatter": "charliermarsh.ruff",
31+
"editor.formatOnSave": true,
32+
"editor.codeActionsOnSave": {
33+
"source.fixAll.ruff": "explicit",
34+
"source.organizeImports.ruff": "explicit"
35+
}
36+
},
37+
"python.testing.pytestArgs": [
38+
"tests"
39+
],
40+
"python.testing.unittestEnabled": false,
41+
"python.testing.pytestEnabled": true
2542
},
2643

2744
// Add the IDs of extensions you want installed when the container is created.
2845
"extensions": [
29-
"ms-python.vscode-pylance",
30-
"ms-python.python",
3146
"Anthropic.claude-code",
32-
"charliermarsh.ruff"
47+
"charliermarsh.ruff",
48+
"DavidAnson.vscode-markdownlint",
49+
"ms-python.python",
50+
"ms-python.vscode-pylance"
3351
]
3452
}
3553
},

‎.gitignore‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,7 @@ dmypy.json
129129
.pyre/
130130

131131
# Ruff
132-
.ruff_cache
132+
.ruff_cache
133+
134+
# Claude
135+
.claude/*.local.*

‎.vscode/extensions.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"recommendations": [
3+
"Anthropic.claude-code",
4+
"charliermarsh.ruff",
35
"DavidAnson.vscode-markdownlint",
46
"ms-python.python",
57
"ms-python.vscode-pylance",
68
"ms-vscode-remote.remote-containers",
7-
"charliermarsh.ruff"
89
]
910
}

‎.vscode/settings.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,10 @@
1010
"source.fixAll.ruff": "explicit",
1111
"source.organizeImports.ruff": "explicit"
1212
}
13-
}
13+
},
14+
"python.testing.pytestArgs": [
15+
"tests"
16+
],
17+
"python.testing.unittestEnabled": false,
18+
"python.testing.pytestEnabled": true
1419
}

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies = []
99
dev = [
1010
"codespell>=2.4.3",
1111
"pytest",
12+
"pytest-cov",
1213
"ruff>=0.16.0",
1314
]
1415

‎uv.lock‎

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)