gitflow-analytics 1.0.1__tar.gz → 1.0.3__tar.gz

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.
Files changed (101) hide show
  1. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/CHANGELOG.md +18 -0
  2. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/CLAUDE.md +96 -13
  3. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/PKG-INFO +31 -4
  4. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/README.md +14 -0
  5. gitflow_analytics-1.0.3/docs/DEPLOY.md +308 -0
  6. gitflow_analytics-1.0.3/docs/design/qualitative_data_extraction.md +947 -0
  7. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/pyproject.toml +65 -7
  8. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/__init__.py +11 -11
  9. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/_version.py +2 -2
  10. gitflow_analytics-1.0.3/src/gitflow_analytics/cli.py +889 -0
  11. gitflow_analytics-1.0.3/src/gitflow_analytics/cli_rich.py +353 -0
  12. gitflow_analytics-1.0.3/src/gitflow_analytics/config.py +508 -0
  13. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/core/analyzer.py +140 -103
  14. gitflow_analytics-1.0.3/src/gitflow_analytics/core/branch_mapper.py +221 -0
  15. gitflow_analytics-1.0.3/src/gitflow_analytics/core/cache.py +344 -0
  16. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/core/identity.py +210 -173
  17. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/extractors/base.py +13 -11
  18. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/extractors/story_points.py +70 -59
  19. gitflow_analytics-1.0.3/src/gitflow_analytics/extractors/tickets.py +180 -0
  20. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/integrations/github_integration.py +84 -77
  21. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/integrations/jira_integration.py +116 -104
  22. gitflow_analytics-1.0.3/src/gitflow_analytics/integrations/orchestrator.py +146 -0
  23. gitflow_analytics-1.0.3/src/gitflow_analytics/metrics/dora.py +331 -0
  24. gitflow_analytics-1.0.3/src/gitflow_analytics/models/database.py +308 -0
  25. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/__init__.py +30 -0
  26. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/classifiers/__init__.py +13 -0
  27. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/classifiers/change_type.py +468 -0
  28. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/classifiers/domain_classifier.py +399 -0
  29. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/classifiers/intent_analyzer.py +436 -0
  30. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/classifiers/risk_analyzer.py +412 -0
  31. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/core/__init__.py +13 -0
  32. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/core/llm_fallback.py +653 -0
  33. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/core/nlp_engine.py +373 -0
  34. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/core/pattern_cache.py +457 -0
  35. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/core/processor.py +540 -0
  36. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/models/__init__.py +25 -0
  37. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/models/schemas.py +272 -0
  38. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/utils/__init__.py +13 -0
  39. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/utils/batch_processor.py +326 -0
  40. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/utils/cost_tracker.py +343 -0
  41. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/utils/metrics.py +347 -0
  42. gitflow_analytics-1.0.3/src/gitflow_analytics/qualitative/utils/text_processing.py +243 -0
  43. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/reports/analytics_writer.py +11 -4
  44. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/reports/csv_writer.py +51 -31
  45. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/reports/narrative_writer.py +16 -14
  46. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/__init__.py +5 -0
  47. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/app.py +721 -0
  48. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/screens/__init__.py +8 -0
  49. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/screens/analysis_progress_screen.py +487 -0
  50. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/screens/configuration_screen.py +547 -0
  51. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/screens/loading_screen.py +358 -0
  52. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/screens/main_screen.py +304 -0
  53. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/screens/results_screen.py +698 -0
  54. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/widgets/__init__.py +7 -0
  55. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/widgets/data_table.py +257 -0
  56. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/widgets/export_modal.py +301 -0
  57. gitflow_analytics-1.0.3/src/gitflow_analytics/tui/widgets/progress_widget.py +192 -0
  58. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics.egg-info/PKG-INFO +31 -4
  59. gitflow_analytics-1.0.3/src/gitflow_analytics.egg-info/SOURCES.txt +88 -0
  60. gitflow_analytics-1.0.3/src/gitflow_analytics.egg-info/requires.txt +37 -0
  61. gitflow_analytics-1.0.3/tests/__init__.py +6 -0
  62. gitflow_analytics-1.0.3/tests/conftest.py +140 -0
  63. gitflow_analytics-1.0.3/tests/core/__init__.py +1 -0
  64. gitflow_analytics-1.0.3/tests/core/test_analyzer.py +235 -0
  65. gitflow_analytics-1.0.3/tests/core/test_cache.py +441 -0
  66. gitflow_analytics-1.0.3/tests/core/test_identity.py +198 -0
  67. gitflow_analytics-1.0.3/tests/extractors/__init__.py +1 -0
  68. gitflow_analytics-1.0.3/tests/integrations/__init__.py +1 -0
  69. gitflow_analytics-1.0.3/tests/metrics/__init__.py +1 -0
  70. gitflow_analytics-1.0.3/tests/models/__init__.py +1 -0
  71. gitflow_analytics-1.0.3/tests/qualitative/__init__.py +1 -0
  72. gitflow_analytics-1.0.3/tests/qualitative/test_basic_integration.py +216 -0
  73. gitflow_analytics-1.0.3/tests/reports/__init__.py +1 -0
  74. gitflow_analytics-1.0.3/tests/test_cli.py +132 -0
  75. gitflow_analytics-1.0.3/tests/test_metrics.py +249 -0
  76. gitflow_analytics-1.0.3/tests/test_reports.py +358 -0
  77. gitflow_analytics-1.0.1/docs/DEPLOY.md +0 -261
  78. gitflow_analytics-1.0.1/src/gitflow_analytics/cli.py +0 -535
  79. gitflow_analytics-1.0.1/src/gitflow_analytics/config.py +0 -398
  80. gitflow_analytics-1.0.1/src/gitflow_analytics/core/branch_mapper.py +0 -221
  81. gitflow_analytics-1.0.1/src/gitflow_analytics/core/cache.py +0 -273
  82. gitflow_analytics-1.0.1/src/gitflow_analytics/extractors/tickets.py +0 -166
  83. gitflow_analytics-1.0.1/src/gitflow_analytics/integrations/orchestrator.py +0 -145
  84. gitflow_analytics-1.0.1/src/gitflow_analytics/metrics/dora.py +0 -327
  85. gitflow_analytics-1.0.1/src/gitflow_analytics/models/database.py +0 -171
  86. gitflow_analytics-1.0.1/src/gitflow_analytics.egg-info/SOURCES.txt +0 -40
  87. gitflow_analytics-1.0.1/src/gitflow_analytics.egg-info/requires.txt +0 -22
  88. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/LICENSE +0 -0
  89. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/MANIFEST.in +0 -0
  90. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/docs/configuration.md +0 -0
  91. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/docs/design/git_pm_correlation_design.md +0 -0
  92. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/setup.cfg +0 -0
  93. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/core/__init__.py +0 -0
  94. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/extractors/__init__.py +0 -0
  95. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/integrations/__init__.py +0 -0
  96. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/metrics/__init__.py +0 -0
  97. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/models/__init__.py +0 -0
  98. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics/reports/__init__.py +0 -0
  99. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics.egg-info/dependency_links.txt +0 -0
  100. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics.egg-info/entry_points.txt +0 -0
  101. {gitflow_analytics-1.0.1 → gitflow_analytics-1.0.3}/src/gitflow_analytics.egg-info/top_level.txt +0 -0
