diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..3783e35 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,6 @@ +ARG UV_VERSION=0.11.16 +FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv + +FROM mcr.microsoft.com/devcontainers/python:3.12 + +COPY --from=uv /uv /uvx /usr/local/bin/ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..d64c859 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,28 @@ +{ + "name": "OpenDecree Python SDK", + "build": { + "dockerfile": "Dockerfile" + }, + "postCreateCommand": "uv venv --python 3.12 .venv && uv pip install --python .venv/bin/python -e \"sdk[dev]\"", + "remoteEnv": { + "VIRTUAL_ENV": "${workspaceFolder}/.venv", + "PATH": "${workspaceFolder}/.venv/bin:${containerEnv:PATH}" + }, + "customizations": { + "vscode": { + "settings": { + "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python", + "python.testing.pytestArgs": [ + "sdk/tests" + ], + "python.testing.pytestEnabled": true, + "ruff.nativeServer": "on" + }, + "extensions": [ + "ms-python.python", + "ms-python.mypy-type-checker", + "charliermarsh.ruff" + ] + } + } +} diff --git a/README.md b/README.md index 6181554..a921031 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![License](https://img.shields.io/github/license/opendecree/decree-python)](LICENSE) [![Project Status: WIP](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![codecov](https://codecov.io/gh/opendecree/decree-python/graph/badge.svg)](https://codecov.io/gh/opendecree/decree-python) +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/opendecree/decree-python) Python SDK for [OpenDecree](https://github.com/opendecree/decree) — schema-driven configuration management.