historical-call-graph-gif
Turn a git repository's history into a road map of its call network:
- an animated GIF and MP4, and
- a self-hosted interactive page (one HTML file, no network needed) you can pause, scrub, zoom and click.
Every file is a circle, every function a dot in it. Files that call each other sit near each other, and calls between files are merged into roads: road width is how many calls it carries, road colour is its age (green when new, blue when old). New functions flash green, removed ones flash amber. Click any function to see what GitGalaxy knows about it.
The layout is computed once for the whole history, so nothing moves between frames: you see the same city being built, widened and rebuilt.
Install
pip install historical-call-graph-gif gitgalaxy # gitgalaxy provides the scanner, 'galaxyscope'
The short command hcg-gif is an alias for historical-call-graph-gif. ffmpeg is optional (needed for MP4 and for the best-quality GIF; without it you still get a GIF and the HTML page).
Use
historical-call-graph-gif make path/to/your/repo -n 24 -o roads-out # or a clone URL
historical-call-graph-gif serve roads-out # http://127.0.0.1:8765/
make picks 24 snapshots evenly spaced in time across the first-parent history, extracts each with git archive
(your working tree, branches and index are never touched), scans each with GalaxyScope, and writes
roads-out/<name>.gif, .mp4 and .html.
Useful options: --ref main, --since 2022-01-01, --formats html (skip the GIF), --jobs 4, --history
(let GitGalaxy read git history too; slower, adds churn and stability to the file risk scores),
--keep-scans (keep the per-snapshot databases), --max-files 1500.
Already have a multi-commit GitGalaxy database (one repo_data row per commit)?
historical-call-graph-gif from-db path/to/master.db --repo curl -n 24
The interactive page
- Play / pause (space), step with the arrow keys, drag the slider, change speed.
- Click a function: name, file, archetype, lines, complexity, arguments, z-score, public/documented, who calls it and what it calls (click to jump), callers over time, its keyword signals, and its file's GitGalaxy risk scores. Its callers are drawn in white and its callees in blue.
- Click a file for its largest functions and risk scores. Search a function by name (Enter).
- Wheel to zoom, drag to pan, double-click to reset. Link straight to a view with
page.html#t=12&f=345. - Self-hosting:
historical-call-graph-gif serveis a plain static server (--host 0.0.0.0to share on your network). The HTML file also works opened directly from disk or dropped on any static host.
Metrics in the panel are from the last snapshot the function appeared in.
How to read it
- A function is identified by (file, name). A function that moves file shows as a death plus a birth. Captions report what share of the quarter's dead reappear under the same name, so a reorganisation reads as a move, not as churn.
- A road is all calls between one pair of files, merged. Calls are matched by name (same file first, otherwise a name that is unique in the snapshot), so ambiguous names are skipped.
- Positions are a force-directed sketch: heavily connected files are pulled towards the centre, but distance is a hint, not a measurement.
- Roads follow a small street network (junctions between nearby files, express lines for the busiest pairs) so that neighbours get direct routes and only long trips share highways.
Limits
Built and tested up to roughly 1,500 files and 13,000 functions per history (the curl repository); larger
histories keep the busiest files (--max-files). Scan time is GalaxyScope's, per snapshot.
Licence
This tool is licensed under the Apache License 2.0.
It runs the GitGalaxy scanner (galaxyscope) as a separate program and does not include or link to any GitGalaxy
code. The scanner is licensed separately (PolyForm Noncommercial 1.0.0 for the community tier), and scanning
with it is subject to those terms: using this tool commercially means holding a commercial GitGalaxy licence key.
The optional ffmpeg is likewise a separate program under its own licence.
Metadata
Release files for historical-call-graph-gif 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| historical_call_graph_gif-0.0.1.tar.gz | 37.2 kB | Without provenance | Details for historical_call_graph_gif-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| historical_call_graph_gif-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for historical_call_graph_gif-0.0.1-py3-none-any.whl |
Total release size: 74.9 kB
Release files / historical_call_graph_gif-0.0.1.tar.gz
| Download URL | historical_call_graph_gif-0.0.1.tar.gz |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0e898384c3369bcb0d55a9c1d11de4b5091d5b58a1154c2067830f4a481eba6
|
|
BLAKE2b-256 checksum How to use checksums |
e893592d50f7cccb2e18c8809207c7279a93a68bd9c1a6945a89c43b208101f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / historical_call_graph_gif-0.0.1-py3-none-any.whl
| Download URL | historical_call_graph_gif-0.0.1-py3-none-any.whl |
|---|---|
| Size | 37.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d1aa9e2a9f58ca52e265d8e573fee3ef3fa2631578a471963797d71e78c61cb
|
|
BLAKE2b-256 checksum How to use checksums |
6d6b5a6d57c2a932fd0e57e4122ffe0c15ba098e500697f266423b8715827282
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for historical-call-graph-gif 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.