11{
2- "containerEnv" : {
3- "PYTHON_VERSION " : " 3.11 "
4- },
5- "features" : {
6- "ghcr.io/devcontainers/features/python:latest " : {},
7- "ghcr.io/devcontainers-contrib/features/poetry:2" : {}
8- } ,
9- "image" : " mcr.microsoft.com/devcontainers/base:debian-11 " ,
10- "name" : " nba_api " ,
11- "postCreateCommand " : " bash .devcontainer/postCreateCommand.sh " ,
12- "remoteEnv" : {
13- "PYTHONUTF8" : " 1 "
14- },
2+ // Display name for this dev container configuration
3+ "name " : " NBA API " ,
4+
5+ // Build configuration for the container
6+ "build " : {
7+ // Path to the Dockerfile relative to the build context
8+ "dockerfile" : " Dockerfile " ,
9+ // Build context directory - ".." means parent directory of .devcontainer folder
10+ // This allows Docker to access project files outside the .devcontainer directory
11+ "context " : " .. "
12+ },
13+
14+ // VS Code specific customizations
1515 "customizations" : {
1616 "vscode" : {
17+
18+ // Extensions to install automatically in the container
19+ // These provide Python development tools, linting, and formatting
1720 "extensions" : [
18- " ms-python.black-formatter" ,
19- " ms-python.flake8" ,
20- " ms-python.python" ,
21- " ms-python.vscode-pylance" ,
22- " ms-toolsai.jupyter" ,
23- " ms-toolsai.jupyter-keymap" ,
24- " ms-toolsai.jupyter-renderers" ,
25- " ms-toolsai.vscode-jupyter-powertoys"
26- ]
27- }
28- }
21+ " ms-python.black-formatter" ,
22+ " ms-python.flake8" ,
23+ " ms-python.isort" ,
24+ " ms-python.pylint" ,
25+ " ms-python.python" ,
26+ " ms-python.vscode-pylance" ,
27+ " ms-toolsai.jupyter" ,
28+ " ms-toolsai.jupyter-keymap" ,
29+ " ms-toolsai.jupyter-renderers" ,
30+ " ms-toolsai.vscode-jupyter-powertoys" ,
31+ " tamasfe.even-better-toml"
32+ ],
33+
34+ // VS Code settings to apply in the container
35+ "settings" : {
36+
37+ // Enable Python linting globally across all Python files
38+ // This provides real-time error detection and code quality feedback
39+ "python.linting.enabled" : true ,
40+
41+ // Enable pylint as the primary linting tool
42+ // Pylint provides comprehensive code analysis and style checking
43+ "python.linting.pylintEnabled" : true ,
44+
45+ // Automatically format Python files when saving
46+ // This ensures consistent code style across the project
47+ "editor.formatOnSave" : true ,
48+
49+ // Use Black as the Python code formatter
50+ // Black is an opinionated formatter that enforces consistent style
51+ "python.formatting.provider" : " black" ,
52+
53+ // Set bash as the default terminal shell in Linux containers
54+ // This ensures consistent shell behavior across different environments
55+ "terminal.integrated.defaultProfile.linux" : " bash"
56+ }
57+ }
58+ },
59+
60+ // Ports to forward from container to host (empty array = no ports forwarded)
61+ // Add port numbers here if your application serves web content (e.g., [8000, 3000])
62+ "forwardPorts" : [],
63+
64+ // User to connect as when attaching to the container
65+ // "vscode" user has proper permissions and development tools pre-configured
66+ "remoteUser" : " vscode" ,
67+
68+ // Command to run after the container is created and VS Code connects
69+ // This executes the post-create script that sets up Poetry and dependencies
70+ // Runs only once when the container is first created, not on every restart
71+ "postCreateCommand" : " bash .devcontainer/post-create-command.sh"
2972}
0 commit comments