gitflow-analytics 1.0.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.
- gitflow_analytics/__init__.py +22 -0
- gitflow_analytics/_version.py +4 -0
- gitflow_analytics/cli.py +441 -0
- gitflow_analytics/config.py +215 -0
- gitflow_analytics/core/__init__.py +0 -0
- gitflow_analytics/core/analyzer.py +195 -0
- gitflow_analytics/core/branch_mapper.py +221 -0
- gitflow_analytics/core/cache.py +275 -0
- gitflow_analytics/core/identity.py +402 -0
- gitflow_analytics/extractors/__init__.py +0 -0
- gitflow_analytics/extractors/base.py +41 -0
- gitflow_analytics/extractors/story_points.py +128 -0
- gitflow_analytics/extractors/tickets.py +157 -0
- gitflow_analytics/integrations/__init__.py +0 -0
- gitflow_analytics/integrations/github_integration.py +160 -0
- gitflow_analytics/integrations/orchestrator.py +119 -0
- gitflow_analytics/metrics/__init__.py +0 -0
- gitflow_analytics/metrics/dora.py +327 -0
- gitflow_analytics/models/__init__.py +0 -0
- gitflow_analytics/models/database.py +171 -0
- gitflow_analytics/reports/__init__.py +0 -0
- gitflow_analytics/reports/analytics_writer.py +454 -0
- gitflow_analytics/reports/csv_writer.py +311 -0
- gitflow_analytics/reports/narrative_writer.py +263 -0
- gitflow_analytics-1.0.0.dist-info/METADATA +201 -0
- gitflow_analytics-1.0.0.dist-info/RECORD +30 -0
- gitflow_analytics-1.0.0.dist-info/WHEEL +5 -0
- gitflow_analytics-1.0.0.dist-info/entry_points.txt +2 -0
- gitflow_analytics-1.0.0.dist-info/licenses/LICENSE +21 -0
- gitflow_analytics-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gitflow-analytics
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Analyze Git repositories for developer productivity insights
|
|
5
|
+
Author-email: Bob Matyas <bobmatnyc@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bobmatnyc/gitflow-analytics
|
|
8
|
+
Project-URL: Documentation, https://github.com/bobmatnyc/gitflow-analytics/blob/main/README.md
|
|
9
|
+
Project-URL: Repository, https://github.com/bobmatnyc/gitflow-analytics
|
|
10
|
+
Project-URL: Issues, https://github.com/bobmatnyc/gitflow-analytics/issues
|
|
11
|
+
Keywords: git,analytics,productivity,metrics,development
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Requires-Python: >=3.8
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: click>=8.1
|
|
27
|
+
Requires-Dist: gitpython>=3.1
|
|
28
|
+
Requires-Dist: tqdm>=4.65
|
|
29
|
+
Requires-Dist: sqlalchemy>=2.0
|
|
30
|
+
Requires-Dist: pandas>=2.0
|
|
31
|
+
Requires-Dist: pyyaml>=6.0
|
|
32
|
+
Requires-Dist: python-dateutil>=2.8
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-mock>=3.0; extra == "dev"
|
|
37
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
38
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
39
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
40
|
+
Provides-Extra: github
|
|
41
|
+
Requires-Dist: pygithub>=1.58; extra == "github"
|
|
42
|
+
Provides-Extra: all
|
|
43
|
+
Requires-Dist: gitflow-analytics[github]; extra == "all"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# GitFlow Analytics
|
|
47
|
+
|
|
48
|
+
A Python package for analyzing Git repositories to generate comprehensive developer productivity reports. It extracts data directly from Git history and GitHub APIs, providing weekly summaries, productivity insights, and gap analysis.
|
|
49
|
+
|
|
50
|
+
## Features
|
|
51
|
+
|
|
52
|
+
- 🚀 **Multi-repository analysis** with project grouping
|
|
53
|
+
- 👥 **Developer identity resolution** and normalization
|
|
54
|
+
- 📊 **Work volume analysis** (absolute vs relative effort)
|
|
55
|
+
- 🎯 **Story point extraction** from commit messages and PR descriptions
|
|
56
|
+
- 🎫 **Multi-platform ticket tracking** (JIRA, GitHub Issues, ClickUp, Linear)
|
|
57
|
+
- 📈 **Weekly CSV reports** with productivity metrics
|
|
58
|
+
- 🔒 **Data anonymization** for external sharing
|
|
59
|
+
- âš¡ **Smart caching** for fast repeated analyses
|
|
60
|
+
- 🔄 **Batch processing** for large repositories
|
|
61
|
+
|
|
62
|
+
## Quick Start
|
|
63
|
+
|
|
64
|
+
### Installation
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install gitflow-analytics
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Basic Usage
|
|
71
|
+
|
|
72
|
+
1. Create a configuration file (`config.yaml`):
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
version: "1.0"
|
|
76
|
+
|
|
77
|
+
github:
|
|
78
|
+
token: "${GITHUB_TOKEN}"
|
|
79
|
+
owner: "${GITHUB_OWNER}"
|
|
80
|
+
|
|
81
|
+
repositories:
|
|
82
|
+
- name: "frontend"
|
|
83
|
+
path: "~/repos/frontend"
|
|
84
|
+
github_repo: "myorg/frontend"
|
|
85
|
+
project_key: "FRONTEND"
|
|
86
|
+
|
|
87
|
+
- name: "backend"
|
|
88
|
+
path: "~/repos/backend"
|
|
89
|
+
github_repo: "myorg/backend"
|
|
90
|
+
project_key: "BACKEND"
|
|
91
|
+
|
|
92
|
+
analysis:
|
|
93
|
+
story_point_patterns:
|
|
94
|
+
- "(?:story\\s*points?|sp|pts?)\\s*[:=]\\s*(\\d+)"
|
|
95
|
+
- "\\[(\\d+)\\s*(?:sp|pts?)\\]"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
2. Set environment variables:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
export GITHUB_TOKEN=your_github_token
|
|
102
|
+
export GITHUB_OWNER=your_github_org
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
3. Run the analysis:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
gitflow-analytics analyze -c config.yaml
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Command Line Interface
|
|
112
|
+
|
|
113
|
+
### Main Commands
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Analyze repositories
|
|
117
|
+
gitflow-analytics analyze -c config.yaml --weeks 12 --output ./reports
|
|
118
|
+
|
|
119
|
+
# Show cache statistics
|
|
120
|
+
gitflow-analytics cache-stats -c config.yaml
|
|
121
|
+
|
|
122
|
+
# List known developers
|
|
123
|
+
gitflow-analytics list-developers -c config.yaml
|
|
124
|
+
|
|
125
|
+
# Merge developer identities
|
|
126
|
+
gitflow-analytics merge-identity -c config.yaml dev1_id dev2_id
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Options
|
|
130
|
+
|
|
131
|
+
- `--weeks, -w`: Number of weeks to analyze (default: 12)
|
|
132
|
+
- `--output, -o`: Output directory for reports (default: ./reports)
|
|
133
|
+
- `--anonymize`: Anonymize developer information
|
|
134
|
+
- `--no-cache`: Disable caching for fresh analysis
|
|
135
|
+
- `--clear-cache`: Clear cache before analysis
|
|
136
|
+
- `--validate-only`: Validate configuration without running
|
|
137
|
+
|
|
138
|
+
## Output Reports
|
|
139
|
+
|
|
140
|
+
The tool generates three CSV reports:
|
|
141
|
+
|
|
142
|
+
1. **Weekly Metrics** (`weekly_metrics_YYYYMMDD.csv`)
|
|
143
|
+
- Week-by-week developer productivity
|
|
144
|
+
- Story points, commits, lines changed
|
|
145
|
+
- Ticket coverage percentages
|
|
146
|
+
- Per-project breakdown
|
|
147
|
+
|
|
148
|
+
2. **Summary Statistics** (`summary_YYYYMMDD.csv`)
|
|
149
|
+
- Overall project statistics
|
|
150
|
+
- Platform-specific ticket counts
|
|
151
|
+
- Top contributors
|
|
152
|
+
|
|
153
|
+
3. **Developer Report** (`developers_YYYYMMDD.csv`)
|
|
154
|
+
- Complete developer profiles
|
|
155
|
+
- Total contributions
|
|
156
|
+
- Identity aliases
|
|
157
|
+
|
|
158
|
+
## Story Point Patterns
|
|
159
|
+
|
|
160
|
+
Configure custom regex patterns to match your team's story point format:
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
story_point_patterns:
|
|
164
|
+
- "SP: (\\d+)" # SP: 5
|
|
165
|
+
- "\\[([0-9]+) pts\\]" # [3 pts]
|
|
166
|
+
- "estimate: (\\d+)" # estimate: 8
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Ticket Platform Support
|
|
170
|
+
|
|
171
|
+
Automatically detects and tracks tickets from:
|
|
172
|
+
- **JIRA**: `PROJ-123`
|
|
173
|
+
- **GitHub**: `#123`, `GH-123`
|
|
174
|
+
- **ClickUp**: `CU-abc123`
|
|
175
|
+
- **Linear**: `ENG-123`
|
|
176
|
+
|
|
177
|
+
## Caching
|
|
178
|
+
|
|
179
|
+
The tool uses SQLite for intelligent caching:
|
|
180
|
+
- Commit analysis results
|
|
181
|
+
- Developer identity mappings
|
|
182
|
+
- Pull request data
|
|
183
|
+
|
|
184
|
+
Cache is automatically managed with configurable TTL.
|
|
185
|
+
|
|
186
|
+
## Developer Identity Resolution
|
|
187
|
+
|
|
188
|
+
Intelligently merges developer identities across:
|
|
189
|
+
- Different email addresses
|
|
190
|
+
- Name variations
|
|
191
|
+
- GitHub usernames
|
|
192
|
+
|
|
193
|
+
Manual overrides supported in configuration.
|
|
194
|
+
|
|
195
|
+
## Contributing
|
|
196
|
+
|
|
197
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
gitflow_analytics/__init__.py,sha256=Ur3taLHb9eO5P1T-hi2llyCkHTKhk1hLuurxcp9hLQs,639
|
|
2
|
+
gitflow_analytics/_version.py,sha256=l0-c8EmumJVRuJG4Iyn8ezTW00USlPFUPNchN-DwoDs,136
|
|
3
|
+
gitflow_analytics/cli.py,sha256=viyQeAWyf1bdH1iwsy1GHleaMaMhA3PkjAp0VuEF9zA,16707
|
|
4
|
+
gitflow_analytics/config.py,sha256=23CBJS2qiYFbcG4JMFCRUyQ4JpK5sF3Qp4bcvyH3lkU,8421
|
|
5
|
+
gitflow_analytics/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
gitflow_analytics/core/analyzer.py,sha256=TpzyXuUpAzVpg1WZeB7oRFodn-R69hvhcjWZoCH96wg,7765
|
|
7
|
+
gitflow_analytics/core/branch_mapper.py,sha256=3wh45lu_vaCev9rmXHTMOpqLQTxsjKFXAE6_WpjhOcc,7610
|
|
8
|
+
gitflow_analytics/core/cache.py,sha256=RlfsoEe98kZ4xXe28dbLS7MapMem__XN3EoBU1v4q2c,11691
|
|
9
|
+
gitflow_analytics/core/identity.py,sha256=RKzTNqtFWwqwPCo09ClT65rEanBY8UjXx2rV0mdwZmM,17091
|
|
10
|
+
gitflow_analytics/extractors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
gitflow_analytics/extractors/base.py,sha256=0I_dmKiLmH7PNXNpDH5FDtOhmkMfnjJJOj4KA-GJuSo,1208
|
|
12
|
+
gitflow_analytics/extractors/story_points.py,sha256=DuMNw78pw2A_k6us9lYfMFLqwVI5Ip6JMBPsSBDFxzU,5038
|
|
13
|
+
gitflow_analytics/extractors/tickets.py,sha256=ghoPhwg1LFXF_h888MBt6nyY_Ni-w4eqakl4JSpeqIE,6230
|
|
14
|
+
gitflow_analytics/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
+
gitflow_analytics/integrations/github_integration.py,sha256=qgUIpvtP7hRkshxX4QXQkIEdsrPDVSTDTfwfXvWxE1s,6344
|
|
16
|
+
gitflow_analytics/integrations/orchestrator.py,sha256=3Itdo59LZ65Gjrjo4Fik_yzpcRLfH0DXrSJHLu-BGQo,4331
|
|
17
|
+
gitflow_analytics/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
+
gitflow_analytics/metrics/dora.py,sha256=MLpOJX4ZxiBXxxk0jkpvj67Brgj0CcRHWD-cnsTDbL4,12765
|
|
19
|
+
gitflow_analytics/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
+
gitflow_analytics/models/database.py,sha256=iE-ERPMpA7HE4livaLaoCmBF_N8L9UFtUzsfOffc5CI,5548
|
|
21
|
+
gitflow_analytics/reports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
+
gitflow_analytics/reports/analytics_writer.py,sha256=yRzZwfYTANp1Glh2S02T6XBcXvTxEVOG1FZnewCs_d8,19054
|
|
23
|
+
gitflow_analytics/reports/csv_writer.py,sha256=9ApngbIbGy9GfXm8EfkRcnSWGhQI-Iz-22F8ogWW3Hs,12611
|
|
24
|
+
gitflow_analytics/reports/narrative_writer.py,sha256=fyQyXbaYG1Bvoec5kdB9JH2NYP4ov3w0NIpu6nORFdQ,12758
|
|
25
|
+
gitflow_analytics-1.0.0.dist-info/licenses/LICENSE,sha256=xwvSwY1GYXpRpmbnFvvnbmMwpobnrdN9T821sGvjOY0,1066
|
|
26
|
+
gitflow_analytics-1.0.0.dist-info/METADATA,sha256=SSoW_ptXcv0m_1ap1eNi1G54lvFnUzgQHfNpDmNfZK0,5765
|
|
27
|
+
gitflow_analytics-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
28
|
+
gitflow_analytics-1.0.0.dist-info/entry_points.txt,sha256=a3y8HnfLOvK1QVOgAkDY6VQXXm3o9ZSQRZrpiaS3hEM,65
|
|
29
|
+
gitflow_analytics-1.0.0.dist-info/top_level.txt,sha256=CQyxZXjKvpSB1kgqqtuE0PCRqfRsXZJL8JrYpJKtkrk,18
|
|
30
|
+
gitflow_analytics-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Bob Matyas
|
|
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
|
+
gitflow_analytics
|