Skip to content

Commit 9d89050

Browse files
DevContainer
1 parent 0e46893 commit 9d89050

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM python:3.13-slim-bullseye
2+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
3+
4+
ENV UV_COMPILE_BYTECODE=1
5+
ENV UV_NO_CACHE=1
6+
7+
RUN apt update && \
8+
apt install -y --no-install-recommends \
9+
build-essential \
10+
cmake \
11+
curl \
12+
gcc \
13+
git \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
WORKDIR /workspaces/modern-python-boilerplate

.devcontainer/devcontainer.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "Modern Python Boilerplate DevContainer",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "."
6+
},
7+
"forwardPorts": [8000],
8+
"postCreateCommand": "uv sync && make commit",
9+
"remoteUser": "root",
10+
"features": {
11+
"ghcr.io/devcontainers/features/git:1": {}
12+
},
13+
"workspaceFolder": "/workspaces/modern-python-boilerplate"
14+
}

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ help:
1717
@echo " make allci Run all CI steps (check, format, type, test coverage)"
1818

1919
dev:
20-
modern_python_boilerplate
20+
uv run modern_python_boilerplate
2121

2222
prod:
23-
modern_python_boilerplate
23+
uv run modern_python_boilerplate
2424

2525
test:
2626
uv run pytest tests/
@@ -47,7 +47,7 @@ publish:
4747
uv publish
4848

4949
commit:
50-
pre-commit
50+
uv run pre-commit
5151

5252
dockerbuild:
5353
docker build -t modern-python-boilerplate:latest .

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ A global `Makefile` to run all the commands. You can run `make help` to see all
1919
- **Documentation**
2020
- Mkdocs for documentation building with Markdown `make doc`
2121
- Automatic build of the API Reference page
22-
- Pre-configured GitHub Action / Gitlab CI for publishing the documentation on Github pages / Gitlab pages
22+
- Pre-configured GitHub Action / Gitlab CI for publishing the documentation on Github pages / Gitlab page
2323
- **Running, Publishing and Deploying**
2424
- Build the pacakge with UV `make build`
2525
- Publish to PyPi with Twine `make publish`
2626
- Dockerfile to run in a container `make dockerbuild` and `make dockerrun`
27-
- DevContainer pre-configured. `.devcontainer/devcontainer.json`
27+
- DevContainer pre-configured. `.devcontainer/devcontainer.json`, working with PyCharm
2828

2929
# How to use
3030
1. Delete this README.md to replace by you package one.

0 commit comments

Comments
 (0)