@@ -5,6 +5,22 @@ All notable changes to GitFlow Analytics will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.3] - 2025-08-01
9
+
10
+ ### Fixed
11
+ - Fixed comprehensive timezone comparison issues in database queries and report generation
12
+ - Improved timezone-aware datetime handling across all components
13
+ - Fixed timezone-related errors that were still affecting v1.0.2
14
+
15
+ ## [1.0.2] - 2025-08-01
16
+
17
+ ### Fixed
18
+ - Fixed SQLite index naming conflicts that could cause database errors
19
+ - Fixed PR cache UNIQUE constraint errors with proper upsert logic
20
+ - Fixed timezone comparison errors in report generation
21
+ - Added loading screen to TUI (before abandoning TUI approach)
22
+ - Moved Rich to core dependencies for better CLI output
23
+
8
24
  ## [1.0.1] - 2025-07-31
9
25
 
10
26
  ### Added
@@ -90,5 +106,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
90
106
  - Progress indicators during analysis
91
107
  - Detailed logging of operations
92
108
 
109
+ [1.0.3]: https://github.com/bobmatnyc/gitflow-analytics/releases/tag/v1.0.3
110
+ [1.0.2]: https://github.com/bobmatnyc/gitflow-analytics/releases/tag/v1.0.2
93
111
  [1.0.1]: https://github.com/bobmatnyc/gitflow-analytics/releases/tag/v1.0.1
