diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..6f26ecc --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.13-slim + +# Install UV +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ + +# Install git +RUN apt-get update \ + && apt-get install -y --no-install-recommends git \ + && rm -rf /var/lib/apt/lists/* + +# Install Python dependencies +WORKDIR /workspaces/python-wiremock +COPY pyproject.toml uv.lock ./ +ENV UV_PROJECT_ENVIRONMENT=/usr/local +RUN uv sync --frozen \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..270fb99 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "Python Wiremock", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "overrideCommand": true, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "charliermarsh.ruff" + ] + } + } +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..94f480d --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..eaaa2db --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff" + }, + "editor.formatOnSave": true, +} \ No newline at end of file diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 8b78448..6687e32 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -26,14 +26,15 @@ General expectations: ## Development -We use [UV](https://docs.astral.sh/uv/) for packaging and dependency management. +We use **VSCode Dev Containers** for development. -After forking and cloning the repository, -run the following command to setup the project: +If you'd like to contribute: -`uv sync` +1. Follow [this tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial) to set up Dev Containers. +2. Once set up, open the `python-wiremock` folder in VSCode. +3. Use the **Dev Containers** extension to reopen the project inside the container. -Then use your favorite IDE for development and testing. +That's it - you'll have a ready-to-use development environment. ## Contributing examples