Skip to content

Add Codespaces devcontainer#108

Draft
Mirochill wants to merge 1 commit into
opendecree:mainfrom
Mirochill:fix-9-devcontainer
Draft

Add Codespaces devcontainer#108
Mirochill wants to merge 1 commit into
opendecree:mainfrom
Mirochill:fix-9-devcontainer

Conversation

@Mirochill
Copy link
Copy Markdown

Summary

  • Add a Codespaces/devcontainer setup for Python 3.12.
  • Install uv from the official ghcr.io/astral-sh/uv image and use it to create .venv with sdk[dev] dependencies after container creation.
  • Add an "Open in GitHub Codespaces" badge to the README.

Related issues

Closes #9

Test plan

  • devcontainer.json parses as JSON
  • git diff --check HEAD~1..HEAD
  • make lint passes
  • make typecheck passes
  • make test passes

Not run locally: make lint, make typecheck, make test.

Checklist

  • SDK regenerated if proto changed in decree (not applicable)
  • Breaking change flagged in title/description if applicable (not applicable)
  • Changelog/release note added if applicable (not applicable)

@github-actions
Copy link
Copy Markdown

Thanks for your first pull request! We appreciate the contribution.

Before review, please make sure tests pass: cd sdk && pytest

Copy link
Copy Markdown
Member

@zeevdr zeevdr left a comment

Choose a reason for hiding this comment

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

Thanks for this, Miro — devcontainer support for the Python SDK is genuinely useful and the venv/pytest/ruff wiring here is solid. 🙏

One change before merge: please align with the pattern the core decree repo already uses, so our devcontainers stay consistent across the org.

decree/.devcontainer doesn't use a custom Dockerfile. It uses official ghcr.io/devcontainers/features/* for the toolchain and a small setup script for anything not covered by a feature. Could you refactor 108 the same way:

  1. Drop .devcontainer/Dockerfile.
  2. Add the official Python feature instead:
    "features": {
      "ghcr.io/devcontainers/features/python:1": { "version": "3.12" }
    }
  3. Install uv via the official astral installer in an onCreateCommand (pin preserved via the versioned URL):
    "onCreateCommand": "curl -LsSf https://astral.sh/uv/0.11.16/install.sh | sh"

Keep everything else as-is — the postCreateCommand venv install, the remoteEnv PATH, the VS Code settings/extensions, and the README badge are all good.

We avoid community/third-party devcontainer features by policy (vanilla-tooling only), which is why the official Python feature + astral's own installer is the preferred route here rather than a uv feature image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Devcontainer config for Python SDK

2 participants