feat: add first visualization for architecture entities#47
Merged
amhellmund merged 2 commits intomainfrom Mar 1, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the
archml visualizeCLI command that renders a box diagram for a specified system or component using the pydiagrams library.Summary
views/resolver.py: resolves::delimited entity paths across compiled ArchFilesviews/diagram.py: framework-agnosticDiagramDatabuilder + pydiagrams rendererarchml visualize <entity> <output> [directory]CLI subcommandpydiagrams>=0.1to project dependenciesTest plan
uv run pytestand confirm all tests passuv run ruff checkfor lintuv run ty checkfor type errorspydiagramsinstalls andarchml visualizerenders a diagramCloses #42
Generated with Claude Code