git-contribution-analyzer 0.8.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.
- git_contribution_analyzer/__init__.py +3 -0
- git_contribution_analyzer/adapters/__init__.py +1 -0
- git_contribution_analyzer/adapters/git/__init__.py +1 -0
- git_contribution_analyzer/adapters/git/local_identity.py +51 -0
- git_contribution_analyzer/adapters/git/native_git.py +353 -0
- git_contribution_analyzer/adapters/git/pydriller_history.py +57 -0
- git_contribution_analyzer/adapters/git/repository_discovery.py +75 -0
- git_contribution_analyzer/adapters/gui/__init__.py +1 -0
- git_contribution_analyzer/adapters/gui/app.py +63 -0
- git_contribution_analyzer/adapters/gui/controller.py +1084 -0
- git_contribution_analyzer/adapters/gui/models/__init__.py +3 -0
- git_contribution_analyzer/adapters/gui/models/base_table.py +108 -0
- git_contribution_analyzer/adapters/gui/settings.py +53 -0
- git_contribution_analyzer/adapters/gui/task_runner.py +196 -0
- git_contribution_analyzer/adapters/llm/__init__.py +1 -0
- git_contribution_analyzer/adapters/llm/anthropic.py +52 -0
- git_contribution_analyzer/adapters/llm/base.py +142 -0
- git_contribution_analyzer/adapters/llm/cache.py +148 -0
- git_contribution_analyzer/adapters/llm/claude_cli.py +52 -0
- git_contribution_analyzer/adapters/llm/codex_cli.py +52 -0
- git_contribution_analyzer/adapters/llm/command_base.py +153 -0
- git_contribution_analyzer/adapters/llm/mock.py +82 -0
- git_contribution_analyzer/adapters/llm/ollama.py +53 -0
- git_contribution_analyzer/adapters/llm/openai_compatible.py +61 -0
- git_contribution_analyzer/adapters/llm/registry.py +117 -0
- git_contribution_analyzer/adapters/mcp/__init__.py +13 -0
- git_contribution_analyzer/adapters/mcp/installer.py +175 -0
- git_contribution_analyzer/adapters/mcp/prompts_resources.py +218 -0
- git_contribution_analyzer/adapters/mcp/protocol.py +361 -0
- git_contribution_analyzer/adapters/mcp/server.py +52 -0
- git_contribution_analyzer/adapters/mcp/tools.py +621 -0
- git_contribution_analyzer/adapters/outcomes/__init__.py +1 -0
- git_contribution_analyzer/adapters/outcomes/yaml_loader.py +55 -0
- git_contribution_analyzer/adapters/outcomes/yaml_store.py +104 -0
- git_contribution_analyzer/adapters/reporting/__init__.py +1 -0
- git_contribution_analyzer/adapters/reporting/brag_markdown.py +115 -0
- git_contribution_analyzer/adapters/reporting/html_report.py +1413 -0
- git_contribution_analyzer/adapters/reporting/markdown.py +217 -0
- git_contribution_analyzer/adapters/reporting/portfolio_markdown.py +167 -0
- git_contribution_analyzer/adapters/reporting/recap_markdown.py +212 -0
- git_contribution_analyzer/adapters/reporting/resume_markdown.py +37 -0
- git_contribution_analyzer/adapters/reporting/work_assessment_csv.py +117 -0
- git_contribution_analyzer/adapters/reporting/work_assessment_markdown.py +90 -0
- git_contribution_analyzer/adapters/reporting/work_assessment_series_markdown.py +31 -0
- git_contribution_analyzer/adapters/storage/__init__.py +1 -0
- git_contribution_analyzer/adapters/storage/sqlite/__init__.py +1 -0
- git_contribution_analyzer/adapters/storage/sqlite/analysis.py +708 -0
- git_contribution_analyzer/adapters/storage/sqlite/database.py +98 -0
- git_contribution_analyzer/adapters/storage/sqlite/git_index.py +482 -0
- git_contribution_analyzer/adapters/storage/sqlite/identity_merge.py +373 -0
- git_contribution_analyzer/adapters/storage/sqlite/llm_audit.py +109 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/env.py +34 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/script.py.mako +22 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/versions/0001_initial.py +51 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/versions/0002_git_index.py +146 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/versions/0003_analysis.py +79 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/versions/0004_llm_audit.py +69 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/versions/0005_run_types.py +42 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/versions/0006_identity_merges.py +83 -0
- git_contribution_analyzer/adapters/storage/sqlite/migrations/versions/0007_structural_baselines.py +173 -0
- git_contribution_analyzer/adapters/storage/sqlite/models.py +354 -0
- git_contribution_analyzer/adapters/storage/sqlite/structural_baseline.py +841 -0
- git_contribution_analyzer/adapters/workspace/__init__.py +1 -0
- git_contribution_analyzer/adapters/workspace/config.py +135 -0
- git_contribution_analyzer/adapters/workspace/git_exclude.py +32 -0
- git_contribution_analyzer/adapters/workspace/layout.py +40 -0
- git_contribution_analyzer/adapters/workspace/locks.py +27 -0
- git_contribution_analyzer/adapters/workspace/portfolio_workspace.py +380 -0
- git_contribution_analyzer/adapters/workspace/ranking_config.py +17 -0
- git_contribution_analyzer/application/__init__.py +1 -0
- git_contribution_analyzer/application/dto/__init__.py +19 -0
- git_contribution_analyzer/application/dto/gui.py +86 -0
- git_contribution_analyzer/application/dto/results.py +21 -0
- git_contribution_analyzer/application/facades/__init__.py +3 -0
- git_contribution_analyzer/application/facades/gui.py +568 -0
- git_contribution_analyzer/application/ports/__init__.py +22 -0
- git_contribution_analyzer/application/ports/cancellation.py +50 -0
- git_contribution_analyzer/application/ports/git_history.py +22 -0
- git_contribution_analyzer/application/ports/llm.py +44 -0
- git_contribution_analyzer/application/ports/portfolio_store.py +34 -0
- git_contribution_analyzer/application/ports/progress.py +43 -0
- git_contribution_analyzer/application/ports/structural_baseline.py +93 -0
- git_contribution_analyzer/application/services/__init__.py +1 -0
- git_contribution_analyzer/application/services/assessment_explanation.py +127 -0
- git_contribution_analyzer/application/services/default_person.py +61 -0
- git_contribution_analyzer/application/services/evidence_snapshot.py +64 -0
- git_contribution_analyzer/application/services/person_selection.py +88 -0
- git_contribution_analyzer/application/services/resume_generation.py +318 -0
- git_contribution_analyzer/application/services/semantic_enhancement.py +157 -0
- git_contribution_analyzer/application/services/time_boundaries.py +49 -0
- git_contribution_analyzer/application/use_cases/__init__.py +1 -0
- git_contribution_analyzer/application/use_cases/analyze_contributions.py +276 -0
- git_contribution_analyzer/application/use_cases/analyze_project.py +295 -0
- git_contribution_analyzer/application/use_cases/assess_portfolio.py +327 -0
- git_contribution_analyzer/application/use_cases/assess_work.py +602 -0
- git_contribution_analyzer/application/use_cases/assess_work_series.py +212 -0
- git_contribution_analyzer/application/use_cases/compare_assessment_runs.py +121 -0
- git_contribution_analyzer/application/use_cases/export_report.py +49 -0
- git_contribution_analyzer/application/use_cases/generate_brag.py +308 -0
- git_contribution_analyzer/application/use_cases/generate_portfolio_recap.py +244 -0
- git_contribution_analyzer/application/use_cases/generate_portfolio_resume.py +152 -0
- git_contribution_analyzer/application/use_cases/generate_recap.py +316 -0
- git_contribution_analyzer/application/use_cases/generate_report.py +32 -0
- git_contribution_analyzer/application/use_cases/generate_resume.py +209 -0
- git_contribution_analyzer/application/use_cases/get_portfolio_status.py +83 -0
- git_contribution_analyzer/application/use_cases/get_run.py +16 -0
- git_contribution_analyzer/application/use_cases/get_status.py +69 -0
- git_contribution_analyzer/application/use_cases/index_repository.py +267 -0
- git_contribution_analyzer/application/use_cases/init_portfolio.py +89 -0
- git_contribution_analyzer/application/use_cases/init_project.py +71 -0
- git_contribution_analyzer/application/use_cases/list_identities.py +16 -0
- git_contribution_analyzer/application/use_cases/list_providers.py +29 -0
- git_contribution_analyzer/application/use_cases/list_runs.py +17 -0
- git_contribution_analyzer/application/use_cases/manage_identity_merges.py +48 -0
- git_contribution_analyzer/application/use_cases/manage_outcomes.py +189 -0
- git_contribution_analyzer/application/use_cases/manage_structural_baselines.py +262 -0
- git_contribution_analyzer/application/use_cases/map_identity.py +28 -0
- git_contribution_analyzer/application/use_cases/recover_runs.py +22 -0
- git_contribution_analyzer/application/use_cases/run_doctor.py +81 -0
- git_contribution_analyzer/application/use_cases/sync_portfolio.py +232 -0
- git_contribution_analyzer/application/use_cases/test_provider.py +22 -0
- git_contribution_analyzer/application/use_cases/uninit_project.py +23 -0
- git_contribution_analyzer/application/use_cases/verify_portfolio.py +165 -0
- git_contribution_analyzer/cli/__init__.py +1 -0
- git_contribution_analyzer/cli/app.py +1430 -0
- git_contribution_analyzer/cli/exit_codes.py +13 -0
- git_contribution_analyzer/cli/output.py +26 -0
- git_contribution_analyzer/cli/portfolio_commands.py +629 -0
- git_contribution_analyzer/domain/__init__.py +1 -0
- git_contribution_analyzer/domain/errors.py +55 -0
- git_contribution_analyzer/domain/models/__init__.py +3 -0
- git_contribution_analyzer/domain/models/analysis.py +29 -0
- git_contribution_analyzer/domain/models/assessment.py +12 -0
- git_contribution_analyzer/domain/models/brag.py +148 -0
- git_contribution_analyzer/domain/models/contribution.py +55 -0
- git_contribution_analyzer/domain/models/git_history.py +69 -0
- git_contribution_analyzer/domain/models/person_selection.py +46 -0
- git_contribution_analyzer/domain/models/portfolio.py +498 -0
- git_contribution_analyzer/domain/models/ranking.py +48 -0
- git_contribution_analyzer/domain/models/recap.py +235 -0
- git_contribution_analyzer/domain/models/repository.py +10 -0
- git_contribution_analyzer/domain/models/resume.py +59 -0
- git_contribution_analyzer/domain/models/run.py +10 -0
- git_contribution_analyzer/domain/models/semantic.py +34 -0
- git_contribution_analyzer/domain/models/snapshot.py +208 -0
- git_contribution_analyzer/domain/models/structural_baseline.py +120 -0
- git_contribution_analyzer/domain/models/work_assessment.py +81 -0
- git_contribution_analyzer/domain/services/assessment_periods.py +182 -0
- git_contribution_analyzer/domain/services/brag_rules.py +250 -0
- git_contribution_analyzer/domain/services/capability_rules.py +91 -0
- git_contribution_analyzer/domain/services/contribution_clustering.py +98 -0
- git_contribution_analyzer/domain/services/contribution_rules.py +79 -0
- git_contribution_analyzer/domain/services/difficulty_rules.py +191 -0
- git_contribution_analyzer/domain/services/dimensional_summary.py +117 -0
- git_contribution_analyzer/domain/services/portfolio_aggregation.py +250 -0
- git_contribution_analyzer/domain/services/portfolio_resume_rules.py +265 -0
- git_contribution_analyzer/domain/services/portfolio_verifier.py +238 -0
- git_contribution_analyzer/domain/services/ranking_rules.py +226 -0
- git_contribution_analyzer/domain/services/recap_rules.py +268 -0
- git_contribution_analyzer/domain/services/resume_claim_rules.py +70 -0
- git_contribution_analyzer/domain/services/structural_baseline.py +317 -0
- git_contribution_analyzer/domain/services/structural_signals.py +151 -0
- git_contribution_analyzer/domain/services/workload_rules.py +185 -0
- git_contribution_analyzer/gui/__init__.py +1 -0
- git_contribution_analyzer/gui/qml/Main.qml +1141 -0
- git_contribution_analyzer/gui/qml/__init__.py +1 -0
- git_contribution_analyzer/prompts/__init__.py +1 -0
- git_contribution_analyzer/prompts/assessment/__init__.py +1 -0
- git_contribution_analyzer/prompts/assessment/v1/__init__.py +1 -0
- git_contribution_analyzer/prompts/assessment/v1/explanation.txt +4 -0
- git_contribution_analyzer/prompts/resume/__init__.py +1 -0
- git_contribution_analyzer/prompts/resume/v1/__init__.py +1 -0
- git_contribution_analyzer/prompts/resume/v1/style-concise.txt +1 -0
- git_contribution_analyzer/prompts/resume/v1/style-star.txt +1 -0
- git_contribution_analyzer/prompts/resume/v1/style-xyz.txt +1 -0
- git_contribution_analyzer/prompts/resume/v1/system.txt +3 -0
- git_contribution_analyzer/prompts/v1/__init__.py +1 -0
- git_contribution_analyzer/prompts/v1/capability_explanation.txt +2 -0
- git_contribution_analyzer/prompts/v1/contribution_summary.txt +2 -0
- git_contribution_analyzer/prompts/v1/overall_summary.txt +2 -0
- git_contribution_analyzer/prompts/v1/resume_bullet.txt +2 -0
- git_contribution_analyzer-0.8.0.dist-info/METADATA +667 -0
- git_contribution_analyzer-0.8.0.dist-info/RECORD +187 -0
- git_contribution_analyzer-0.8.0.dist-info/WHEEL +4 -0
- git_contribution_analyzer-0.8.0.dist-info/entry_points.txt +3 -0
- git_contribution_analyzer-0.8.0.dist-info/licenses/LICENSE +201 -0
- git_contribution_analyzer-0.8.0.dist-info/licenses/NOTICE +6 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
|
|
5
|
+
from git_contribution_analyzer.domain.models.contribution import ContributionItem, Evidence
|
|
6
|
+
|
|
7
|
+
CONVENTIONAL_TYPE = re.compile(r"^(?P<type>[a-zA-Z]+)(?:\([^)]*\))?!?:")
|
|
8
|
+
TYPE_MAP = {
|
|
9
|
+
"feat": "FEATURE",
|
|
10
|
+
"feature": "FEATURE",
|
|
11
|
+
"fix": "FIX",
|
|
12
|
+
"refactor": "REFACTOR",
|
|
13
|
+
"perf": "PERFORMANCE",
|
|
14
|
+
"test": "TEST",
|
|
15
|
+
"docs": "DOCUMENTATION",
|
|
16
|
+
"doc": "DOCUMENTATION",
|
|
17
|
+
"build": "BUILD",
|
|
18
|
+
"ci": "CI",
|
|
19
|
+
"chore": "CHORE",
|
|
20
|
+
"style": "STYLE",
|
|
21
|
+
"revert": "REVERT",
|
|
22
|
+
}
|
|
23
|
+
GENERATED_PARTS = {"build", "dist", "generated", "target", "vendor"}
|
|
24
|
+
GENERATED_FILES = {
|
|
25
|
+
"package-lock.json",
|
|
26
|
+
"pnpm-lock.yaml",
|
|
27
|
+
"poetry.lock",
|
|
28
|
+
"uv.lock",
|
|
29
|
+
"yarn.lock",
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def classify_commit(subject: str) -> str:
|
|
34
|
+
if subject.casefold().startswith("revert "):
|
|
35
|
+
return "REVERT"
|
|
36
|
+
match = CONVENTIONAL_TYPE.match(subject.strip())
|
|
37
|
+
if match is None:
|
|
38
|
+
return "OTHER"
|
|
39
|
+
return TYPE_MAP.get(match.group("type").casefold(), "OTHER")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def module_from_path(path: str) -> str:
|
|
43
|
+
normalized = path.replace("\\", "/").strip("/")
|
|
44
|
+
if not normalized or "/" not in normalized:
|
|
45
|
+
return "root"
|
|
46
|
+
return normalized.split("/", maxsplit=1)[0]
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def is_generated_path(path: str) -> bool:
|
|
50
|
+
normalized = path.replace("\\", "/").strip("/").casefold()
|
|
51
|
+
parts = set(normalized.split("/"))
|
|
52
|
+
return normalized.rsplit("/", maxsplit=1)[-1] in GENERATED_FILES or bool(
|
|
53
|
+
parts.intersection(GENERATED_PARTS)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def build_evidence(items: tuple[ContributionItem, ...]) -> tuple[Evidence, ...]:
|
|
58
|
+
evidence: list[Evidence] = []
|
|
59
|
+
for item in items:
|
|
60
|
+
commit_hashes = tuple(commit.hash for commit in item.commits)
|
|
61
|
+
evidence.append(
|
|
62
|
+
Evidence(
|
|
63
|
+
id=item.evidence_ids[0],
|
|
64
|
+
evidence_type="CONTRIBUTION_ITEM",
|
|
65
|
+
summary=(
|
|
66
|
+
f"{len(item.commits)} commits across {len(item.paths)} files "
|
|
67
|
+
f"in {len(item.modules)} modules"
|
|
68
|
+
),
|
|
69
|
+
commit_hashes=commit_hashes,
|
|
70
|
+
paths=item.paths,
|
|
71
|
+
metrics=(
|
|
72
|
+
("commits", len(item.commits)),
|
|
73
|
+
("filesChanged", sum(commit.files_changed for commit in item.commits)),
|
|
74
|
+
("insertions", sum(commit.insertions for commit in item.commits)),
|
|
75
|
+
("deletions", sum(commit.deletions for commit in item.commits)),
|
|
76
|
+
),
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
return tuple(evidence)
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import PurePosixPath
|
|
4
|
+
|
|
5
|
+
from git_contribution_analyzer.domain.models.contribution import ContributionItem
|
|
6
|
+
from git_contribution_analyzer.domain.models.work_assessment import (
|
|
7
|
+
DifficultyAssessment,
|
|
8
|
+
DifficultyLevel,
|
|
9
|
+
DimensionSignal,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
DIFFICULTY_RULE_VERSION = "difficulty-rules-v1"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def assess_difficulty(item: ContributionItem) -> DifficultyAssessment:
|
|
16
|
+
paths = tuple(sorted({path.replace("\\", "/").casefold() for path in item.paths}))
|
|
17
|
+
subject = " ".join(commit.subject.casefold() for commit in item.commits)
|
|
18
|
+
evidence_ids = item.evidence_ids
|
|
19
|
+
if paths and all(_is_documentation(path) for path in paths):
|
|
20
|
+
return DifficultyAssessment(
|
|
21
|
+
level=DifficultyLevel.ROUTINE,
|
|
22
|
+
dimension_signals=(
|
|
23
|
+
_signal(
|
|
24
|
+
"DELIVERY_BURDEN",
|
|
25
|
+
"DOCUMENTATION_ONLY",
|
|
26
|
+
"LOW",
|
|
27
|
+
"The item changes documentation only.",
|
|
28
|
+
evidence_ids,
|
|
29
|
+
),
|
|
30
|
+
),
|
|
31
|
+
rule_version=DIFFICULTY_RULE_VERSION,
|
|
32
|
+
evidence_ids=evidence_ids,
|
|
33
|
+
confidence="HIGH",
|
|
34
|
+
gaps=(),
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
signals: list[DimensionSignal] = []
|
|
38
|
+
modules = {path.split("/", maxsplit=1)[0] for path in paths}
|
|
39
|
+
migration = any(
|
|
40
|
+
path.endswith(".sql") and any(part in path for part in ("migration", "migrations", "db/"))
|
|
41
|
+
for path in paths
|
|
42
|
+
)
|
|
43
|
+
critical = any(
|
|
44
|
+
token in path
|
|
45
|
+
for path in paths
|
|
46
|
+
for token in ("wallet", "payment", "billing", "security", "auth", "permission")
|
|
47
|
+
)
|
|
48
|
+
distributed = any(
|
|
49
|
+
token in f"{subject} {' '.join(paths)}"
|
|
50
|
+
for token in ("redis", "message queue", "mq", "lock", "idempot", "concurr", "retry")
|
|
51
|
+
)
|
|
52
|
+
compatibility = any(
|
|
53
|
+
token in f"{subject} {' '.join(paths)}"
|
|
54
|
+
for token in ("backward", "compatib", "schema", "breaking", "public api", "api-v2")
|
|
55
|
+
)
|
|
56
|
+
code_change = any(not _is_documentation(path) and not path.endswith(".yml") for path in paths)
|
|
57
|
+
|
|
58
|
+
if len(modules) > 1:
|
|
59
|
+
signals.append(
|
|
60
|
+
_signal(
|
|
61
|
+
"IMPACT_SCOPE",
|
|
62
|
+
"MULTI_MODULE",
|
|
63
|
+
"SUBSTANTIAL",
|
|
64
|
+
f"The item spans {len(modules)} modules.",
|
|
65
|
+
evidence_ids,
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
if migration:
|
|
69
|
+
signals.append(
|
|
70
|
+
_signal(
|
|
71
|
+
"DATA_RISK",
|
|
72
|
+
"DATABASE_MIGRATION",
|
|
73
|
+
"CRITICAL",
|
|
74
|
+
"The item changes a database migration contract.",
|
|
75
|
+
evidence_ids,
|
|
76
|
+
)
|
|
77
|
+
)
|
|
78
|
+
elif any(token in subject for token in ("transaction", "multi-table", "data repair")):
|
|
79
|
+
signals.append(
|
|
80
|
+
_signal(
|
|
81
|
+
"DATA_RISK",
|
|
82
|
+
"TRANSACTIONAL_CHANGE",
|
|
83
|
+
"SUBSTANTIAL",
|
|
84
|
+
"The item contains transactional or data repair signals.",
|
|
85
|
+
evidence_ids,
|
|
86
|
+
)
|
|
87
|
+
)
|
|
88
|
+
if distributed:
|
|
89
|
+
signals.append(
|
|
90
|
+
_signal(
|
|
91
|
+
"DISTRIBUTED_RISK",
|
|
92
|
+
"CONSISTENCY_OR_CONCURRENCY",
|
|
93
|
+
"CRITICAL",
|
|
94
|
+
"The item changes concurrency or distributed consistency behavior.",
|
|
95
|
+
evidence_ids,
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
if critical:
|
|
99
|
+
signals.append(
|
|
100
|
+
_signal(
|
|
101
|
+
"BUSINESS_CRITICALITY",
|
|
102
|
+
"CRITICAL_DOMAIN",
|
|
103
|
+
"CRITICAL",
|
|
104
|
+
"The item touches a configured critical business or security domain.",
|
|
105
|
+
evidence_ids,
|
|
106
|
+
)
|
|
107
|
+
)
|
|
108
|
+
if compatibility:
|
|
109
|
+
signals.append(
|
|
110
|
+
_signal(
|
|
111
|
+
"COMPATIBILITY",
|
|
112
|
+
"CONTRACT_COMPATIBILITY",
|
|
113
|
+
"SUBSTANTIAL",
|
|
114
|
+
"The item contains public contract or compatibility signals.",
|
|
115
|
+
evidence_ids,
|
|
116
|
+
)
|
|
117
|
+
)
|
|
118
|
+
if any(_is_test(path) for path in paths):
|
|
119
|
+
signals.append(
|
|
120
|
+
_signal(
|
|
121
|
+
"DELIVERY_BURDEN",
|
|
122
|
+
"TEST_COVERAGE",
|
|
123
|
+
"SUPPORTING",
|
|
124
|
+
"The item includes test changes.",
|
|
125
|
+
evidence_ids,
|
|
126
|
+
)
|
|
127
|
+
)
|
|
128
|
+
if code_change and not signals:
|
|
129
|
+
signals.append(
|
|
130
|
+
_signal(
|
|
131
|
+
"STRUCTURE_COMPLEXITY",
|
|
132
|
+
"LOGIC_OR_API_CHANGE",
|
|
133
|
+
"STANDARD",
|
|
134
|
+
"The item changes application logic or an API surface.",
|
|
135
|
+
evidence_ids,
|
|
136
|
+
)
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
if any(signal.severity == "CRITICAL" for signal in signals):
|
|
140
|
+
level = DifficultyLevel.HIGH_RISK
|
|
141
|
+
else:
|
|
142
|
+
substantial = sum(signal.severity == "SUBSTANTIAL" for signal in signals)
|
|
143
|
+
level = (
|
|
144
|
+
DifficultyLevel.COMPLEX
|
|
145
|
+
if substantial >= 2
|
|
146
|
+
else DifficultyLevel.STANDARD
|
|
147
|
+
if code_change
|
|
148
|
+
else DifficultyLevel.ROUTINE
|
|
149
|
+
)
|
|
150
|
+
gaps = ("STRUCTURAL_ANALYZER_UNAVAILABLE",) if code_change else ()
|
|
151
|
+
confidence = (
|
|
152
|
+
"HIGH"
|
|
153
|
+
if level in (DifficultyLevel.ROUTINE, DifficultyLevel.HIGH_RISK)
|
|
154
|
+
else "MEDIUM"
|
|
155
|
+
)
|
|
156
|
+
return DifficultyAssessment(
|
|
157
|
+
level=level,
|
|
158
|
+
dimension_signals=tuple(signals),
|
|
159
|
+
rule_version=DIFFICULTY_RULE_VERSION,
|
|
160
|
+
evidence_ids=evidence_ids,
|
|
161
|
+
confidence=confidence,
|
|
162
|
+
gaps=gaps,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def _is_documentation(path: str) -> bool:
|
|
167
|
+
normalized = PurePosixPath(path)
|
|
168
|
+
return "docs" in normalized.parts or normalized.name.casefold() == "readme.md" or path.endswith(
|
|
169
|
+
(".md", ".rst", ".txt")
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def _is_test(path: str) -> bool:
|
|
174
|
+
normalized = PurePosixPath(path)
|
|
175
|
+
return "tests" in normalized.parts or normalized.name.startswith("test_")
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def _signal(
|
|
179
|
+
dimension: str,
|
|
180
|
+
code: str,
|
|
181
|
+
severity: str,
|
|
182
|
+
description: str,
|
|
183
|
+
evidence_ids: tuple[str, ...],
|
|
184
|
+
) -> DimensionSignal:
|
|
185
|
+
return DimensionSignal(
|
|
186
|
+
dimension=dimension,
|
|
187
|
+
code=code,
|
|
188
|
+
severity=severity,
|
|
189
|
+
description=description,
|
|
190
|
+
evidence_ids=evidence_ids,
|
|
191
|
+
)
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections import Counter, defaultdict
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
from git_contribution_analyzer.domain.models.assessment import CapabilityAssessment
|
|
7
|
+
from git_contribution_analyzer.domain.models.contribution import (
|
|
8
|
+
ContributionCommit,
|
|
9
|
+
ContributionItem,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def build_dimensional_summaries(
|
|
14
|
+
commits: tuple[ContributionCommit, ...],
|
|
15
|
+
items: tuple[ContributionItem, ...],
|
|
16
|
+
capabilities: tuple[CapabilityAssessment, ...],
|
|
17
|
+
) -> tuple[dict[str, Any], dict[str, Any]]:
|
|
18
|
+
non_merge = tuple(commit for commit in commits if not commit.merge)
|
|
19
|
+
module_counts = Counter(module for commit in non_merge for module in commit.modules)
|
|
20
|
+
type_counts = Counter(commit.commit_type for commit in non_merge)
|
|
21
|
+
dominant_modules = _ranked_counts(module_counts, "name")[:10]
|
|
22
|
+
change_profile = _ranked_counts(type_counts, "type")
|
|
23
|
+
|
|
24
|
+
module_evidence: defaultdict[str, set[str]] = defaultdict(set)
|
|
25
|
+
for item in items:
|
|
26
|
+
for module in item.modules:
|
|
27
|
+
module_evidence[module].update(item.evidence_ids)
|
|
28
|
+
technical_highlights = [
|
|
29
|
+
{
|
|
30
|
+
"text": f"{entry['name']} is a dominant technical module with "
|
|
31
|
+
f"{entry['commits']} commits.",
|
|
32
|
+
"evidenceIds": sorted(module_evidence[entry["name"]])[:20],
|
|
33
|
+
}
|
|
34
|
+
for entry in dominant_modules[:5]
|
|
35
|
+
if module_evidence[entry["name"]]
|
|
36
|
+
]
|
|
37
|
+
technical = {
|
|
38
|
+
"headline": (
|
|
39
|
+
f"{len(commits)} commits across {len(module_counts)} technical modules; "
|
|
40
|
+
f"{len(capabilities)} rule-based capabilities detected."
|
|
41
|
+
),
|
|
42
|
+
"dominantModules": dominant_modules,
|
|
43
|
+
"changeProfile": change_profile,
|
|
44
|
+
"capabilities": [
|
|
45
|
+
{
|
|
46
|
+
"capability": capability.capability,
|
|
47
|
+
"confidence": capability.confidence,
|
|
48
|
+
"evidenceIds": list(capability.evidence_ids),
|
|
49
|
+
"gaps": list(capability.gaps),
|
|
50
|
+
}
|
|
51
|
+
for capability in capabilities
|
|
52
|
+
],
|
|
53
|
+
"highlights": technical_highlights,
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
domain_items: defaultdict[str, list[ContributionItem]] = defaultdict(list)
|
|
57
|
+
for item in items:
|
|
58
|
+
domain_items[_business_domain(item)].append(item)
|
|
59
|
+
domains: list[dict[str, Any]] = []
|
|
60
|
+
for name, domain_contributions in domain_items.items():
|
|
61
|
+
domain_commits = tuple(
|
|
62
|
+
commit for item in domain_contributions for commit in item.commits
|
|
63
|
+
)
|
|
64
|
+
domains.append(
|
|
65
|
+
{
|
|
66
|
+
"name": name,
|
|
67
|
+
"contributionItems": len(domain_contributions),
|
|
68
|
+
"commits": len(domain_commits),
|
|
69
|
+
"landedCommits": sum(
|
|
70
|
+
commit.delivery_status != "AUTHORED_ONLY" for commit in domain_commits
|
|
71
|
+
),
|
|
72
|
+
"evidenceIds": sorted(
|
|
73
|
+
{
|
|
74
|
+
evidence_id
|
|
75
|
+
for item in domain_contributions
|
|
76
|
+
for evidence_id in item.evidence_ids
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
domains.sort(key=lambda value: (-value["commits"], value["name"]))
|
|
82
|
+
business_highlights = [
|
|
83
|
+
{
|
|
84
|
+
"text": f"{domain['name']} contains {domain['contributionItems']} contribution "
|
|
85
|
+
f"items and {domain['landedCommits']} landed commits.",
|
|
86
|
+
"evidenceIds": domain["evidenceIds"][:20],
|
|
87
|
+
}
|
|
88
|
+
for domain in domains[:10]
|
|
89
|
+
if domain["evidenceIds"]
|
|
90
|
+
]
|
|
91
|
+
business = {
|
|
92
|
+
"headline": (
|
|
93
|
+
f"{len(items)} contribution clusters across {len(domains)} deterministic "
|
|
94
|
+
"business domains."
|
|
95
|
+
),
|
|
96
|
+
"domains": domains[:20],
|
|
97
|
+
"highlights": business_highlights,
|
|
98
|
+
"limitations": [
|
|
99
|
+
"Business domains are inferred from commit scopes and clustering keys.",
|
|
100
|
+
"Git evidence does not prove revenue, customer impact, or business ownership.",
|
|
101
|
+
],
|
|
102
|
+
}
|
|
103
|
+
return technical, business
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def _ranked_counts(counts: Counter[str], label: str) -> list[dict[str, Any]]:
|
|
107
|
+
return [
|
|
108
|
+
{label: name, "commits": count}
|
|
109
|
+
for name, count in sorted(counts.items(), key=lambda value: (-value[1], value[0]))
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _business_domain(item: ContributionItem) -> str:
|
|
114
|
+
parts = item.group_key.split(":")
|
|
115
|
+
if len(parts) >= 2 and parts[0] in {"scope", "issue", "module"}:
|
|
116
|
+
return parts[1]
|
|
117
|
+
return item.modules[0] if item.modules else "unclassified"
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import hashlib
|
|
4
|
+
import json
|
|
5
|
+
from collections import defaultdict
|
|
6
|
+
|
|
7
|
+
from git_contribution_analyzer.domain.models.portfolio import (
|
|
8
|
+
PortfolioCapabilityCoverage,
|
|
9
|
+
PortfolioGroupSummary,
|
|
10
|
+
PortfolioIdentityRule,
|
|
11
|
+
PortfolioIdentitySummary,
|
|
12
|
+
PortfolioRepoSummary,
|
|
13
|
+
PortfolioScopeSummary,
|
|
14
|
+
PortfolioStructuralObservation,
|
|
15
|
+
PortfolioSummary,
|
|
16
|
+
PortfolioTotals,
|
|
17
|
+
RepoDifficultyCounts,
|
|
18
|
+
RepoPortfolioObservation,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
PORTFOLIO_RULE_VERSION = "portfolio-rules-v1"
|
|
22
|
+
|
|
23
|
+
DEFAULT_PORTFOLIO_LIMITATIONS = (
|
|
24
|
+
"Git evidence does not prove revenue, user growth, online performance, working hours, "
|
|
25
|
+
"production deployment status, or sole ownership.",
|
|
26
|
+
"Delivered commits (LANDED + RELEASED) mean reachable from each repository's configured "
|
|
27
|
+
"target branch and are not equivalent to production release.",
|
|
28
|
+
"Commit counts, line counts, and observation-only structural signals are not performance "
|
|
29
|
+
"ratings or ranking inputs.",
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def compute_portfolio_snapshot_id(
|
|
34
|
+
*,
|
|
35
|
+
portfolio_name: str,
|
|
36
|
+
identity: PortfolioIdentityRule,
|
|
37
|
+
observations: tuple[RepoPortfolioObservation, ...],
|
|
38
|
+
mode: str,
|
|
39
|
+
rule_version: str = PORTFOLIO_RULE_VERSION,
|
|
40
|
+
) -> str:
|
|
41
|
+
"""根据规范化 JSON 计算确定性 Portfolio 快照 ID (SHA-256)."""
|
|
42
|
+
sorted_aliases = sorted(
|
|
43
|
+
identity.aliases,
|
|
44
|
+
key=lambda alias: (alias.email, alias.name or ""),
|
|
45
|
+
)
|
|
46
|
+
canonical_payload = {
|
|
47
|
+
"portfolioName": portfolio_name,
|
|
48
|
+
"ruleVersion": rule_version,
|
|
49
|
+
"mode": mode,
|
|
50
|
+
"identity": {
|
|
51
|
+
"canonicalName": identity.canonical_name,
|
|
52
|
+
"canonicalEmail": identity.canonical_email,
|
|
53
|
+
"aliases": [
|
|
54
|
+
{"email": alias.email, "name": alias.name} for alias in sorted_aliases
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
"repositories": [
|
|
58
|
+
{
|
|
59
|
+
"repoKey": obs.repo_key,
|
|
60
|
+
"group": obs.group,
|
|
61
|
+
"branch": obs.branch,
|
|
62
|
+
"indexedHeadCommit": obs.indexed_head_commit,
|
|
63
|
+
"commits": obs.commits,
|
|
64
|
+
"delivered": obs.delivered_commits,
|
|
65
|
+
}
|
|
66
|
+
for obs in sorted(observations, key=lambda item: item.repo_key)
|
|
67
|
+
],
|
|
68
|
+
}
|
|
69
|
+
encoded = json.dumps(
|
|
70
|
+
canonical_payload,
|
|
71
|
+
ensure_ascii=False,
|
|
72
|
+
sort_keys=True,
|
|
73
|
+
separators=(",", ":"),
|
|
74
|
+
).encode("utf-8")
|
|
75
|
+
return hashlib.sha256(encoded).hexdigest()
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def aggregate_portfolio_summary(
|
|
79
|
+
*,
|
|
80
|
+
portfolio_name: str,
|
|
81
|
+
gca_version: str,
|
|
82
|
+
identity: PortfolioIdentityRule,
|
|
83
|
+
observations: tuple[RepoPortfolioObservation, ...],
|
|
84
|
+
mode: str = "deterministic-no-llm",
|
|
85
|
+
discovered_repositories: int | None = None,
|
|
86
|
+
failed_repositories: int = 0,
|
|
87
|
+
warnings: tuple[str, ...] = (),
|
|
88
|
+
identity_notes: tuple[str, ...] = (),
|
|
89
|
+
) -> PortfolioSummary:
|
|
90
|
+
"""将多个成员仓的确定性观测聚合为不可变 PortfolioSummary。"""
|
|
91
|
+
if failed_repositories < 0:
|
|
92
|
+
raise ValueError("failed_repositories must be non-negative")
|
|
93
|
+
|
|
94
|
+
seen_keys: set[str] = set()
|
|
95
|
+
for obs in observations:
|
|
96
|
+
if obs.repo_key in seen_keys:
|
|
97
|
+
raise ValueError(f"Duplicate repo_key in observations: {obs.repo_key!r}")
|
|
98
|
+
seen_keys.add(obs.repo_key)
|
|
99
|
+
|
|
100
|
+
matched = tuple(obs for obs in observations if obs.commits > 0)
|
|
101
|
+
discovered = (
|
|
102
|
+
discovered_repositories
|
|
103
|
+
if discovered_repositories is not None
|
|
104
|
+
else len(observations) + failed_repositories
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
commits_by_email: dict[str, int] = defaultdict(int)
|
|
108
|
+
capability_repos: dict[str, set[str]] = defaultdict(set)
|
|
109
|
+
group_order: list[str] = []
|
|
110
|
+
group_buckets: dict[str, list[RepoPortfolioObservation]] = defaultdict(list)
|
|
111
|
+
|
|
112
|
+
first_authored_candidates: list[str] = []
|
|
113
|
+
last_authored_candidates: list[str] = []
|
|
114
|
+
|
|
115
|
+
for obs in matched:
|
|
116
|
+
if obs.group not in group_buckets:
|
|
117
|
+
group_order.append(obs.group)
|
|
118
|
+
group_buckets[obs.group].append(obs)
|
|
119
|
+
for email, count in obs.commits_by_email.items():
|
|
120
|
+
commits_by_email[email] += count
|
|
121
|
+
for capability in obs.high_confidence_capabilities:
|
|
122
|
+
capability_repos[capability].add(obs.repo_key)
|
|
123
|
+
if obs.first_authored_at:
|
|
124
|
+
first_authored_candidates.append(obs.first_authored_at)
|
|
125
|
+
if obs.last_authored_at:
|
|
126
|
+
last_authored_candidates.append(obs.last_authored_at)
|
|
127
|
+
|
|
128
|
+
selectors: list[str] = [identity.canonical_name, identity.canonical_email]
|
|
129
|
+
for alias in identity.aliases:
|
|
130
|
+
if alias.name and alias.name not in selectors:
|
|
131
|
+
selectors.append(alias.name)
|
|
132
|
+
if alias.email not in selectors:
|
|
133
|
+
selectors.append(alias.email)
|
|
134
|
+
|
|
135
|
+
identity_summary = PortfolioIdentitySummary(
|
|
136
|
+
canonical_name=identity.canonical_name,
|
|
137
|
+
canonical_email=identity.canonical_email,
|
|
138
|
+
merged_selectors=tuple(selectors),
|
|
139
|
+
commits_by_email=dict(sorted(commits_by_email.items())),
|
|
140
|
+
notes=identity_notes
|
|
141
|
+
or (
|
|
142
|
+
"Alias email commits are merged into the canonical person without double counting.",
|
|
143
|
+
),
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
scope_summary = PortfolioScopeSummary(
|
|
147
|
+
discovered_repositories=discovered,
|
|
148
|
+
matched_repositories=len(matched),
|
|
149
|
+
failed_repositories=failed_repositories,
|
|
150
|
+
first_authored_at=min(first_authored_candidates) if first_authored_candidates else None,
|
|
151
|
+
last_authored_at=max(last_authored_candidates) if last_authored_candidates else None,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
totals = PortfolioTotals(
|
|
155
|
+
commits=sum(obs.commits for obs in matched),
|
|
156
|
+
delivered_commits=sum(obs.delivered_commits for obs in matched),
|
|
157
|
+
landed_commits=sum(obs.landed_commits for obs in matched),
|
|
158
|
+
released_commits=sum(obs.released_commits for obs in matched),
|
|
159
|
+
authored_only_commits=sum(obs.authored_only_commits for obs in matched),
|
|
160
|
+
reverted_commits=sum(obs.reverted_commits for obs in matched),
|
|
161
|
+
merge_commits=sum(obs.merge_commits for obs in matched),
|
|
162
|
+
file_change_records=sum(obs.file_change_records for obs in matched),
|
|
163
|
+
insertions=sum(obs.insertions for obs in matched),
|
|
164
|
+
deletions=sum(obs.deletions for obs in matched),
|
|
165
|
+
completed_items=sum(obs.completed_items for obs in matched),
|
|
166
|
+
pending_items=sum(obs.pending_items for obs in matched),
|
|
167
|
+
rework_items=sum(obs.rework_items for obs in matched),
|
|
168
|
+
integration_items=sum(obs.integration_items for obs in matched),
|
|
169
|
+
difficulty=RepoDifficultyCounts(
|
|
170
|
+
high_risk=sum(obs.difficulty.high_risk for obs in matched),
|
|
171
|
+
standard=sum(obs.difficulty.standard for obs in matched),
|
|
172
|
+
routine=sum(obs.difficulty.routine for obs in matched),
|
|
173
|
+
complex=sum(obs.difficulty.complex for obs in matched),
|
|
174
|
+
),
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
groups = tuple(
|
|
178
|
+
PortfolioGroupSummary(
|
|
179
|
+
name=group_name,
|
|
180
|
+
repositories=len(group_buckets[group_name]),
|
|
181
|
+
commits=sum(obs.commits for obs in group_buckets[group_name]),
|
|
182
|
+
delivered_commits=sum(obs.delivered_commits for obs in group_buckets[group_name]),
|
|
183
|
+
authored_only_commits=sum(
|
|
184
|
+
obs.authored_only_commits for obs in group_buckets[group_name]
|
|
185
|
+
),
|
|
186
|
+
merge_commits=sum(obs.merge_commits for obs in group_buckets[group_name]),
|
|
187
|
+
file_change_records=sum(
|
|
188
|
+
obs.file_change_records for obs in group_buckets[group_name]
|
|
189
|
+
),
|
|
190
|
+
insertions=sum(obs.insertions for obs in group_buckets[group_name]),
|
|
191
|
+
deletions=sum(obs.deletions for obs in group_buckets[group_name]),
|
|
192
|
+
completed_items=sum(obs.completed_items for obs in group_buckets[group_name]),
|
|
193
|
+
pending_items=sum(obs.pending_items for obs in group_buckets[group_name]),
|
|
194
|
+
high_risk_items=sum(obs.difficulty.high_risk for obs in group_buckets[group_name]),
|
|
195
|
+
)
|
|
196
|
+
for group_name in group_order
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
capabilities = tuple(
|
|
200
|
+
PortfolioCapabilityCoverage(capability=cap, repositories=len(repo_set))
|
|
201
|
+
for cap, repo_set in sorted(
|
|
202
|
+
capability_repos.items(),
|
|
203
|
+
key=lambda pair: (-len(pair[1]), pair[0]),
|
|
204
|
+
)
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
structural_observation = PortfolioStructuralObservation(
|
|
208
|
+
hotspot_signal_repositories=sum(1 for obs in matched if obs.has_hotspot_signal),
|
|
209
|
+
coupling_signal_repositories=sum(1 for obs in matched if obs.has_coupling_signal),
|
|
210
|
+
historical_baseline_builds=sum(obs.historical_baseline_builds for obs in matched),
|
|
211
|
+
affects_difficulty_ranking_or_resume=False,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
repo_summaries = tuple(
|
|
215
|
+
PortfolioRepoSummary(
|
|
216
|
+
repo_key=obs.repo_key,
|
|
217
|
+
group=obs.group,
|
|
218
|
+
branch=obs.branch,
|
|
219
|
+
indexed_head_commit=obs.indexed_head_commit,
|
|
220
|
+
commits=obs.commits,
|
|
221
|
+
delivered=obs.delivered_commits,
|
|
222
|
+
authored_only=obs.authored_only_commits,
|
|
223
|
+
completed_items=obs.completed_items,
|
|
224
|
+
pending_items=obs.pending_items,
|
|
225
|
+
)
|
|
226
|
+
for obs in matched
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
snapshot_id = compute_portfolio_snapshot_id(
|
|
230
|
+
portfolio_name=portfolio_name,
|
|
231
|
+
identity=identity,
|
|
232
|
+
observations=matched,
|
|
233
|
+
mode=mode,
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
return PortfolioSummary(
|
|
237
|
+
portfolio_snapshot_id=snapshot_id,
|
|
238
|
+
portfolio_name=portfolio_name,
|
|
239
|
+
gca_version=gca_version,
|
|
240
|
+
mode=mode,
|
|
241
|
+
identity=identity_summary,
|
|
242
|
+
scope=scope_summary,
|
|
243
|
+
totals=totals,
|
|
244
|
+
groups=groups,
|
|
245
|
+
high_confidence_capabilities=capabilities,
|
|
246
|
+
structural_observation=structural_observation,
|
|
247
|
+
repositories=repo_summaries,
|
|
248
|
+
warnings=warnings,
|
|
249
|
+
limitations=DEFAULT_PORTFOLIO_LIMITATIONS,
|
|
250
|
+
)
|