Metadata-Version: 2.4
Name: metripy
Version: 0.7.2
Summary: A Python tool to generate multi project, multi language code metric reports
Author-email: Yannick Zimmermann <yannick.zimmermann@proton.me>
License: MIT
Project-URL: Homepage, https://zimmer-yan.github.io/metripy/
Project-URL: Repository, https://github.com/zimmer-yan/metripy
Project-URL: Documentation, https://zimmer-yan.github.io/metripy/
Project-URL: Bug Tracker, https://github.com/zimmer-yan/metripy/issues
Keywords: code metrics,multi-language,code analysis,git metrics,code visualization,software quality,static analysis,repository insights,developer productivity,codebase health,technical debt,language-agnostic
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: lizard==1.18.0
Requires-Dist: GitPython==3.1.45
Requires-Dist: py-template-engine>=0.2.6
Requires-Dist: radon==6.0.1
Requires-Dist: requests==2.32.5
Requires-Dist: packaging==25.0
Requires-Dist: toml==0.10.2
Requires-Dist: tree-sitter==0.21.3
Requires-Dist: tree-sitter-languages==1.10.2
Requires-Dist: PyYAML==6.0.3
Requires-Dist: simhash==2.1.2
Requires-Dist: term-piechart==0.1.3
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov==7.0.0; extra == "dev"
Requires-Dist: pytest-mock==3.15.1; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: flake8>=5.0.0; extra == "dev"
Requires-Dist: mypy>=0.991; extra == "dev"
Requires-Dist: poethepoet==0.37.0; extra == "dev"
Requires-Dist: isort==7.0.0; extra == "dev"
Dynamic: license-file

# Metripy
A multilanguage, multi project code metrics analysis tool. 

[![PyPI version](https://img.shields.io/pypi/v/metripy.svg)](https://pypi.org/project/metripy/)
[![Tests](https://img.shields.io/badge/tests-109%20passed-brightgreen)](./tests)
[![Coverage](https://codecov.io/gh/zimmer-yan/metripy/branch/main/graph/badge.svg)](https://codecov.io/gh/zimmer-yan/metripy)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
[![Downloads](https://img.shields.io/pypi/dm/metripy.svg)](https://pypi.org/project/metripy/)


# Languages
Supported languages
- Python (with radon)
- Php (experimental)
- Typescript (experimental)
- TBD

# Analysis types

## Code analysis
Analyses code with cyclomatic complexity, maintainability index, halstead metrics.

## Git analysis
Analyses git stats of the past months

## Dependeny analysis
Analyzses composer, npm or pip dependencies

More dependencies TBD

# Report formats

## Html
Generates an easy to read dashboard

TODO: as this application generates multi project reports, add central dashboard to have project specific insights at first glance

## Csv
Coming soon...

## Json
Coming soon...

## Cli
Coming soon...

# Configuration
Configuration is for the moment only possible with the `--config=<file>.json` option. More TBD

Sample configuraiton:
```json
{
    "configs": {
        "metripy": {
            "base_path": "./", // base path to look at
            "includes": [
                "metripy/" // paths to include from the base path on
            ],
            "excludes": [
                "__pycache__" // exclude patterns of paths / files
            ],
            "extensions": [
                "py" // file extensions to look at
            ],
            "git": { // if git is set, analyzes git history
                "branch": "main" // git branch to look at
            },
            "composer": true, // looks for base_path/composer.json and analyzes dependencies - for php projects
            "npm": true, // looks for base_path/package.json and analyzes dependencies - for ts/js projects
            "pip": true,
            // looks for base_path/requirements.txt or base_path/pyproject.toml and analyzes dependencies - for python projects
            "reports": {
                "html": "./build/report/metripy", // report should be put into this directory
                "json-git": "./build/json-report/metripy-git.json" // file where to put git json report
                // more types of reports TBA
            }
        },
        // next project name: { next config... } 
    }
}
```

## Configuration for only git stats
```json
{
    "configs": {
        "metripy-git": {
            "base_path": "./",
            "git": {
                "branch": "main"
            },
            "reports": {
                "json-git": "./build/json-report/metripy-git.json"
            }
        }
    }
}
```
