Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {}
}
Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This is a good start for the devcontainer configuration. To make it more useful for developers working on this Python project, I suggest a few enhancements:

  • Name: Add a descriptive name for the container for better identification.
  • Python Version: Explicitly set the Python version to 3.11 using a devcontainer feature, as this is the recommended version in CONTRIBUTING.md.
  • Automated Setup: Use postCreateCommand to automatically install uv and sync the project dependencies. This will fully prepare the development environment upon creation.
  • VS Code Customizations:
    • Add recommended extensions for Python development (ms-python.python, ms-python.vscode-pylance, charliermarsh.ruff).
    • Configure VS Code settings to automatically use the correct Python interpreter, set up pytest for easy test execution, and enable auto-formatting on save using ruff.

These changes will provide a more complete and ready-to-use development environment for anyone using the devcontainer.

{
  "name": "ADK Python Dev Container",
  "image": "mcr.microsoft.com/devcontainers/universal:2",
  "features": {
    "ghcr.io/devcontainers/features/python:1": {
      "version": "3.11"
    }
  },
  "postCreateCommand": "pip install uv && uv sync --all-extras",
  "customizations": {
    "vscode": {
      "settings": {
        "python.defaultInterpreterPath": "/usr/local/python/bin/python",
        "python.testing.pytestArgs": [
          "tests/unittests"
        ],
        "python.testing.unittestEnabled": false,
        "python.testing.pytestEnabled": true,
        "[python]": {
          "editor.defaultFormatter": "charliermarsh.ruff",
          "editor.formatOnSave": true
        }
      },
      "extensions": [
        "ms-python.python",
        "ms-python.vscode-pylance",
        "charliermarsh.ruff"
      ]
    }
  }
}