Metadata-Version: 2.4
Name: panoptipy
Version: 0.0.9
Summary: A Python package for static code quality assessment
Author-email: Arthur Turrell <anon@anon.gmail.com>
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1.8
Requires-Dist: complexipy>=0.4.0
Requires-Dist: gitpython>=3.1.44
Requires-Dist: loguru>=0.7.3
Requires-Dist: nbstripout>=0.8.1
Requires-Dist: pandas>=2.2.3
Requires-Dist: pluggy>=1.5.0
Requires-Dist: pre-commit>=4.2.0
Requires-Dist: pyarrow>=19.0.1
Requires-Dist: pydoclint>=0.6.6
Requires-Dist: pytest>=8.3.5
Requires-Dist: quartodoc>=0.9.1
Requires-Dist: rich>=14.0.0
Requires-Dist: ruff>=0.11.5
Requires-Dist: sqlfluff>=3.4.2
Requires-Dist: toml>=0.10.2
Requires-Dist: validate-pyproject[all]>=0.24.1
Dynamic: license-file

# panoptipy

A Package for the Static Code Quality Assessment of Python codebases. It scans local codebases or remote GitHub repositories and generates a report summarising various code quality metrics.

![SVG logo of panoptipy](docs/logo.svg)

[![PyPI](https://img.shields.io/pypi/v/panoptipy.svg)](https://pypi.org/project/panoptipy/)
[![Status](https://img.shields.io/pypi/status/panoptipy.svg)](https://pypi.org/project/panoptipy/)
[![Python Version](https://img.shields.io/pypi/pyversions/panoptipy)](https://pypi.org/project/panoptipy)
[![License](https://img.shields.io/pypi/l/panoptipy)](https://opensource.org/licenses/MIT)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Tests](https://github.com/aeturrell/panoptipy/workflows/Tests/badge.svg)](https://github.com/aeturrell/panoptipy/actions?workflow=Tests)
[![Codecov](https://codecov.io/gh/aeturrell/panoptipy/branch/main/graph/badge.svg)](https://codecov.io/gh/aeturrell/panoptipy)
[![Read the documentation at https://aeturrell.github.io/panoptipy/](https://img.shields.io/badge/Go%20to%20the%20docs-purple?style=flat)](https://aeturrell.github.io/panoptipy/)
[![Downloads](https://static.pepy.tech/badge/panoptipy)](https://pepy.tech/projects/panoptipy)

![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)
![macOS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=macos&logoColor=F0F0F0)
![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)
[![Source](https://img.shields.io/badge/source%20code-github-lightgrey?style=for-the-badge)](https://github.com/aeturrell/panoptipy)


## Quickstart

The main way to use **panoptipy** is through its command-line interface. Here's how to scan a Python codebase that is in the "project" directory:

```bash
# Basic scan with default settings
$ panoptipy scan /path/to/project
```

To run on multiple directories, you can specify them as a space-separated list:

```bash
# Scan multiple directories
$ panoptipy scan /path/to/project1 /path/to/project2
```

You can also use wildcards to specify directories:

```bash
# Scan all directories in the current directory
$ panoptipy scan ./*
```

Using the `scan` command in this way will:

- Load *all* configured checks (there's a list below)
- Analyse your codebase
- Generate a report with the results
- Output the report to the console (by default)

The scan report shows:

- Overall codebase rating (Gold, Silver, Bronze, or Problematic)
- A summary of whether each individual check passed or not
- Detailed information about any failures

## What is **panoptipy** for?

There is a lot of overlap between **panoptipy** and **pre-commit** (with the relevant hooks). So what are the differences?

- **pre-commit** is meant to be used by developers to check their own code before they commit it or in Continuous Integration (CI) / Continous Deployment (CD) pipelines.
- **panoptipy** has features that help the leaders and managers of other developers. To that end it can summarise the results of many code repos at once.
- **panoptipy** can be be used to generate and export reports in a variety of formats (JSON, parquet) for further analysis.

These packages are similar in that they can both be used in CI/CD pipelines but **pre-commit** should be your first port of call for that and is not only more geared to that use, but also *far* more mature.

## Installation

You can use **panoptipy** as a stand-alone tool via [Astral's uv](https://docs.astral.sh/uv/) package:

```bash
uvx panoptipy scan .
```

Alternatively, you can install it as a Python package with `pip install` or `uv add`.

To install the development version from git, use:

```bash
pip install git+https://github.com/aeturrell/panoptipy.git
```

## Documentation

You can find the full documentation for **panoptipy** at [https://aeturrell.github.io/panoptipy/](https://aeturrell.github.io/panoptipy/).
