Visualise Python project type completeness
Project description
Generate a treemap graph from Pyright verifytypes output.
A simple cli tool to visualise the state of a Python project's type completeness, from the output of pyright's --outputjson --verifytypes command:
The interactive graph depicts a projects modules as a tree, with each the size of each module based on the number of exported symbols.
Usage
Use a Python tool manager like uv tool or pipx:
$ uv tool install pyright
$ uv tool install pyright-analysis
Then generate a type completeness JSON report for your package, and transform the report into a graph:
$ pyright --outputjson --ignoreexternal --verifytypes PACKAGE > PACKAGE.json
$ pyright-analysis PACKAGE.json
This will open the resulting graph in your browser.
Full help documentation is available on the command-line:
Features
- Interactive responsive graph. Hover over each package to get more detail about symbol counts and completeness, or click on packages to zoom in.
- Export options:
- Full stand-alone HTML page.
- HTML div snippet with configurable HTML id.
- Static image export as PNG, JPG, WebP, SVG or PDF.
- Plotly JSON graph representation.
GitHub Action
You can generate visualiations for your own projects in your GitHub workflow by using the pyright-analysis-action action.
Development
This project uses uv to handle Python dependencies and environments; use uv sync to get an up-to-date virtualenv with all dependencies. This includes development dependencies such as Ruff (used for linting and formatting) and Pyright (used to validate type annotations).
Linting and formatting
While PRs and commits on GitHub are checked for linting and formatting issues, it's easier to check for issues locally first. After running uv sync, run uv run pre-commit install to install pre-commit hooks that will run these tools and format your changes automatically on commits. These hooks also run uv sync whenever you working tree changes.
Testing
This project uses pytest to run its tests: uv run pytest.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyright_analysis-1.0.0.tar.gz.
File metadata
- Download URL: pyright_analysis-1.0.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d76fe897bb6c9f7cd26d09b51a68013ab74b0f33862bdb0ad43c0f46f423f92
|
|
| MD5 |
add9f9f807a6b2745d7bc41583c64f5e
|
|
| BLAKE2b-256 |
6043fd39aeddd38849b9a0ee45f1614009aff926100dd26ccd30324cfbfef5de
|
Provenance
The following attestation bundles were made for pyright_analysis-1.0.0.tar.gz:
Publisher:
ci-cd.yml on mjpieters/pyright-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyright_analysis-1.0.0.tar.gz -
Subject digest:
1d76fe897bb6c9f7cd26d09b51a68013ab74b0f33862bdb0ad43c0f46f423f92 - Sigstore transparency entry: 164438228
- Sigstore integration time:
-
Permalink:
mjpieters/pyright-analysis@209eb40dbbfe97307b28f6ebc1cdbeb88b6f9da9 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/mjpieters
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@209eb40dbbfe97307b28f6ebc1cdbeb88b6f9da9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyright_analysis-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyright_analysis-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eabe1123c954c0528eb37fc16afd1095376f6152b7685fc7bf67c8975ad536b0
|
|
| MD5 |
7ae0751057f16a3d50b88aad9f534bcc
|
|
| BLAKE2b-256 |
b82311fc129e1e91a74bb7ce63c25078f23a339f42bfd8e3632b2b1ba313262e
|
Provenance
The following attestation bundles were made for pyright_analysis-1.0.0-py3-none-any.whl:
Publisher:
ci-cd.yml on mjpieters/pyright-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyright_analysis-1.0.0-py3-none-any.whl -
Subject digest:
eabe1123c954c0528eb37fc16afd1095376f6152b7685fc7bf67c8975ad536b0 - Sigstore transparency entry: 164438231
- Sigstore integration time:
-
Permalink:
mjpieters/pyright-analysis@209eb40dbbfe97307b28f6ebc1cdbeb88b6f9da9 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/mjpieters
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@209eb40dbbfe97307b28f6ebc1cdbeb88b6f9da9 -
Trigger Event:
push
-
Statement type: