Skip to content

feat: SVG snapshot output and remote URL support for hg#5

Merged
deeplook merged 4 commits into
mainfrom
feat/hg-svg-snapshot
May 28, 2026
Merged

feat: SVG snapshot output and remote URL support for hg#5
deeplook merged 4 commits into
mainfrom
feat/hg-svg-snapshot

Conversation

@deeplook
Copy link
Copy Markdown
Owner

Summary

  • SVG snapshot output for git and hg — both commands now accept --output file.svg for single-frame snapshots, producing interactive SVGs with hover tooltips and CSS highlights, identical to map's SVG output
  • Remote URL support for hgdirplot hg now accepts https://, http://, and ssh:// URLs, cloning into a temp directory automatically (mirrors existing GitHub URL support in dirplot git)
  • click declared as explicit dependency — fixes potential ModuleNotFoundError under Python 3.14 where typer no longer pulls in click transitively
  • Remove svglib dependency — was added experimentally but not used in the codebase

Test plan

  • dirplot git <repo> --output snapshot.svg produces a valid SVG
  • dirplot hg <repo> --output snapshot.svg produces a valid SVG
  • dirplot hg https://hg.reportlab.com/hg-public/reportlab --inline works end-to-end
  • uv run pytest tests/test_git_local.py tests/test_hg_local.py passes
  • pip install dirplot under Python 3.14 does not raise ModuleNotFoundError for click

deeplook added 4 commits May 28, 2026 13:57
- dirplot hg and dirplot git now accept --output file.svg for
  single-frame snapshots, using the same interactive SVG renderer
  as dirplot map
- dirplot hg now accepts https://, http://, and ssh:// URLs,
  cloning to a temp dir automatically (mirrors git's GitHub support)
- Validation error updated to name both .png and .svg as valid
  snapshot extensions
- Tests added for SVG output and unsupported-extension rejection
  in both git and hg
dirplot imports click directly in _overview.py but relied on it being
pulled in transitively by typer. Since typer ~0.12 made click optional
in some builds, this caused ModuleNotFoundError under Python 3.14.
@deeplook deeplook merged commit ca8642c into main May 28, 2026
6 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.

1 participant