94
112
  [1.0.0]: https://github.com/bobmatnyc/gitflow-analytics/releases/tag/v1.0.0
@@ -198,22 +198,97 @@ gitflow-analytics/
198
198
  └── README.md # User documentation
199
199
  ```
200
200
 
201
- ## Version Management
201
+ ## Atomic Versioning System
202
202
 
203
- - Version is stored in `src/gitflow_analytics/_version.py`
204
- - Follow semantic versioning (MAJOR.MINOR.PATCH)
205
- - Update version before releases
206
- - Tag releases with `v` prefix (e.g., `v1.0.0`)
203
+ The project uses **python-semantic-release** for automated, atomic version management. This ensures consistency between the source code version, git tags, PyPI releases, and GitHub releases.
207
204
 
208
- ## Release Process
205
+ ### Version Source of Truth
209
206
 
210
- 1. Update version in `_version.py`
211
- 2. Run full test suite
212
- 3. Update CHANGELOG.md
213
- 4. Commit with message: `chore: bump version to X.Y.Z`
214
- 5. Tag the release: `git tag -a vX.Y.Z -m "Release version X.Y.Z"`
215
- 6. Push tags: `git push origin main --tags`
216
- 7. Build and publish to PyPI (see DEPLOY.md)
207
+ The single source of truth for versioning is:
208
+ - **File**: `src/gitflow_analytics/_version.py`
209
+ - **Format**: `__version__ = "X.Y.Z"`
210
+ - **Management**: Automatically updated by semantic-release
211
+
212
+ ### Semantic Versioning Rules
213
+
214
+ Version bumps are determined by conventional commit messages:
215
+ - **MAJOR** (X.0.0): Breaking changes (rare, manual intervention required)
216
+ - **MINOR** (0.X.0): New features (`feat:` commits)
217
+ - **PATCH** (0.0.X): Bug fixes and maintenance (`fix:`, `docs:`, `chore:`, etc.)
218
+
219
+ ### Conventional Commit Format
220
+
221
+ Use these prefixes for automatic version detection:
222
+ ```bash
223
+ # Minor version bump (new features)
224
+ feat: add new story point extraction pattern
225
+ feat(cli): add --validate-only flag for configuration testing
226
+
227
+ # Patch version bump (fixes, improvements, maintenance)
228
+ fix: resolve identity resolution bug with similar names
229
+ fix(cache): handle database lock errors gracefully
230
+ docs: update installation instructions
231
+ chore: update dependency versions
232
+ style: fix code formatting issues
233
+ refactor: improve error handling in GitHub client
234
+ perf: optimize commit batch processing
235
+ test: add integration tests for organization discovery
236
+ ci: update GitHub Actions workflow
237
+ build: update pyproject.toml configuration
238
+ ```
239
+
240
+ ### CLI Version Display Fix
241
+
242
+ The project includes a fix for proper CLI version display:
243
+ - Version is dynamically imported from `_version.py`
244
+ - CLI command `gitflow-analytics --version` correctly shows current version
245
+ - Prevents version mismatch between package and CLI
246
+
247
+ ## Automated Release Process
248
+
249
+ The project uses GitHub Actions for fully automated releases:
250
+
251
+ ### Workflow Triggers
252
+ 1. **Push to main branch**: Triggers semantic analysis
253
+ 2. **Manual dispatch**: Can be triggered manually via GitHub UI
254
+ 3. **Conventional commits**: Drive version bump decisions
255
+
256
+ ### Release Steps (Automated)
257
+ 1. **Semantic Analysis**: Analyze commits since last release
258
+ 2. **Version Calculation**: Determine next version based on commit types
259
+ 3. **Version Update**: Update `_version.py` with new version
260
+ 4. **Git Operations**: Create git tag and GitHub release
261
+ 5. **Quality Checks**: Run full test suite, linting, and type checking
262
+ 6. **Package Build**: Build wheel and source distributions
263
+ 7. **PyPI Publishing**: Automatically publish to PyPI
264
+ 8. **Asset Upload**: Attach build artifacts to GitHub release
265
+ 9. **Changelog**: Auto-generate and update CHANGELOG.md
266
+
267
+ ### Manual Override (Emergency Only)
268
+
269
+ For emergency releases or version fixes:
270
+ ```bash
271
+ # Only if semantic-release is not working
272
+ git checkout main
273
+ git pull origin main
274
+ # Edit src/gitflow_analytics/_version.py manually
275
+ git commit -m "chore(release): manual version bump to X.Y.Z"
276
+ git tag -a vX.Y.Z -m "Emergency release X.Y.Z"
277
+ git push origin main --tags
278
+ ```
279
+
280
+ ### GitHub Actions Configuration
281
+
282
+ The project includes comprehensive CI/CD:
283
+ - **`.github/workflows/semantic-release.yml`**: Main release workflow
284
+ - **`.github/workflows/tests.yml`**: Testing on multiple Python versions
285
+ - **`.github/workflows/release.yml`**: Additional release validation
286
+
287
+ ### PyPI Publishing
288
+
289
+ - **Trusted Publishing**: Uses GitHub's OIDC for secure PyPI publishing
290
+ - **No API Keys**: No need to manage PyPI tokens in secrets
291
+ - **Automatic**: Publishing happens on every version tag creation
217
292
 
218
293
  ## Common Gotchas
219
294
 
@@ -224,6 +299,9 @@ gitflow-analytics/
224
299
  5. **Cache invalidation**: Some changes require clearing the cache
225
300
  6. **Directory defaults**: Cache and reports now default to config file directory, not current working directory
226
301
  7. **Organization permissions**: GitHub token must have organization read access for automatic repository discovery
302
+ 8. **Version conflicts**: Never manually edit version in `_version.py` unless bypassing semantic-release
303
+ 9. **Commit message format**: Incorrect commit message format will not trigger version bumps
304
+ 10. **Release permissions**: Only repository owners can trigger releases (configured in workflow)
227
305
 
228
306
  ## Quick Commands
229
307
 
@@ -246,6 +324,11 @@ black src/ tests/
246
324
  # Check code quality
247
325
  ruff check src/
248
326
  mypy src/
327
+
328
+ # Version and release commands (automated via CI/CD)
329
+ semantic-release version --dry-run # Preview next version
330
+ semantic-release version # Create release (CI only)
331
+ gitflow-analytics --version # Check current version
249
332
  ```
