Skip to content

Commit c5bb3a2

Browse files
lesnik512claude
andauthored
Onboard modern-di-starlette: brand mark + surfaces (#29)
* docs: design for onboarding modern-di-starlette into brand + surfaces Full-lane bundle: mint the sparkle-cluster mark, regenerate brand assets, list the integration on the profile README and docs site, and align its GitHub repo settings with org conventions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: implementation plan for modern-di-starlette onboarding Five tasks: mint the sparkle-cluster mark, regenerate assets, list on the profile README + docs site, align GitHub repo settings, open the PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(brand): add sparkle-cluster mark for modern-di-starlette * chore(brand): generate modern-di-starlette assets * docs: list modern-di-starlette on profile README and docs site --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bd1788f commit c5bb3a2

13 files changed

Lines changed: 437 additions & 1 deletion

File tree

brand/build/projects.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"that-depends": lambda: sym.graph(_CX, _CY, R, dashed=False),
2121
"modern-di-fastapi": lambda: sym.bolt_disc(_CX, _CY, R),
2222
"modern-di-litestar": lambda: sym.star_disc(_CX, _CY, R),
23+
"modern-di-starlette": lambda: sym.sparkle_cluster(_CX, _CY, R),
2324
"modern-di-faststream": lambda: sym.faststream(_CX, _CY, R),
2425
"modern-di-typer": lambda: sym.terminal(_CX, _CY, R),
2526
"modern-di-pytest": lambda: sym.bars(_CX, _CY, R),

brand/build/symbols.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,36 @@ def _star5(cx: float, cy: float, radius: float, color: str, inner: float = 0.42)
5454
return f'<polygon points="{body}" fill="{color}"/>'
5555

5656

57+
def _sparkle4(cx: float, cy: float, radius: float, color: str, inner: float = 0.34) -> str:
58+
"""Four-point sparkle (concave star) centred on (cx,cy)."""
59+
pts: list[tuple[float, float]] = []
60+
for i in range(4):
61+
ao = -90 + i * 90
62+
pts.append(
63+
(
64+
cx + radius * math.cos(math.radians(ao)),
65+
cy + radius * math.sin(math.radians(ao)),
66+
)
67+
)
68+
ai = ao + 45
69+
pts.append(
70+
(
71+
cx + radius * inner * math.cos(math.radians(ai)),
72+
cy + radius * inner * math.sin(math.radians(ai)),
73+
)
74+
)
75+
body = " ".join(f"{x:.1f},{y:.1f}" for x, y in pts)
76+
return f'<polygon points="{body}" fill="{color}"/>'
77+
78+
79+
def sparkle_cluster(cx: float, cy: float, r: float) -> str:
80+
"""Starlette cue: a large four-point sparkle with a small companion
81+
(a "little star" — starlette)."""
82+
big = _sparkle4(cx - 0.174 * r, cy + 0.130 * r, r * 0.82, GOLD)
83+
small = _sparkle4(cx + 0.565 * r, cy - 0.522 * r, r * 0.36, GOLD)
84+
return big + small
85+
86+
5787
def _circ_arc(cx: float, cy: float, rad: float, a0: float, a1: float, w: float) -> str:
5888
"""Clockwise arc a0->a1 (deg, increasing) with a leading arrowhead at a1."""
5989
a1s = a1 - 7 # stop the stroke short so the head caps it cleanly
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
1.91 KB
Loading
7.12 KB
Loading
3.19 KB
Loading
Lines changed: 1 addition & 0 deletions
Loading

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ production Python services. Use one piece or all of them — each is independent
6767
- **Wire your dependencies** with
6868
[`modern-di`](https://github.com/modern-python/modern-di) — typed, scoped
6969
dependency injection with one wiring shared across FastAPI, Litestar,
70-
FastStream, and Typer.
70+
Starlette, FastStream, and Typer.
7171
([`that-depends`](https://github.com/modern-python/that-depends), its
7272
production-proven predecessor, is still maintained.)
7373
- **Call other services reliably** with
@@ -98,6 +98,7 @@ catalog below.
9898
- [`modern-di`](https://github.com/modern-python/modern-di) — powerful DI framework with scopes.
9999
- [`modern-di-fastapi`](https://github.com/modern-python/modern-di-fastapi)`modern-di` integration for FastAPI.
100100
- [`modern-di-litestar`](https://github.com/modern-python/modern-di-litestar)`modern-di` integration for Litestar.
101+
- [`modern-di-starlette`](https://github.com/modern-python/modern-di-starlette)`modern-di` integration for Starlette.
101102
- [`modern-di-faststream`](https://github.com/modern-python/modern-di-faststream)`modern-di` integration for FastStream.
102103
- [`modern-di-typer`](https://github.com/modern-python/modern-di-typer)`modern-di` integration for Typer.
103104
- [`modern-di-pytest`](https://github.com/modern-python/modern-di-pytest)`modern-di` integration for pytest.

0 commit comments

Comments
 (0)