Skip to main content

A powerful collection of Git repository analysis tools and visualizations.

Project description

GitInsight

GitRepository Analysis and Visualization Tool / Git 仓库分析与可视化工具

MIT License PyPI Version Python Versions Release


目录

上手指南

开发前的配置要求
  1. Python >= 3.12
  2. uv (推荐使用 uv 进行包管理) 或 pip
安装步骤
  1. Clone the repo
git clone https://github.com/Rain-kl/GitInsight.git
cd GitInsight
  1. Install as a command-line tool
# Install from PyPI
uv tool install gitinsight-cli

# Install from the current checkout
uv tool install .

# Or install directly from GitHub
uv tool install git+https://github.com/Rain-kl/GitInsight.git
  1. Run the tool
gitinsight /path/to/git/repository

Upgrade or uninstall the tool:

uv tool upgrade gitinsight-cli
uv tool uninstall gitinsight-cli

For local development:

uv sync
uv run gitinsight /path/to/git/repository

文件目录说明

GitInsight
├── .github/             # GitHub 配置
├── gitinsight/          # 源代码目录
│   ├── __init__.py
│   ├── __main__.py      # 程序入口
│   ├── analysis.py      # 分析逻辑 (Pandas)
│   ├── charts.py        # 图表绘制 (Pyecharts)
│   ├── dashboard.py     # 仪表盘展示
│   ├── git_reader.py    # Git日志读取
│   └── report.py        # 报告生成
├── .gitignore
├── pyproject.toml       # 项目配置与依赖
├── uv.lock              # 依赖锁定文件
└── README.md            # 项目说明

开发的架构

本项目主要由数据读取、数据分析、图表生成和仪表盘展示四个部分组成。

  • git_reader.py: 负责读取 Git 仓库的提交日志。
  • analysis.py: 使用 Pandas 对日志数据进行清洗和统计分析。
  • charts.py: 使用 Pyecharts 生成各类可视化图表。
  • dashboard.py: 整合图表生成 HTML 仪表盘。

请阅读架构文档(如有)查阅为该项目的架构。

部署

本项目作为 Python 命令行工具发布到 PyPI,安装后的命令名为 gitinsight

发布新版本

  1. 更新 pyproject.toml 中的版本并刷新锁文件:
uv version 0.2.0
uv lock
  1. 提交版本变更,然后创建并推送同版本标签:
git tag -a v0.2.0 -m "v0.2.0"
git push GitInsight main
git push GitInsight v0.2.0

v* 标签会触发 GitHub Actions。工作流会校验标签与项目版本一致, 构建 wheel 和源码包、创建 GitHub Release,并通过 PyPI Trusted Publishing 发布,无需配置长期 PyPI Token。

使用到的框架

  • Pandas - Data structures and analysis tools
  • Pyecharts - Python Echarts Plotting Library
  • Loguru - Python logging made (stupidly) simple
  • Hatchling - Modern, extensible Python build backend

贡献者

请阅读CONTRIBUTING.md 查阅为该项目做出贡献的开发者。

如何参与开源项目

贡献使开源社区成为一个学习、激励和创造的绝佳场所。你所作的任何贡献都是非常感谢的。

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitinsight_cli-0.1.1.tar.gz (50.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitinsight_cli-0.1.1-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file gitinsight_cli-0.1.1.tar.gz.

File metadata

  • Download URL: gitinsight_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 50.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gitinsight_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d42efeff988549b1318e4c02894188caa829a94c07a4208b4991aaf8a14b3d51
MD5 612d4767f7ac7c210ec94c96b179e8dd
BLAKE2b-256 ef37f2341f1014f6c4ac2decd1dc928117bfea6258494a4f65d5b46969b83921

See more details on using hashes here.

File details

Details for the file gitinsight_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gitinsight_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gitinsight_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6e13bb90059919e610f799f7bab8b6e3fd2baaec3bb1911ea7a8ec32d16627e
MD5 3302914e4c221449906a5ad3a29e6879
BLAKE2b-256 8508ff4487ca738cc4219cd1aeaae92825194a2c4e38074710203f7f971d4c5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page