Skip to content

Commit 3bd98e9

Browse files
committed
docs(template): refine README for Docker-first workflow and add project examples
1 parent a4f3f03 commit 3bd98e9

File tree

1 file changed

+85
-13
lines changed

1 file changed

+85
-13
lines changed

README.md

Lines changed: 85 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99

1010
* [About the Template](#about-the-template)
1111
* [Features](#features)
12+
* [Who Is This For?](#who-is-this-for)
1213
* [Project Structure](#project-structure)
1314
* [Tested with](#tested-with)
1415
* [Prerequisites](#prerequisites)
1516
* [Quickstart](#quickstart)
17+
* [Example Project Templates](#example-project-templates)
18+
* [1. Data Science / ML Project](#1-data-science--ml-project)
19+
* [2. Backend API / Service Project](#2-backend-api--service-project)
1620
* [🚀 Getting Started](#-getting-started)
1721
* [1. Configure environment and Python settings and API tokens](#1-configure-environment-and-python-settings-and-api-tokens)
1822
* [2. Set up Python project dependencies](#2-set-up-python-project-dependencies)
@@ -40,17 +44,19 @@
4044
## About the Template
4145

4246
**vim-python-docker-template** is a lightweight, flexible starting point for
43-
containerized Python development. It’s especially well-suited for data science
44-
and machine learning workflows that require OS-level packages,
45-
hardware-specific dependencies, or reproducible environments.
47+
containerized Python development where the only required host dependency is
48+
Docker.
4649

4750
This template allows you to write and run code inside the same containerized
48-
environment using **Vim configured as a full-featured IDE** — making it ideal
49-
for both local and remote development.
51+
environment using either:
52+
53+
* **Vim configured as a full-featured IDE** (`vim-ide`)
54+
* **VS Code in browser via code-server** (`code-server`)
5055

5156
Whether you're scripting pipelines, prototyping machine learning models, or
52-
building production tools, this setup provides a consistent, customizable
53-
workflow with Vim at the center.
57+
building production tools, this setup provides a consistent and reproducible
58+
workflow for build, lint, test, and run operations through `docker compose`
59+
commands.
5460

5561
> ✨ Designed to work with *any* Python project — just plug in your code and
5662
> dependencies.
@@ -66,11 +72,25 @@ Use it as-is or tailor it to match your team's development workflow.
6672

6773
## Features
6874

69-
* **Reproducible environments** for Python development
70-
* **IDE-like Vim setup**, ready to go out of the box
71-
* Supports custom **Python and Poetry** versions
72-
* Simple to extend with Jupyter, SQL drivers, and more
73-
* Works identically on any machine with Docker
75+
* **Docker-first workflow**: build, run, lint, and test inside containers
76+
* **Single host dependency**: Docker Engine + Compose
77+
* **Two editor paths**: `vim-ide` and `code-server` (VS Code in browser)
78+
* **Built-in quality checks** with `ruff` and `pytest`
79+
* **Reproducible Python environment** with customizable Python and Poetry
80+
versions
81+
* **Optional tooling**: JupyterLab, Codex CLI, Gemini CLI
82+
* **CI-ready template** with a simple GitHub Actions workflow
83+
84+
## Who Is This For?
85+
86+
* Teams that want Docker as the only required local dependency.
87+
* Data science / ML projects that need notebooks, reproducible dependencies,
88+
and optional GPU/OS packages.
89+
* Backend/API projects that need consistent lint/test/build behavior across
90+
machines.
91+
* Developers who prefer either terminal-first editing (`vim-ide`) or
92+
browser-based VS Code (`code-server`).
93+
* Repositories that need a simple CI baseline to extend over time.
7494

7595
## Project Structure
7696

@@ -98,6 +118,7 @@ This layout is intentionally minimal so it can be extended for any project.
98118

99119
## Prerequisites
100120

121+
* Docker is the only required local runtime dependency.
101122
* Docker Engine with `docker compose` v2.0+ (minimum). Tested versions are
102123
listed above.
103124
* `docker buildx` is required only for cross-platform builds (when
@@ -116,9 +137,12 @@ cp .env.dist .env
116137
cp .vimrc.dist .vimrc
117138
cp .coc-settings.json.dist .coc-settings.json
118139
docker compose build vim-ide
140+
docker compose run --rm vim-ide
141+
119142
# Optional alternative editor:
120143
# docker compose build code-server
121-
docker compose run --rm vim-ide
144+
# docker compose run --rm --service-ports code-server
145+
# Open: http://127.0.0.1:${CODE_SERVER_PORT:-8443}
122146
```
123147

124148
To exit Vim: `:q` (or `:qa` to quit all).
@@ -130,6 +154,53 @@ docker compose build dev
130154
docker compose run --rm dev
131155
```
132156

157+
## Example Project Templates
158+
159+
### 1. Data Science / ML Project
160+
161+
Use this template when your project mixes notebooks, experiments, and Python
162+
modules.
163+
164+
```text
165+
.
166+
├── src/<project_name>/...
167+
├── notebooks/
168+
├── data/
169+
│ ├── raw/
170+
│ └── processed/
171+
├── tests/
172+
├── pyproject.toml
173+
└── README.md
174+
```
175+
176+
Typical workflow:
177+
178+
```bash
179+
docker compose build dev jupyterlab
180+
docker compose run --rm --service-ports jupyterlab
181+
docker compose run --rm dev ruff check .
182+
docker compose run --rm dev pytest -q
183+
```
184+
185+
### 2. Backend API / Service Project
186+
187+
Use this template when your project is mostly application code, tests, and CI
188+
checks.
189+
190+
```text
191+
.
192+
├── src/<service_name>/
193+
│ ├── api.py
194+
│ ├── main.py
195+
│ └── settings.py
196+
├── tests/
197+
├── pyproject.toml
198+
└── README.md
199+
```
200+
201+
Typical workflow: keep app code in `src/`, run `ruff` + `pytest` in `dev`, and
202+
package runtime execution through the `app` service.
203+
133204
## 🚀 Getting Started
134205

135206
### 1. Configure environment and Python settings and API tokens
@@ -423,6 +494,7 @@ docker compose run --rm codex suggest tests --file src/sample/main.py
423494
## 🔒 Security notes
424495

425496
Never commit `.env` (it contains secrets like `OPENAI_API_KEY`,
497+
`CODE_SERVER_PASSWORD`,
426498
`GEMINI_API_KEY`, and `JUPYTER_TOKEN`).
427499

428500
If you need to share the resolved Compose config, use

0 commit comments

Comments
 (0)