Skip to content

Add a dev container for local development - #69

Open
yogaxpto wants to merge 1 commit into
prooflinedev:mainfrom
yogaxpto:main
Open

yogaxpto wants to merge 1 commit into
prooflinedev:mainfrom
yogaxpto:main

Conversation

@yogaxpto

Copy link
Copy Markdown

Summary

Adds .devcontainer/devcontainer.json so contributors can open the repo in a ready-to-use container (VS Code Dev Containers or Codespaces).

  • Image: mcr.microsoft.com/devcontainers/python:3.13-bookworm, which matches the CI interpreter (3.13.x).
  • Setup: postCreateCommand installs the hash-pinned tools from requirements-dev.txt (--require-hashes --only-binary=:all:) and the SDK's metadata (--no-deps) into ~/.local. The container is the isolation boundary, so there is no .venv. proofline imports still resolve to the workspace sources.
  • Type checking: mypy, using the version pinned in requirements-dev.txt and the settings in pyproject.toml, is the only type checker. Pylance handles navigation and completion only.
  • Formatting: Ruff formats and organizes imports on save. *.py.jinja generator templates are excluded so they stay byte-exact.
  • Editor noise: caches, .tools, .venv and openapi.public.json are hidden from the explorer, file watcher and search.

scripts/check.py is unchanged and still builds its own throwaway environments for the full gate.

Test plan

  • "Reopen in Container" builds and postCreateCommand succeeds
  • python -c "import proofline" resolves to the workspace sources
  • pytest tests passes inside the container
  • mypy and ruff diagnostics show in the editor, and format-on-save leaves .py.jinja files untouched
  • python scripts/check.py passes inside the container

🤖 Generated with Claude Code

Add .devcontainer/devcontainer.json, based on the Python 3.13 bookworm
image so it matches the CI interpreter.

- postCreateCommand installs the hash-pinned tools from
  requirements-dev.txt and the SDK's metadata into the user's
  site-packages, so there is no .venv. Imports of `proofline` still
  resolve to the workspace sources. scripts/check.py still builds its
  own throwaway environments for the full gate.
- Adds the VS Code extensions for Python, mypy, ruff, Jinja templates,
  TOML, YAML and GitHub Actions.
- mypy is the only type checker. Pylance type checking is turned off so
  the editor doesn't show a second, conflicting set of errors.
- Ruff formats on save, except for *.py.jinja generator templates,
  which must stay byte-exact.
- Hides caches, .tools, .venv and openapi.public.json from the explorer,
  file watcher and search.

This branch has not been deployed

No deployments
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.

1 participant