250
333
 
251
334
  ## Contact
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitflow-analytics
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: Analyze Git repositories for developer productivity insights
5
5
  Author-email: Bob Matyas <bobmatnyc@gmail.com>
6
6
  License: MIT
@@ -12,14 +12,13 @@ Keywords: git,analytics,productivity,metrics,development
12
12
  Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.8
16
15
  Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
18
  Classifier: Programming Language :: Python :: 3.12
20
19
  Classifier: Topic :: Software Development :: Version Control :: Git
21
20
  Classifier: Topic :: Software Development :: Quality Assurance
22
- Requires-Python: >=3.8
21
+ Requires-Python: >=3.9
23
22
  Description-Content-Type: text/markdown
24
23
  License-File: LICENSE
25
24
  Requires-Dist: click>=8.1
@@ -30,6 +29,12 @@ Requires-Dist: pandas>=2.0
30
29
  Requires-Dist: pyyaml>=6.0
31
30
  Requires-Dist: python-dateutil>=2.8
32
31
  Requires-Dist: python-dotenv>=1.0
32
+ Requires-Dist: rich>=13.0.0
33
+ Requires-Dist: spacy>=3.7.0
34
+ Requires-Dist: scikit-learn>=1.3.0
35
+ Requires-Dist: openai>=1.30.0
36
+ Requires-Dist: tiktoken>=0.7.0
37
+ Requires-Dist: numpy>=1.24.0
33
38
  Provides-Extra: dev
