gitflow-analytics 1.0.3__py3-none-any.whl → 1.3.6__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/_version.py +1 -1
- gitflow_analytics/classification/__init__.py +31 -0
- gitflow_analytics/classification/batch_classifier.py +752 -0
- gitflow_analytics/classification/classifier.py +464 -0
- gitflow_analytics/classification/feature_extractor.py +725 -0
- gitflow_analytics/classification/linguist_analyzer.py +574 -0
- gitflow_analytics/classification/model.py +455 -0
- gitflow_analytics/cli.py +4108 -350
- gitflow_analytics/cli_rich.py +198 -48
- gitflow_analytics/config/__init__.py +43 -0
- gitflow_analytics/config/errors.py +261 -0
- gitflow_analytics/config/loader.py +904 -0
- gitflow_analytics/config/profiles.py +264 -0
- gitflow_analytics/config/repository.py +124 -0
- gitflow_analytics/config/schema.py +441 -0
- gitflow_analytics/config/validator.py +154 -0
- gitflow_analytics/config.py +44 -508
- gitflow_analytics/core/analyzer.py +1209 -98
- gitflow_analytics/core/cache.py +1337 -29
- gitflow_analytics/core/data_fetcher.py +1193 -0
- gitflow_analytics/core/identity.py +363 -14
- gitflow_analytics/core/metrics_storage.py +526 -0
- gitflow_analytics/core/progress.py +372 -0
- gitflow_analytics/core/schema_version.py +269 -0
- gitflow_analytics/extractors/ml_tickets.py +1100 -0
- gitflow_analytics/extractors/story_points.py +8 -1
- gitflow_analytics/extractors/tickets.py +749 -11
- gitflow_analytics/identity_llm/__init__.py +6 -0
- gitflow_analytics/identity_llm/analysis_pass.py +231 -0
- gitflow_analytics/identity_llm/analyzer.py +464 -0
- gitflow_analytics/identity_llm/models.py +76 -0
- gitflow_analytics/integrations/github_integration.py +175 -11
- gitflow_analytics/integrations/jira_integration.py +461 -24
- gitflow_analytics/integrations/orchestrator.py +124 -1
- gitflow_analytics/metrics/activity_scoring.py +322 -0
- gitflow_analytics/metrics/branch_health.py +470 -0
- gitflow_analytics/metrics/dora.py +379 -20
- gitflow_analytics/models/database.py +843 -53
- gitflow_analytics/pm_framework/__init__.py +115 -0
- gitflow_analytics/pm_framework/adapters/__init__.py +50 -0
- gitflow_analytics/pm_framework/adapters/jira_adapter.py +1845 -0
- gitflow_analytics/pm_framework/base.py +406 -0
- gitflow_analytics/pm_framework/models.py +211 -0
- gitflow_analytics/pm_framework/orchestrator.py +652 -0
- gitflow_analytics/pm_framework/registry.py +333 -0
- gitflow_analytics/qualitative/__init__.py +9 -10
- gitflow_analytics/qualitative/chatgpt_analyzer.py +259 -0
- gitflow_analytics/qualitative/classifiers/__init__.py +3 -3
- gitflow_analytics/qualitative/classifiers/change_type.py +518 -244
- gitflow_analytics/qualitative/classifiers/domain_classifier.py +272 -165
- gitflow_analytics/qualitative/classifiers/intent_analyzer.py +321 -222
- gitflow_analytics/qualitative/classifiers/llm/__init__.py +35 -0
- gitflow_analytics/qualitative/classifiers/llm/base.py +193 -0
- gitflow_analytics/qualitative/classifiers/llm/batch_processor.py +383 -0
- gitflow_analytics/qualitative/classifiers/llm/cache.py +479 -0
- gitflow_analytics/qualitative/classifiers/llm/cost_tracker.py +435 -0
- gitflow_analytics/qualitative/classifiers/llm/openai_client.py +403 -0
- gitflow_analytics/qualitative/classifiers/llm/prompts.py +373 -0
- gitflow_analytics/qualitative/classifiers/llm/response_parser.py +287 -0
- gitflow_analytics/qualitative/classifiers/llm_commit_classifier.py +607 -0
- gitflow_analytics/qualitative/classifiers/risk_analyzer.py +215 -189
- gitflow_analytics/qualitative/core/__init__.py +4 -4
- gitflow_analytics/qualitative/core/llm_fallback.py +239 -235
- gitflow_analytics/qualitative/core/nlp_engine.py +157 -148
- gitflow_analytics/qualitative/core/pattern_cache.py +214 -192
- gitflow_analytics/qualitative/core/processor.py +381 -248
- gitflow_analytics/qualitative/enhanced_analyzer.py +2236 -0
- gitflow_analytics/qualitative/example_enhanced_usage.py +420 -0
- gitflow_analytics/qualitative/models/__init__.py +7 -7
- gitflow_analytics/qualitative/models/schemas.py +155 -121
- gitflow_analytics/qualitative/utils/__init__.py +4 -4
- gitflow_analytics/qualitative/utils/batch_processor.py +136 -123
- gitflow_analytics/qualitative/utils/cost_tracker.py +142 -140
- gitflow_analytics/qualitative/utils/metrics.py +172 -158
- gitflow_analytics/qualitative/utils/text_processing.py +146 -104
- gitflow_analytics/reports/__init__.py +100 -0
- gitflow_analytics/reports/analytics_writer.py +539 -14
- gitflow_analytics/reports/base.py +648 -0
- gitflow_analytics/reports/branch_health_writer.py +322 -0
- gitflow_analytics/reports/classification_writer.py +924 -0
- gitflow_analytics/reports/cli_integration.py +427 -0
- gitflow_analytics/reports/csv_writer.py +1676 -212
- gitflow_analytics/reports/data_models.py +504 -0
- gitflow_analytics/reports/database_report_generator.py +427 -0
- gitflow_analytics/reports/example_usage.py +344 -0
- gitflow_analytics/reports/factory.py +499 -0
- gitflow_analytics/reports/formatters.py +698 -0
- gitflow_analytics/reports/html_generator.py +1116 -0
- gitflow_analytics/reports/interfaces.py +489 -0
- gitflow_analytics/reports/json_exporter.py +2770 -0
- gitflow_analytics/reports/narrative_writer.py +2287 -158
- gitflow_analytics/reports/story_point_correlation.py +1144 -0
- gitflow_analytics/reports/weekly_trends_writer.py +389 -0
- gitflow_analytics/training/__init__.py +5 -0
- gitflow_analytics/training/model_loader.py +377 -0
- gitflow_analytics/training/pipeline.py +550 -0
- gitflow_analytics/tui/__init__.py +1 -1
- gitflow_analytics/tui/app.py +129 -126
- gitflow_analytics/tui/screens/__init__.py +3 -3
- gitflow_analytics/tui/screens/analysis_progress_screen.py +188 -179
- gitflow_analytics/tui/screens/configuration_screen.py +154 -178
- gitflow_analytics/tui/screens/loading_screen.py +100 -110
- gitflow_analytics/tui/screens/main_screen.py +89 -72
- gitflow_analytics/tui/screens/results_screen.py +305 -281
- gitflow_analytics/tui/widgets/__init__.py +2 -2
- gitflow_analytics/tui/widgets/data_table.py +67 -69
- gitflow_analytics/tui/widgets/export_modal.py +76 -76
- gitflow_analytics/tui/widgets/progress_widget.py +41 -46
- gitflow_analytics-1.3.6.dist-info/METADATA +1015 -0
- gitflow_analytics-1.3.6.dist-info/RECORD +122 -0
- gitflow_analytics-1.0.3.dist-info/METADATA +0 -490
- gitflow_analytics-1.0.3.dist-info/RECORD +0 -62
- {gitflow_analytics-1.0.3.dist-info → gitflow_analytics-1.3.6.dist-info}/WHEEL +0 -0
- {gitflow_analytics-1.0.3.dist-info → gitflow_analytics-1.3.6.dist-info}/entry_points.txt +0 -0
- {gitflow_analytics-1.0.3.dist-info → gitflow_analytics-1.3.6.dist-info}/licenses/LICENSE +0 -0
- {gitflow_analytics-1.0.3.dist-info → gitflow_analytics-1.3.6.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"""Platform-agnostic project management framework for GitFlow Analytics.
|
|
2
|
+
|
|
3
|
+
This module provides a unified interface for integrating with multiple PM platforms
|
|
4
|
+
(JIRA, Azure DevOps, Linear, Asana, etc.) to collect work item data and correlate
|
|
5
|
+
it with Git commits for comprehensive development analytics.
|
|
6
|
+
|
|
7
|
+
Key Components:
|
|
8
|
+
- UnifiedIssue, UnifiedProject, UnifiedSprint: Standard data models
|
|
9
|
+
- BasePlatformAdapter: Abstract base class for platform adapters
|
|
10
|
+
- PlatformRegistry: Manages adapter registration and instantiation
|
|
11
|
+
- PMFrameworkOrchestrator: Coordinates multi-platform data collection
|
|
12
|
+
|
|
13
|
+
Example Usage:
|
|
14
|
+
from gitflow_analytics.pm_framework import PMFrameworkOrchestrator
|
|
15
|
+
|
|
16
|
+
config = {
|
|
17
|
+
'pm_platforms': {
|
|
18
|
+
'jira': {
|
|
19
|
+
'enabled': True,
|
|
20
|
+
'base_url': 'https://company.atlassian.net',
|
|
21
|
+
'username': 'user@company.com',
|
|
22
|
+
'api_token': 'token'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
'analysis': {
|
|
26
|
+
'pm_integration': {
|
|
27
|
+
'enabled': True,
|
|
28
|
+
'primary_platform': 'jira'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
orchestrator = PMFrameworkOrchestrator(config)
|
|
34
|
+
if orchestrator.is_enabled():
|
|
35
|
+
issues = orchestrator.get_all_issues(since=datetime.now() - timedelta(weeks=12))
|
|
36
|
+
correlations = orchestrator.correlate_issues_with_commits(issues, commits)
|
|
37
|
+
metrics = orchestrator.calculate_enhanced_metrics(commits, prs, issues, correlations)
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
# Import available adapters
|
|
41
|
+
from .adapters import JIRAAdapter
|
|
42
|
+
from .base import BasePlatformAdapter, PlatformCapabilities
|
|
43
|
+
from .models import (
|
|
44
|
+
IssueStatus,
|
|
45
|
+
IssueType,
|
|
46
|
+
Priority,
|
|
47
|
+
UnifiedIssue,
|
|
48
|
+
UnifiedProject,
|
|
49
|
+
UnifiedSprint,
|
|
50
|
+
UnifiedUser,
|
|
51
|
+
)
|
|
52
|
+
from .orchestrator import PMFrameworkOrchestrator
|
|
53
|
+
from .registry import PlatformRegistry
|
|
54
|
+
|
|
55
|
+
# Lazy initialization - registry created on first access
|
|
56
|
+
_default_registry = None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def get_default_registry() -> PlatformRegistry:
|
|
60
|
+
"""Get the default platform registry with built-in adapters registered.
|
|
61
|
+
|
|
62
|
+
WHY: Provides a convenient way to access a pre-configured registry with
|
|
63
|
+
all available adapters already registered. Uses lazy initialization to
|
|
64
|
+
avoid creating registry instances at import time before credentials are
|
|
65
|
+
available.
|
|
66
|
+
|
|
67
|
+
DESIGN DECISION: Lazy initialization prevents authentication issues in
|
|
68
|
+
training pipeline where imports happen before configuration is loaded.
|
|
69
|
+
The registry is created when first accessed, ensuring credentials are
|
|
70
|
+
available from the orchestrator configuration.
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
PlatformRegistry instance with built-in adapters registered.
|
|
74
|
+
"""
|
|
75
|
+
global _default_registry
|
|
76
|
+
|
|
77
|
+
if _default_registry is None:
|
|
78
|
+
import logging
|
|
79
|
+
|
|
80
|
+
logger = logging.getLogger(__name__)
|
|
81
|
+
logger.debug("Initializing default PM platform registry (lazy initialization)")
|
|
82
|
+
|
|
83
|
+
_default_registry = PlatformRegistry()
|
|
84
|
+
_default_registry.register_adapter("jira", JIRAAdapter)
|
|
85
|
+
|
|
86
|
+
logger.debug("Default registry initialized with built-in adapters")
|
|
87
|
+
|
|
88
|
+
return _default_registry
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
__all__ = [
|
|
92
|
+
# Core orchestration
|
|
93
|
+
"PMFrameworkOrchestrator",
|
|
94
|
+
"PlatformRegistry",
|
|
95
|
+
"get_default_registry",
|
|
96
|
+
# Base classes for adapter development
|
|
97
|
+
"BasePlatformAdapter",
|
|
98
|
+
"PlatformCapabilities",
|
|
99
|
+
# Available adapters
|
|
100
|
+
"JIRAAdapter",
|
|
101
|
+
# Unified data models
|
|
102
|
+
"UnifiedIssue",
|
|
103
|
+
"UnifiedProject",
|
|
104
|
+
"UnifiedSprint",
|
|
105
|
+
"UnifiedUser",
|
|
106
|
+
# Enums for standardized values
|
|
107
|
+
"IssueType",
|
|
108
|
+
"IssueStatus",
|
|
109
|
+
"Priority",
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
# Version information
|
|
113
|
+
__version__ = "1.0.0"
|
|
114
|
+
__author__ = "GitFlow Analytics Team"
|
|
115
|
+
__description__ = "Platform-agnostic project management integration framework"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Platform-specific adapters for PM framework.
|
|
2
|
+
|
|
3
|
+
This package contains concrete implementations of BasePlatformAdapter
|
|
4
|
+
for different project management platforms. Each adapter translates between
|
|
5
|
+
platform-specific APIs and the unified data model.
|
|
6
|
+
|
|
7
|
+
Available Adapters:
|
|
8
|
+
- JIRAAdapter: JIRA Cloud and Server integration
|
|
9
|
+
|
|
10
|
+
Planned Adapters:
|
|
11
|
+
- AzureDevOpsAdapter: Azure DevOps Services and Server integration
|
|
12
|
+
- LinearAdapter: Linear workspace integration
|
|
13
|
+
- AsanaAdapter: Asana project integration
|
|
14
|
+
- GitHubIssuesAdapter: GitHub Issues integration
|
|
15
|
+
- ClickUpAdapter: ClickUp workspace integration
|
|
16
|
+
|
|
17
|
+
Example Adapter Registration:
|
|
18
|
+
from gitflow_analytics.pm_framework import PlatformRegistry
|
|
19
|
+
from .jira_adapter import JIRAAdapter
|
|
20
|
+
|
|
21
|
+
registry = PlatformRegistry()
|
|
22
|
+
registry.register_adapter('jira', JIRAAdapter)
|
|
23
|
+
|
|
24
|
+
The framework architecture is designed to support easy addition of new
|
|
25
|
+
platform adapters without modifying core framework code.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
# Import available adapters
|
|
29
|
+
from .jira_adapter import JIRAAdapter
|
|
30
|
+
|
|
31
|
+
# Placeholder for future adapter imports
|
|
32
|
+
# from .azure_devops_adapter import AzureDevOpsAdapter
|
|
33
|
+
# from .linear_adapter import LinearAdapter
|
|
34
|
+
# from .asana_adapter import AsanaAdapter
|
|
35
|
+
# from .github_issues_adapter import GitHubIssuesAdapter
|
|
36
|
+
# from .clickup_adapter import ClickUpAdapter
|
|
37
|
+
|
|
38
|
+
__all__: list[str] = [
|
|
39
|
+
"JIRAAdapter",
|
|
40
|
+
# Platform adapters will be added here as they are implemented
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
# Adapter development guidelines:
|
|
44
|
+
# 1. Inherit from BasePlatformAdapter
|
|
45
|
+
# 2. Implement all abstract methods
|
|
46
|
+
# 3. Handle platform-specific authentication
|
|
47
|
+
# 4. Map platform data to unified models
|
|
48
|
+
# 5. Include comprehensive error handling
|
|
49
|
+
# 6. Follow the logging patterns established in base classes
|
|
50
|
+
# 7. Add unit tests for all adapter functionality
|