Skip to content

Commit 65e3a66

Browse files
Set developer settings when using the devcontainer in python folder (#157)
This change configures hatch to set up the python virtual environment in the project folder when using the dev container. We also set the python interpreter path to the hatch virtual environment.
1 parent 279f59e commit 65e3a66

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

python/.devcontainer/devcontainer.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,20 @@
1313
"forwardPorts": [7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870],
1414

1515

16-
// Configure tool-specific properties.
17-
// "customizations": {},
16+
// Configure tool-specific properties.
17+
"customizations": {
18+
"vscode": {
19+
"extensions": [
20+
"ms-python.python",
21+
"ms-python.vscode-pylance"
22+
],
23+
"settings": {
24+
"python.defaultInterpreterPath": "/workspaces/TypeChat/python/.hatch/typechat/bin/python3.12"
25+
}
26+
}
27+
},
28+
29+
"postCreateCommand": "hatch config set dirs.env.virtual .hatch; hatch config update;hatch env create"
1830

1931
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
2032
// "remoteUser": "root"

0 commit comments

Comments
 (0)