34
39
  Requires-Dist: pytest>=7.0; extra == "dev"
35
40
  Requires-Dist: pytest-cov>=4.0; extra == "dev"
@@ -37,14 +42,26 @@ Requires-Dist: pytest-mock>=3.0; extra == "dev"
37
42
  Requires-Dist: ruff>=0.1.0; extra == "dev"
38
43
  Requires-Dist: mypy>=1.0; extra == "dev"
39
44
  Requires-Dist: black>=23.0; extra == "dev"
45
+ Requires-Dist: isort>=5.0; extra == "dev"
46
+ Requires-Dist: bandit[toml]>=1.7; extra == "dev"
47
+ Requires-Dist: safety>=2.0; extra == "dev"
48
+ Requires-Dist: python-semantic-release>=8.0.0; extra == "dev"
49
+ Requires-Dist: types-PyYAML>=6.0; extra == "dev"
50
+ Requires-Dist: types-requests>=2.28; extra == "dev"
40
51
  Provides-Extra: github
41
52
  Requires-Dist: pygithub>=1.58; extra == "github"
53
+ Provides-Extra: tui
54
+ Requires-Dist: textual>=0.41.0; extra == "tui"
42
55
  Provides-Extra: all
43
- Requires-Dist: gitflow-analytics[github]; extra == "all"
56
+ Requires-Dist: gitflow-analytics[github,tui]; extra == "all"
44
57
  Dynamic: license-file
45
58
 
46
59
  # GitFlow Analytics
47
60
 
