git2report 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: git2report
3
+ Version: 0.1.0
4
+ Summary: Turn Git history into a plain-language, evidence-linked progress report with visual charts and Terminal Web Studio.
5
+ Author-email: Vijay <vijaykd04@users.noreply.github.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/vijaykd04/Git2Report
8
+ Project-URL: Repository, https://github.com/vijaykd04/Git2Report.git
9
+ Project-URL: Issues, https://github.com/vijaykd04/Git2Report/issues
10
+ Keywords: git,report,changelog,ai,gemini,ollama,terminal,metrics
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Environment :: Console
19
+ Classifier: Topic :: Software Development :: Version Control :: Git
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: pydriller>=2.5
24
+ Requires-Dist: typer>=0.9
25
+ Requires-Dist: jinja2>=3.1
26
+ Requires-Dist: reportlab>=4.0
27
+ Requires-Dist: ollama>=0.3
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7; extra == "dev"
30
+ Dynamic: license-file
31
+
32
+ # Git2Report
33
+
34
+ Turn a Git repository's history into a plain-language weekly progress report, where **every number is
35
+ counted by code** and **every line carries commit IDs as proof**. The AI (optional, local) only writes
36
+ sentences.
37
+
38
+ ```
39
+ git2report --repo . --since 7d --audience guide --out report.pdf
40
+ ```
41
+
42
+ ## Install
43
+
44
+ ```
45
+ python -m venv .venv
46
+ .venv\Scripts\activate # Windows (Linux/macOS: source .venv/bin/activate)
47
+ pip install -e ".[dev]" # core + pytest
48
+ pip install -e ".[ollama]" # only if you want AI sentences (also install Ollama from ollama.com)
49
+ ```
50
+
51
+ ## Use
52
+
53
+ ### 🖥️ Interactive Web Studio GUI
54
+ Launch the browser-based dashboard to configure, run, preview, and download reports with 1 click:
55
+ ```
56
+ git2report --ui # Opens Web Studio at http://localhost:5000
57
+ # or: git2report-ui
58
+ ```
59
+
60
+ ### 💻 Command Line (Terminal)
61
+ ```bash
62
+ # 1. Standard full-format generation (PDF + HTML + Markdown)
63
+ git2report --repo ./myproject --since 7d --all --out report.html
64
+
65
+ # 2. Local AI with Ollama (Private, offline, zero API keys)
66
+ git2report --repo ./myproject --llm ollama --model llama3:8b
67
+ # Or shortcut:
68
+ git2report --repo ./myproject --ollama --model mistral
69
+
70
+ # 3. Cloud AI with Google Gemini (Fast, smart summary caching)
71
+ git2report --repo ./myproject --llm gemini --model gemini-2.5-flash
72
+
73
+ # 4. Pure offline deterministic mode (Zero AI, instant)
74
+ git2report --repo ./myproject --llm offline --audience guide
75
+
76
+ # 5. Targeted audience personas
77
+ git2report --repo ./myproject --since 2w --audience client --both # Business & user-facing
78
+ git2report --repo ./myproject --since 2w --audience team --both # Engineering release notes
79
+
80
+ # 6. Sprint goals & caching
81
+ git2report --repo . --next "Finish payment gateway" --next "Write tests" # Authentic developer goals
82
+ git2report --clear-cache # Reset summary cache
83
+ ```
84
+
85
+ ### AI Engines (`--llm`)
86
+ - **`--llm ollama`**: Uses a local model running on your machine via [Ollama](https://ollama.com/) (e.g., `llama3:8b`, `llama3.2`, `mistral`, `deepseek-r1:8b`, `phi4`). Zero data leaves your machine. Automatically discovers available local models. If Ollama is offline or uninstalled, it gracefully falls back to deterministic offline wording without crashing.
87
+ - **`--llm gemini`**: Uses Google Gemini (`gemini-2.5-flash`) with smart SHA-256 caching (`.git2report_cache.json`) for fast execution and zero duplicate token costs. Set `GEMINI_API_KEY` in your environment or `.env` file.
88
+ - **`--llm offline`** (default): Builds clean human sentences directly from commit messages without invoking any AI.
89
+
90
+ Every AI output is validated by code: if the model returns invalid JSON, mentions raw numbers, or mentions file paths, Git2Report automatically retries once and falls back safely.
91
+
92
+
93
+ ## Evaluation (manual vs tool vs baseline)
94
+
95
+ ```
96
+ git2report-eval sheet --repo ./proj --since 45d --n 25 --out eval.csv # builds the sheet
97
+ # open eval.csv in Excel: write manual_summary, give 1-5 scores, count unsupported claims
98
+ git2report-eval score eval.csv --out results.md # averages: tool vs baseline
99
+ ```
100
+ The baseline is what you get without the pipeline: the raw commit message (offline) or the raw commit pasted
101
+ to the AI (`--llm ollama`). Be honest in the project report about the sample size and whose repo it was.
102
+
103
+ ## Audiences (offline mode)
104
+
105
+ `guide` = full list, `client` = only user-facing work (features, fixes, performance), `team` = release-notes
106
+ grouped by type. A commit's type comes from `type(scope):` if present, otherwise it is guessed from its first
107
+ word (Add = feature, Fix = fix, Remove = refactor...). It is a heuristic, so check it on your own repo.
108
+
109
+ ## How it works (7 steps, one file each)
110
+
111
+ | Step | File | Output |
112
+ |---|---|---|
113
+ | 1 Extract | `extractor.py` | list of `CommitRecord` |
114
+ | 2 Filter | `filtering.py` | kept commits + a reason for every decision |
115
+ | 3 Cluster | `clustering.py` | `{module: [commits]}` (scope, then folder, then commit type) |
116
+ | 4 Metrics | `metrics.py` | numbers (junk files excluded) |
117
+ | 5 Chunk | `chunker.py` | short code text per module, within a token budget |
118
+ | 6 Summarise | `summarizer.py` | one sentence per module (AI or offline), checked by code |
119
+ | 7 Report | `report.py` | Markdown (Jinja2) and PDF (ReportLab) |
120
+
121
+ Tunable rules (junk files, noise words, aliases, budget) live in `config.py`.
122
+
123
+ ## Develop
124
+
125
+ ```
126
+ pytest -q # 38 tests, uses a throw-away real Git repo
127
+ bash scripts/make_demo_repo.sh # 10-commit demo repo in ./demo_repo
128
+ ```
129
+
130
+ ## Status
131
+
132
+ Done and tested:
133
+ - Steps 1-7 deterministic pipeline with verified commit hashes.
134
+ - 🖥️ **Interactive Web Studio GUI** (`git2report --ui`) with real-time progress, live preview, and direct PDF/HTML/MD downloads.
135
+ - ⚡ **Smart Summary Cache** (`.git2report_cache.json`) for instant sub-second re-runs and 0 API token waste.
136
+ - 📊 **Visual Analytics & Charts** (Commit type distribution segmented bar & module churn chart embedded in PDF & HTML).
137
+ - Offline summaries per audience, unmerged "in progress" branches, developer-written sprint goals.
138
+ - 🦙 **Ollama Local AI & Google Gemini Cloud AI**: Choose between 100% private local models (`llama3:8b`, `mistral`, `deepseek-r1`) or Google Gemini (`gemini-2.5-flash`), with automated code-validation and fallback.
139
+ - ReportLab PDF, interactive HTML, Markdown, and 43 automated tests.
140
+ - Tried on demo repo, pallets/click, and real full-stack project (CampusThrift).
141
+
142
+ **Optional future work:** config file, multi-repo aggregator.
@@ -0,0 +1,26 @@
1
+ git2report/__init__.py,sha256=BFD8YXfiLTrZ7DVGdWwDFH_ykhVGQLiyXRnpM7Vju4s,113
2
+ git2report/__main__.py,sha256=CcNQPexQIsuoFnkuCrYhVLrH9c3kBH9XcO7FHhJpCHc,69
3
+ git2report/branches.py,sha256=GHrqRG3NDXCQ4XzNLYCtJ2V3Z9qWf5g7Fj9wMKjT2EU,1551
4
+ git2report/cache.py,sha256=U82XFCkwRSTHfjS9JGP72uiP1kg6ngT0g-ZcLwTSrMk,2431
5
+ git2report/charts.py,sha256=BustQhbnCZRE-dHipDH79E0DmX5TPLHsxUFGmCSkNV0,6035
6
+ git2report/chunker.py,sha256=lwq-WZzKoljttHdOSnkBDtrpm8_xJ9RWhlhfYoPvkXk,1665
7
+ git2report/cli.py,sha256=rtYW8zs1R2wLXps391MfjmqnayVNdGaxiYlp05wWd7M,7588
8
+ git2report/clustering.py,sha256=jQe-fV1P3pdscPVqRxmR_tsk-oBSTC12L-yH2-yx07I,2373
9
+ git2report/config.py,sha256=LIFFmItrov1TI2f6KjEDIkQv3le7tdN0SeKZw_QhWGM,1541
10
+ git2report/eval_tools.py,sha256=D5Wkk3T7dCqo3UGaXG0pw1h1-Y3BwzGXb6zoVrqXeU8,5397
11
+ git2report/extractor.py,sha256=nEGnMI0xEFaXkj3ax1rRivu-wMXGTQExsZTOHrSndj8,1419
12
+ git2report/filtering.py,sha256=kJyePSoCDACfcDajHYDyh2oRZJJpTG9hPRieY6x1kwQ,1202
13
+ git2report/metrics.py,sha256=mMXcrYAbixJh-VYtrcvkhtjo4iI0MVmYJDxD9nRs3PA,4977
14
+ git2report/models.py,sha256=sEO6z-OcKSjkMsYWkAgfjttBHi_6Xm4e-rD9IOUH4sA,984
15
+ git2report/pipeline.py,sha256=gszxBNhM1vR7c4P8fJytnSE6TQBiiJiW7qhQN9IkfoE,8948
16
+ git2report/report.py,sha256=-yQu4nxa_idQXNbGUrfTXhBmu0RmWq2dc9-82aY9K1Y,36302
17
+ git2report/rules.py,sha256=Zv282l5ilFU8HnKilDj8m4ETu1Or3RjfAYxgFMxJRU8,2794
18
+ git2report/summarizer.py,sha256=JyGcTFF50S_QCZPr8i_XvFn35NLSUm-6EKubSrnmx-0,14528
19
+ git2report/timeutil.py,sha256=lVWueZ20SYAObMlcE0RaghRqLQ8FfMJTqXIb5pF4_8A,722
20
+ git2report/web.py,sha256=DrGALWm9Gjl19kWVQdyjTdUI8vo8grVw65ul2P3OhWY,42918
21
+ git2report-0.1.0.dist-info/licenses/LICENSE,sha256=3dbJ0oOHU8rWroX2tB-dPJ9rIsRx9tUWXYlfVrG9tR4,1062
22
+ git2report-0.1.0.dist-info/METADATA,sha256=IeH9xKUwEphlCziczHEy76fjrx3tmROSGGRgKd8y7Wk,6983
23
+ git2report-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
24
+ git2report-0.1.0.dist-info/entry_points.txt,sha256=SUNfYYolMvveOFwlN23B8X3V6Igrjr_ZhuEkKZbqVCU,130
25
+ git2report-0.1.0.dist-info/top_level.txt,sha256=kylwpjWLHBM8_BWVBLyE0qFJxRup13U-y8EZlBjRfmI,11
26
+ git2report-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ git2report = git2report.cli:app
3
+ git2report-eval = git2report.eval_tools:app
4
+ git2report-ui = git2report.web:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vijay
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ git2report