Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions docs/figures/make_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def role(key):
return " ".join(ROLES[key])


def _block(rect, name, role, t, filled, chars):
def _block(rect, name, role, t, chars, *, filled=False):
"""A repository: monospace identifier, wrapped role beneath it."""
x, y, w, h = rect
accent = t["enforcement"][1]
Expand All @@ -61,13 +61,13 @@ def _block(rect, name, role, t, filled, chars):
)


def render(t, name):
def render(t, _name):
"""One theme's copy of the family diagram."""
a = t["enforcement"][1]
svg = p.open_svg(W, H, t, "The open-coder-ai family", DESC)

intel = role("chock-threat-intel")
svg += _block((24, 24, 262, 72), "chock-threat-intel", intel, t, False, NARROW)
svg += _block((24, 24, 262, 72), "chock-threat-intel", intel, t, NARROW)

svg += p.box(314, 24, 262, 72, t["surface"], t["neutral"])
svg += p.text(326, 44, "plugin repositories", t["text"], NAME, p.MONO, "600")
Expand All @@ -78,11 +78,12 @@ def render(t, name):
svg += p.arrow(445, 122, 445, 96, a)

cat = role("chock-catalog")
svg += _block((24, 124, 552, 74), "chock-catalog", cat, t, True, WIDE)
svg += _block((24, 124, 552, 74), "chock-catalog", cat, t, WIDE, filled=True)
svg += p.arrow(300, 198, 300, 224, a)
svg += _block((24, 226, 552, 74), "chock", role("chock"), t, True, WIDE)
svg += _block((24, 226, 552, 74), "chock", role("chock"), t, WIDE, filled=True)
svg += p.arrow(300, 328, 300, 302, a)
svg += _block((24, 330, 552, 74), "agentseam", role("agentseam"), t, True, WIDE)
seam = role("agentseam")
svg += _block((24, 330, 552, 74), "agentseam", seam, t, WIDE, filled=True)

svg += p.box(596, 24, 180, 380, t["surface"], a)
svg += p.text(608, 46, "context-report", t["text"], NAME, p.MONO, "600")
Expand Down
2 changes: 1 addition & 1 deletion docs/figures/make_surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _node(cx, y, surface, t):
return out


def render(t, name):
def render(t, _name):
a = t["enforcement"][1]
n_names = len(CHOCK_AGENT)
n_vendors = len(set(CHOCK_AGENT.values()))
Expand Down
19 changes: 8 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,14 @@ max-statements = 50
"docs/assets/**" = ["ERA001", "PLR0913", "PLR0917", "PLR2004", "PLW2901", "RUF001", "RUF003", "RUF005", "S101", "S603", "T201"]
# docs/figures/{palette,make_family}.py are the open-coder-ai launch programme's shared
# figure tooling, copied byte-identically into every repo in the family and never
# hand-edited here (see docs/figures/make_surfaces.py's docstring): their SVG helpers take
# more than five positional args by design, `_block`'s `filled` is a real boolean the
# family diagram switches a fill on, and printing what a generator wrote is the feature.
"docs/figures/palette.py" = ["PLR0913", "PLR0917", "T201"]
"docs/figures/make_family.py" = ["ARG001", "FBT003", "PLR0913", "PLR0917", "T201"]
# chock's own figure generators, same dev/build-script reasoning as docs/assets above:
# render(t, name) fulfills the shared write_pair(stem, render) callback shape from
# docs/figures/palette.py even where a figure's drawing does not need `name`, and
# printing what each generator wrote is the feature.
"docs/figures/make_surfaces.py" = ["ARG001", "T201"]
"docs/figures/make_social_card.py" = ["T201"]
# hand-edited here (see docs/figures/make_surfaces.py's docstring): `box`, `text` and
# `arrow` take more than five arguments because they take coordinates, and `_block` takes
# more than five because it draws one. Named, not blanket, so a real bug in a file four
# repos depend on -- an undefined name, an unused import -- still surfaces here.
"docs/figures/palette.py" = ["PLR0913", "PLR0917"]
"docs/figures/make_family.py" = ["PLR0913"]
# A generator's print of what it wrote is the feature, same as docs/assets above.
"docs/figures/make_*.py" = ["T201"]
# A standalone CLI dev-tool script: printing its findings to stderr is the feature.
"tools/check_literal_duplication.py" = ["T201"]
"tools/check_readme_wordcount.py" = ["T201"]
Expand Down