Skip to content

Commit b662370

Browse files
asq-sheriffclaude
andcommitted
docs: clean up Mermaid diagrams and fix badges
- Remove all background colors from Mermaid diagrams - Add descriptive labels to all state transitions and connectors - Simplify node labels for better readability - Fix Python badge to use static 3.11+ instead of template variable - Update Prerequisites section with static Python version Diagrams updated: - Development Workflow: labeled transitions (save, stage, commit, push, triggers) - Project Structure: file descriptions as connector labels - Tool Stack: code flow with tool descriptions - Commit Lifecycle: hook sequence with action labels, decision flow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8c6c62a commit b662370

File tree

1 file changed

+80
-91
lines changed

1 file changed

+80
-91
lines changed

README.md

Lines changed: 80 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Modern Python Project Template | Cookiecutter | Best Practices | Production-Ready
66

7-
[![Python](https://img.shields.io/badge/Python-{{ cookiecutter.python_version }}+-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://python.org)
7+
[![Python](https://img.shields.io/badge/Python-3.11+-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://python.org)
88
[![Ruff](https://img.shields.io/badge/Linter-Ruff-D7FF64?style=for-the-badge&logo=ruff&logoColor=black)](https://github.com/astral-sh/ruff)
99
[![Pre-commit](https://img.shields.io/badge/Pre--commit-Enabled-brightgreen?style=for-the-badge&logo=pre-commit&logoColor=white)](https://pre-commit.com/)
1010
[![License](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](LICENSE)
@@ -38,56 +38,60 @@
3838

3939
```mermaid
4040
flowchart LR
41-
subgraph DEV["🖥️ Development"]
42-
A["✏️ Write<br/>Code"] --> B["💾 Save<br/>File"]
41+
subgraph DEV["Development Phase"]
42+
A[Write Code] -->|save| B[Save File]
4343
end
4444
45-
subgraph VCS["📦 Version Control"]
46-
B --> C["📝 Stage<br/>Changes"]
47-
C --> D["✅ Commit"]
48-
D --> E["🚀 Push<br/>to Remote"]
45+
subgraph VCS["Version Control"]
46+
B -->|stage| C[Stage Changes]
47+
C -->|commit| D[Commit]
48+
D -->|push| E[Push to Remote]
4949
end
5050
51-
subgraph GATES["🛡️ Automated Quality Gates"]
51+
subgraph GATES["Quality Gates"]
5252
direction TB
53-
D -.-> G1["🔍 Ruff<br/>Lint + Format"]
54-
D -.-> G2["🔷 Mypy<br/>Type Check"]
55-
D -.-> G3["🔒 Bandit<br/>Security Scan"]
56-
D -.-> G4["📋 Commitizen<br/>Conventional Commits"]
53+
G1[Ruff - Lint & Format]
54+
G2[Mypy - Type Check]
55+
G3[Bandit - Security Scan]
56+
G4[Commitizen - Commit Validation]
5757
end
5858
59-
style DEV fill:#e1f5fe,stroke:#01579b
60-
style VCS fill:#f3e5f5,stroke:#4a148c
61-
style GATES fill:#fff3e0,stroke:#e65100
59+
D -.->|triggers| G1
60+
D -.->|triggers| G2
61+
D -.->|triggers| G3
62+
D -.->|triggers| G4
6263
```
6364

6465
### Project Structure
6566

6667
```mermaid
6768
flowchart TB
68-
subgraph ROOT["📁 project_name/"]
69+
subgraph ROOT["project_name/"]
6970
direction TB
70-
subgraph SRC["📂 src/"]
71-
subgraph PKG["📂 project_name/"]
72-
INIT["📄 __init__.py<br/><small>Package init</small>"]
73-
MAIN["📄 main.py<br/><small>Core logic</small>"]
74-
CLI["📄 my_cli.py<br/><small>Typer CLI</small>"]
75-
RICH["📄 rich_demo.py<br/><small>Rich UI demos</small>"]
71+
subgraph SRC["src/"]
72+
subgraph PKG["project_name/"]
73+
INIT["__init__.py"]
74+
MAIN["main.py"]
75+
CLI["my_cli.py"]
76+
RICH["rich_demo.py"]
7677
end
7778
end
78-
subgraph TESTS["📂 tests/"]
79-
TEST["📄 test_main.py<br/><small>Pytest suite</small>"]
79+
subgraph TESTS["tests/"]
80+
TEST["test_main.py"]
8081
end
81-
PYPROJ["📄 pyproject.toml<br/><small>Unified config</small>"]
82-
PRECOMMIT["📄 .pre-commit-config.yaml<br/><small>Git hooks</small>"]
83-
README["📄 README.md<br/><small>Documentation</small>"]
84-
GITIGNORE["📄 .gitignore"]
82+
PYPROJ["pyproject.toml"]
83+
PRECOMMIT[".pre-commit-config.yaml"]
84+
README["README.md"]
85+
GITIGNORE[".gitignore"]
8586
end
8687
87-
style ROOT fill:#e8f5e9,stroke:#2e7d32
88-
style SRC fill:#e3f2fd,stroke:#1565c0
89-
style PKG fill:#fff8e1,stroke:#f9a825
90-
style TESTS fill:#fce4ec,stroke:#c2185b
88+
INIT ---|Package initialization| PKG
89+
MAIN ---|Core application logic| PKG
90+
CLI ---|Typer CLI interface| PKG
91+
RICH ---|Rich terminal demos| PKG
92+
TEST ---|Pytest test suite| TESTS
93+
PYPROJ ---|Unified Python config| ROOT
94+
PRECOMMIT ---|Git hooks config| ROOT
9195
```
9296

9397
---
@@ -122,7 +126,7 @@ flowchart TB
122126
## 🚀 Quick Start
123127

124128
### Prerequisites
125-
- Python {{ cookiecutter.python_version }}+
129+
- Python 3.11+
126130
- [Cookiecutter](https://cookiecutter.readthedocs.io/) (`pip install cookiecutter`)
127131

128132
### Generate Your Project
@@ -152,49 +156,36 @@ pre-commit install --install-hooks
152156
## 📦 Tool Stack
153157

154158
```mermaid
155-
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#e8f5e9', 'primaryBorderColor': '#2e7d32'}}}%%
156159
flowchart TB
157-
subgraph TOOLCHAIN["🐍 MODERN PYTHON TOOLCHAIN"]
158-
direction TB
159-
subgraph ROW1[" "]
160-
direction LR
161-
subgraph RUFF["🔍 RUFF<br/>Linting & Formatting"]
162-
R1["✓ Replaces Black"]
163-
R2["✓ Replaces isort"]
164-
R3["✓ Replaces Flake8"]
165-
R4["⚡ 10-100x faster"]
166-
end
167-
subgraph MYPY["🔷 MYPY<br/>Type Checking"]
168-
M1["✓ Strict mode"]
169-
M2["✓ Type inference"]
170-
M3["✓ Plugin support"]
171-
M4["✓ IDE integration"]
172-
end
160+
subgraph TOOLCHAIN["Modern Python Toolchain"]
161+
direction LR
162+
subgraph LINT["Linting & Formatting"]
163+
RUFF[Ruff]
173164
end
174-
subgraph ROW2[" "]
175-
direction LR
176-
subgraph PYTEST["🧪 PYTEST<br/>Testing"]
177-
P1["✓ Async support"]
178-
P2["✓ Coverage report"]
179-
P3["✓ Fixtures"]
180-
P4["✓ Parameterized"]
181-
end
182-
subgraph BANDIT["🔒 BANDIT<br/>Security"]
183-
B1["✓ SAST scanning"]
184-
B2["✓ OWASP checks"]
185-
B3["✓ CI integration"]
186-
B4["✓ Custom rules"]
187-
end
165+
subgraph TYPE["Type Checking"]
166+
MYPY[Mypy]
167+
end
168+
subgraph TEST["Testing"]
169+
PYTEST[Pytest]
170+
end
171+
subgraph SEC["Security"]
172+
BANDIT[Bandit]
188173
end
189174
end
190175
191-
style TOOLCHAIN fill:#fafafa,stroke:#424242
192-
style RUFF fill:#d7ff64,stroke:#827717
193-
style MYPY fill:#bbdefb,stroke:#1565c0
194-
style PYTEST fill:#fff9c4,stroke:#f9a825
195-
style BANDIT fill:#ffcdd2,stroke:#c62828
196-
style ROW1 fill:transparent,stroke:transparent
197-
style ROW2 fill:transparent,stroke:transparent
176+
RUFF ---|Replaces Black, isort, Flake8| LINT
177+
RUFF ---|10-100x faster| LINT
178+
MYPY ---|Strict mode enabled| TYPE
179+
MYPY ---|Full type inference| TYPE
180+
PYTEST ---|Async & coverage support| TEST
181+
PYTEST ---|Fixtures & parameterized| TEST
182+
BANDIT ---|SAST scanning| SEC
183+
BANDIT ---|OWASP compliance| SEC
184+
185+
CODE[Your Code] -->|lint & format| RUFF
186+
CODE -->|type check| MYPY
187+
CODE -->|test| PYTEST
188+
CODE -->|security scan| BANDIT
198189
```
199190

200191
---
@@ -236,32 +227,30 @@ dev = [
236227

237228
```mermaid
238229
flowchart TD
239-
A["📝 <b>git add .</b><br/><small>Stage changes</small>"] --> B["💬 <b>git commit -m 'feat: ...'</b><br/><small>Create commit</small>"]
230+
A[git add .] -->|stage changes| B[git commit]
240231
241-
B --> HOOKS
232+
B -->|triggers| HOOKS
242233
243-
subgraph HOOKS["🔗 PRE-COMMIT HOOKS"]
234+
subgraph HOOKS["Pre-commit Hooks"]
244235
direction TB
245-
H1["1️⃣ <b>ruff check --fix</b><br/><small>Auto-fix lint issues</small>"]
246-
H2["2️⃣ <b>ruff format</b><br/><small>Format code</small>"]
247-
H3["3️⃣ <b>mypy</b><br/><small>Type check</small>"]
248-
H4["4️⃣ <b>bandit</b><br/><small>Security scan</small>"]
249-
H5["5️⃣ <b>commitizen</b><br/><small>Validate message</small>"]
250-
H1 --> H2 --> H3 --> H4 --> H5
236+
H1[ruff check --fix]
237+
H2[ruff format]
238+
H3[mypy]
239+
H4[bandit]
240+
H5[commitizen]
241+
H1 -->|auto-fix lint| H2
242+
H2 -->|format code| H3
243+
H3 -->|type check| H4
244+
H4 -->|security scan| H5
245+
H5 -->|validate message| DONE[Hooks Complete]
251246
end
252247
253-
HOOKS --> CHECK{All Checks<br/>Pass?}
254-
255-
CHECK -->|"✅ Yes"| SUCCESS["🎉 <b>Commit Succeeds</b><br/><small>Changes recorded</small>"]
256-
CHECK -->|"❌ No"| FAIL["🔧 <b>Commit Blocked</b><br/><small>Fix issues & retry</small>"]
257-
FAIL --> A
248+
HOOKS --> CHECK{All Checks Pass?}
258249
259-
style A fill:#e3f2fd,stroke:#1565c0
260-
style B fill:#e3f2fd,stroke:#1565c0
261-
style HOOKS fill:#fff3e0,stroke:#e65100
262-
style CHECK fill:#f3e5f5,stroke:#7b1fa2
263-
style SUCCESS fill:#e8f5e9,stroke:#2e7d32
264-
style FAIL fill:#ffebee,stroke:#c62828
250+
CHECK -->|yes| SUCCESS[Commit Succeeds]
251+
CHECK -->|no| FAIL[Commit Blocked]
252+
FAIL -->|fix issues| A
253+
SUCCESS -->|optional| PUSH[git push]
265254
```
266255

267256
### Commands Reference

0 commit comments

Comments
 (0)