61
+ [![PyPI version](https://badge.fury.io/py/gitflow-analytics.svg)](https://badge.fury.io/py/gitflow-analytics)
62
+ [![Python Support](https://img.shields.io/pypi/pyversions/gitflow-analytics.svg)](https://pypi.org/project/gitflow-analytics/)
63
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
64
+
48
65
  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
66
 
50
67
  ## Features
@@ -64,10 +81,20 @@ A Python package for analyzing Git repositories to generate comprehensive develo
64
81
 
65
82
  ### Installation
66
83
 
84
+ **From PyPI (Recommended):**
85
+
67
86
  ```bash
68
87
  pip install gitflow-analytics
69
88
  ```
70
89
 
90
+ **From Source (Development):**
91
+
92
+ ```bash
93
+ git clone https://github.com/bobmatnyc/gitflow-analytics.git
94
+ cd gitflow-analytics
95
+ pip install -e ".[dev]"
96
+ ```
97
+
71
98
  ### Basic Usage
72
99
 
73
100
  1. Create a configuration file (`config.yaml`):
@@ -1,5 +1,9 @@
1
1
  # GitFlow Analytics
2
2
 
3
+ [![PyPI version](https://badge.fury.io/py/gitflow-analytics.svg)](https://badge.fury.io/py/gitflow-analytics)
4
+ [![Python Support](https://img.shields.io/pypi/pyversions/gitflow-analytics.svg)](https://pypi.org/project/gitflow-analytics/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
3
7
  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.
4
8
 
5
9
  ## Features
@@ -19,10 +23,20 @@ A Python package for analyzing Git repositories to generate comprehensive develo
19
23
 
20
24
  ### Installation
21
25
 
26
+ **From PyPI (Recommended):**
27
+
22
28
  ```bash
23
29
  pip install gitflow-analytics
24
30
  ```
25
31
 
32
+ **From Source (Development):**
33
+
34
+ ```bash
35
+ git clone https://github.com/bobmatnyc/gitflow-analytics.git
36
+ cd gitflow-analytics
37
+ pip install -e ".[dev]"
38
+ ```
39
+
26
40
  ### Basic Usage
27
41
 
28
42
  1. Create a configuration file (`config.yaml`):
@@ -0,0 +1,308 @@
1
+ # Deployment Guide for GitFlow Analytics
2
+
3
+ This guide covers the deployment process for GitFlow Analytics. **As of v1.0.1, the project uses fully automated releases** via GitHub Actions and semantic-release. Manual deployment is only needed for emergency situations.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Current Status](#current-status)
8
+ 2. [Automated Release Process](#automated-release-process)
9
+ 3. [Conventional Commits](#conventional-commits)
10
+ 4. [Monitoring Releases](#monitoring-releases)
11
+ 5. [Manual Deployment (Emergency Only)](#manual-deployment-emergency-only)
12
+ 6. [Legacy Manual Process](#legacy-manual-process)
13
+
14
+ ## Current Status
15
+
16
+ **GitFlow Analytics v1.0.1 is live on PyPI!**
17
+
18
+ - 📦 **PyPI Package**: [gitflow-analytics](https://pypi.org/project/gitflow-analytics/)
19
+ - 🏷️ **Latest Version**: v1.0.1
20
+ - 🚀 **Installation**: `pip install gitflow-analytics`
21
+ - 🤖 **Release Method**: Fully automated via GitHub Actions
22
+
23
+ ## Automated Release Process
24
+
25
+ The project uses **python-semantic-release** with GitHub Actions for fully automated deployments. This ensures:
26
+
27
+ - ✅ Consistent versioning across all platforms
28
+ - ✅ Automatic changelog generation
29
+ - ✅ Secure PyPI publishing via trusted publishing
30
+ - ✅ Atomic releases (git tag + GitHub release + PyPI upload)
31
+ - ✅ Comprehensive testing before release
32
+
33
+ ### How It Works
34
+
35
+ 1. **Developer commits** using conventional commit format
36
+ 2. **GitHub Actions detects** push to main branch
37
+ 3. **Semantic-release analyzes** commits to determine version bump
38
+ 4. **Automated pipeline** runs:
39
+ - Updates `src/gitflow_analytics/_version.py`
40
+ - Creates git tag
41
+ - Runs full test suite
42
+ - Builds package
43
+ - Publishes to PyPI
44
+ - Creates GitHub release
45
+ - Updates CHANGELOG.md
46
+
47
+ ### Triggering a Release
48
+
49
+ Simply push commits with conventional commit messages to the `main` branch:
50
+
51
+ ```bash
52
+ git commit -m "feat: add new analysis feature"
53
+ git push origin main # This triggers the release pipeline
54
+ ```
55
+
56
+ ## Conventional Commits
57
+
58
+ Use conventional commit messages to trigger automatic version bumps:
59
+
60
+ ### Commit Types and Version Impact
61
+
62
+ | Commit Type | Version Bump | Example |
63
+ |-------------|--------------|----------|
64
+ | `feat:` | Minor (0.X.0) | `feat: add JIRA integration` |
65
+ | `fix:` | Patch (0.0.X) | `fix: resolve identity resolution bug` |
66
+ | `docs:` | Patch (0.0.X) | `docs: update installation guide` |
67
+ | `chore:` | Patch (0.0.X) | `chore: update dependencies` |
68
+ | `style:` | Patch (0.0.X) | `style: fix code formatting` |
69
+ | `refactor:` | Patch (0.0.X) | `refactor: improve error handling` |
70
+ | `perf:` | Patch (0.0.X) | `perf: optimize commit processing` |
71
+ | `test:` | Patch (0.0.X) | `test: add integration tests` |
72
+ | `ci:` | Patch (0.0.X) | `ci: update GitHub Actions` |
73
+ | `build:` | Patch (0.0.X) | `build: update pyproject.toml` |
74
+
75
+ ### Breaking Changes
76
+
77
+ For breaking changes (major version bump), add `BREAKING CHANGE:` in the commit body:
78
+
79
+ ```bash
80
+ git commit -m "feat: redesign configuration format
81
+
82
+ BREAKING CHANGE: Configuration file format has changed from YAML to TOML.
83
+ Existing config.yaml files need to be converted to config.toml format."
84
+ ```
85
+
86
+ ### Commit Message Format
87
+
88
+ ```
89
+ <type>(<scope>): <description>
90
+
91
+ [optional body]
92
+
93
+ [optional footer(s)]
94
+ ```
95
+
96
+ Examples:
97
+ ```bash
98
+ feat(cli): add --validate-only flag for configuration testing
99
+ fix(cache): handle database lock errors gracefully
100
+ docs: add PyPI installation instructions
101
+ chore(deps): update GitHub Actions to v4
102
+ ```
103
+
104
+ ## Monitoring Releases
105
+
106
+ ### Check Release Status
107
+
108
+ 1. **GitHub Actions**: Monitor the [semantic-release workflow](https://github.com/bobmatnyc/gitflow-analytics/actions/workflows/semantic-release.yml)
109
+ 2. **PyPI**: Check the [package page](https://pypi.org/project/gitflow-analytics/) for new versions
110
+ 3. **GitHub Releases**: View [releases page](https://github.com/bobmatnyc/gitflow-analytics/releases) for release notes
111
+
112
+ ### Release Workflow Logs
113
+
114
+ The automated release process provides detailed logs:
115
+ - Semantic analysis results
116
+ - Version calculation logic
117
+ - Test execution results
118
+ - Build and publish status
119
+ - Error details if any step fails
120
+
121
+ ### Troubleshooting Failed Releases
122
+
123
+ If the automated release fails:
124
+
125
+ 1. **Check workflow logs** in GitHub Actions
126
+ 2. **Common issues**:
127
+ - Test failures block the release
128
+ - PyPI trusted publishing configuration
129
+ - GitHub token permissions
130
+ - Semantic-release configuration errors
131
+
132
+ 3. **Resolution**:
133
+ - Fix the underlying issue
134
+ - Push another commit to main
135
+ - The workflow will retry automatically
136
+
137
+ ## Manual Deployment (Emergency Only)
138
+
139
+ **⚠️ Warning**: Manual deployment should only be used in emergency situations when the automated system is not working.
140
+
141
+ ### Prerequisites
142
+
143
+ ```bash
144
+ pip install --upgrade pip build twine python-semantic-release
145
+ ```
146
+
147
+ ### Emergency Release Process
148
+
149
+ 1. **Manual version bump:**
150
+ ```bash
151
+ # Edit src/gitflow_analytics/_version.py manually
152
+ git commit -m "chore(release): emergency version bump to X.Y.Z"
153
+ ```
154
+
155
+ 2. **Create tag and build:**
156
+ ```bash
157
+ git tag -a vX.Y.Z -m "Emergency release X.Y.Z"
158
+ python -m build
159
+ ```
160
+
161
+ 3. **Test and publish:**
162
+ ```bash
163
+ python -m twine check dist/*
164
+ python -m twine upload dist/*
165
+ ```
166
+
167
+ 4. **Push to GitHub:**
168
+ ```bash
169
+ git push origin main --tags
170
+ ```
171
+
172
+ ### When to Use Manual Deployment
173
+
174
+ - GitHub Actions is down for extended periods
175
+ - Critical security fix needed immediately
176
+ - Automated system configuration is broken
177
+ - PyPI trusted publishing is not working
178
+
179
+ ### Recovery After Manual Release
180
+
181
+ After manual deployment, ensure the automated system is working:
182
+
183
+ 1. Verify the version in `_version.py` matches the released version
184
+ 2. Ensure the git tag exists and is pushed
185
+ 3. Test the next automated release with a patch commit
186
+ 4. Update CHANGELOG.md if it wasn't auto-generated
187
+
188
+ ## Legacy Manual Process
189
+
190
+ <details>
191
+ <summary>Click to expand legacy manual deployment process (archived)</summary>
192
+
193
+ **Note**: This section is kept for historical reference. The project now uses automated releases.
194
+
195
+ ### Manual Build Process (Deprecated)
196
+
197
+ 1. **Clean previous builds:**
198
+ ```bash
199
+ rm -rf dist/ build/ *.egg-info
200
+ ```
201
+
202
+ 2. **Build the package:**
203
+ ```bash
204
+ python -m build
205
+ ```
206
+
207
+ 3. **Verify the build:**
208
+ ```bash
209
+ ls -la dist/
210
+ ```
211
+
212
+ ### Manual PyPI Publishing (Deprecated)
213
+
214
+ 1. **Setup PyPI credentials** in `~/.pypirc`
215
+ 2. **Test with TestPyPI:**
216
+ ```bash
217
+ twine upload --repository testpypi dist/*
218
+ ```
219
+ 3. **Publish to PyPI:**
220
+ ```bash
221
+ twine upload dist/*
222
+ ```
223
+
224
+ ### Manual GitHub Release (Deprecated)
225
+
226
+ 1. **Tag the version:**
227
+ ```bash
228
+ git tag -a v1.0.0 -m "Release version 1.0.0"
229
+ ```
230
+ 2. **Create GitHub Release** via web interface
231
+ 3. **Attach build artifacts**
232
+
233
+ </details>
234
+
235
+ ## Development Workflow
236
+
237
+ ### Feature Development and Release
238
+
239
+ 1. **Feature development:**
240
+ ```bash
241
+ git checkout -b feature/new-analysis-metric
242
+ # Make changes
243
+ git commit -m "feat: add DORA metrics calculation"
244
+ git push origin feature/new-analysis-metric
245
+ # Create PR
246
+ ```
247
+
248
+ 2. **Merge to main:**
249
+ ```bash
250
+ # After PR approval and merge
251
+ git checkout main
252
+ git pull origin main
253
+ # The semantic-release workflow automatically runs
254
+ ```
255
+
256
+ 3. **Release happens automatically:**
257
+ - Version is calculated from commit messages
258
+ - Package is built and tested
259
+ - PyPI release is published
260
+ - GitHub release is created
261
+ - CHANGELOG.md is updated
262
+
263
+ ### Hotfix Workflow
264
+
265
+ ```bash
266
+ git checkout main
267
+ git pull origin main
268
+ git checkout -b hotfix/critical-bug
269
+ # Fix the issue
270
+ git commit -m "fix: resolve critical identity resolution bug"
271
+ git push origin hotfix/critical-bug
272
+ # Create PR, merge to main
273
+ # Patch release happens automatically
274
+ ```
275
+
276
+ ## Troubleshooting
277
+
278
+ ### Common Issues
279
+
280
+ 1. **Build fails:**
281
+ - Ensure all dependencies are installed
282
+ - Check for syntax errors in setup files
283
+ - Verify `MANIFEST.in` includes all necessary files
284
+
285
+ 2. **Upload fails:**
286
+ - Check PyPI credentials
287
+ - Ensure version doesn't already exist
288
+ - Verify package name availability
289
+
290
+ 3. **Import errors after installation:**
291
+ - Check package structure
292
+ - Verify all modules are included
293
+ - Test locally with `pip install -e .`
294
+
295
+ ### Getting Help
296
+
297
+ - [Python Packaging Guide](https://packaging.python.org)
298
+ - [PyPI Help](https://pypi.org/help/)
299
+ - [Project Issues](https://github.com/bobmatnyc/gitflow-analytics/issues)
300
+
301
+ ## See Also
302
+
303
+ - [CLAUDE.md](../CLAUDE.md) - Developer instructions with detailed versioning info
304
+ - [README.md](../README.md) - User documentation and installation
305
+ - [CHANGELOG.md](../CHANGELOG.md) - Automatically generated version history
306
+ - [PyPI Package](https://pypi.org/project/gitflow-analytics/) - Official package page
307
+ - [GitHub Releases](https://github.com/bobmatnyc/gitflow-analytics/releases) - Release notes and downloads
308
+ - [GitHub Actions](https://github.com/bobmatnyc/gitflow-analytics/actions) - CI/CD pipeline status