Metadata-Version: 2.4
Name: pyright-analysis
Version: 1.0.0a0
Summary: Visualise Python project type completeness
Project-URL: GitHub, https://github.com/mjpieters/pyright-analysis
Author-email: Martijn Pieters <mj@zopatista.com>
License: Copyright 2024 Martijn Pieters
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the “Software”), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
        the Software, and to permit persons to whom the Software is furnished to do so,
        subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
        COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
        CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
License-File: LICENSE.txt
Keywords: pyright,type-compleness,visualisation
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: kaleido>=1.0.0rc0
Requires-Dist: plotly>=5.24.1
Requires-Dist: pydantic>=2.10.4
Requires-Dist: typer>=0.15.1
Description-Content-Type: text/markdown

# Generate a treemap graph from Pyright verifytypes output.

A simple cli tool to visualise the state of a Python project's _type compleness_, from the output of pyright's [`--outputjson --verifytypes` command](https://microsoft.github.io/pyright/#/typed-libraries?id=verifying-type-completeness):

![Sample graph output for prefect](https://raw.githubusercontent.com/mjpieters/pyright-analysis/refs/heads/main/assets/graph-screenshot.png)

## Usage

Use a Python tool manager like [`uv tool`](https://docs.astral.sh/uv/guides/tools/) or [`pipx`](https://pipx.pypa.io/):

```sh
$ uv tool install pyright pyright-analysis
```

Then generate a type compleness JSON report for your package, and transform the report into a graph:

```sh
$ 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:

![pyright-analysis help output](https://raw.githubusercontent.com/mjpieters/pyright-analysis/refs/heads/main/assets/cmd-help.png)

## 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.
