Skip to content

feat: add first visualization for architecture entities#47

Merged
amhellmund merged 2 commits intomainfrom
claude/issue-42-20260301-1353
Mar 1, 2026
Merged

feat: add first visualization for architecture entities#47
amhellmund merged 2 commits intomainfrom
claude/issue-42-20260301-1353

Conversation

@amhellmund
Copy link
Copy Markdown
Owner

Implements the archml visualize CLI command that renders a box diagram for a specified system or component using the pydiagrams library.

Summary

  • New views/resolver.py: resolves :: delimited entity paths across compiled ArchFiles
  • New views/diagram.py: framework-agnostic DiagramData builder + pydiagrams renderer
  • New archml visualize <entity> <output> [directory] CLI subcommand
  • Adds pydiagrams>=0.1 to project dependencies
  • 31 new tests (resolver, diagram builder, renderer mock, CLI)

Test plan

  • Run uv run pytest and confirm all tests pass
  • Run uv run ruff check for lint
  • Run uv run ty check for type errors
  • Verify pydiagrams installs and archml visualize renders a diagram

Closes #42

Generated with Claude Code

github-actions bot and others added 2 commits March 1, 2026 14:06
Implements the `archml visualize` CLI command that renders a box diagram
for a specified system or component using the pydiagrams library.

Key changes:
- `src/archml/views/resolver.py`: entity resolver for `::` delimited paths
  (e.g. `SystemA::ComponentB::Sub`) across compiled ArchFile models.
- `src/archml/views/diagram.py`: `build_diagram_data()` builds a
  framework-agnostic `DiagramData` from a model entity; `render_diagram()`
  delegates to pydiagrams for the actual image output.
- `src/archml/cli/main.py`: new `visualize <entity> <output> [directory]`
  subcommand; gracefully handles missing pydiagrams with a clear error.
- `pyproject.toml`: adds `pydiagrams>=0.1` as a project dependency.
- Tests in `tests/views/test_resolver.py` and `tests/views/test_diagram.py`
  cover resolution logic and diagram building; the renderer is tested with a
  mocked pydiagrams so no real rendering is required in CI.
- `tests/cli/test_main.py`: extended with tests for the visualize command.

Closes #42

Co-authored-by: Andi Hellmund <amhellmund@users.noreply.github.com>
@amhellmund amhellmund merged commit 5d26db1 into main Mar 1, 2026
5 checks passed
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.

First visualization

1 participant