Skip to content

Add one example per feature and run them in CI - #12

Merged
h0rv merged 5 commits into
mainfrom
examples
Oct 23, 2026
Merged

h0rv merged 5 commits into
mainfrom
examples

Conversation

@h0rv

@h0rv h0rv commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Answers MrBlenny#39, "More examples are needed". There's one short, runnable example per feature in examples/, listed in examples/README.md:

  • shapes and shape types
  • containers
  • styles
  • connections and arrowheads
  • tooltips and links
  • Markdown and code text, such as explanation (Add explanation inside the shape MrBlenny/py-d2#33)
  • grids
  • classes
  • SQL tables
  • UML classes
  • layers, scenarios and steps
  • config with TALA
  • ASCII output

The README's usage section now shows how to set a shape type and a tooltip, the two things that issue couldn't find.

A new examples CI job installs the bin extra and runs every example from a temporary directory, so the examples can't go stale.

Checked locally: all 14 examples run and write their SVGs, and ruff and ty are clean.

🤖 Generated with Claude Code

h0rv and others added 5 commits October 23, 2026 10:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@h0rv
h0rv merged commit 18fcce4 into main Oct 23, 2026
9 checks passed
@h0rv
h0rv deleted the examples branch October 23, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant