Skip to content

Commit 2c4ef95

Browse files
authored
Merge pull request #122 from alexjrk/feature/setup-devcontainers
🧹 Setup devcontainers
2 parents bb03294 + e8bf28e commit 2c4ef95

File tree

5 files changed

+44
-5
lines changed

5 files changed

+44
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM python:3.13-slim
2+
3+
# Install UV
4+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
5+
6+
# Install git
7+
RUN apt-get update \
8+
&& apt-get install -y --no-install-recommends git \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
# Install Python dependencies
12+
WORKDIR /workspaces/python-wiremock
13+
COPY pyproject.toml uv.lock ./
14+
ENV UV_PROJECT_ENVIRONMENT=/usr/local
15+
RUN uv sync --frozen

.devcontainer/devcontainer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Python Wiremock",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
6+
},
7+
"overrideCommand": true,
8+
"customizations": {
9+
"vscode": {
10+
"extensions": [
11+
"ms-python.python",
12+
"charliermarsh.ruff"
13+
]
14+
}
15+
}
16+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"[python]": {
3+
"editor.defaultFormatter": "charliermarsh.ruff"
4+
},
5+
"editor.formatOnSave": true,
6+
}

docs/CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ General expectations:
2626

2727
## Development
2828

29-
We use [UV](https://docs.astral.sh/uv/) for packaging and dependency management.
29+
We use **VSCode Dev Containers** for development.
3030

31-
After forking and cloning the repository,
32-
run the following command to setup the project:
31+
If you'd like to contribute:
3332

34-
`uv sync`
33+
1. Follow [this tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial) to set up Dev Containers.
34+
2. Once set up, open the `python-wiremock` folder in VSCode.
35+
3. Use the **Dev Containers** extension to reopen the project inside the container.
3536

36-
Then use your favorite IDE for development and testing.
37+
That's it - you'll have a ready-to-use development environment.
3738

3839
## Contributing examples
3940

0 commit comments

Comments
 (0)