greenmining 1.2.6__tar.gz → 1.2.7__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.
- {greenmining-1.2.6/greenmining.egg-info → greenmining-1.2.7}/PKG-INFO +1 -1
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/__init__.py +1 -1
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/services/local_repo_analyzer.py +26 -2
- {greenmining-1.2.6 → greenmining-1.2.7/greenmining.egg-info}/PKG-INFO +1 -1
- {greenmining-1.2.6 → greenmining-1.2.7}/pyproject.toml +1 -1
- {greenmining-1.2.6 → greenmining-1.2.7}/CHANGELOG.md +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/LICENSE +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/MANIFEST.in +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/README.md +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/__main__.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/analyzers/__init__.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/analyzers/code_diff_analyzer.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/analyzers/metrics_power_correlator.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/analyzers/statistical_analyzer.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/analyzers/temporal_analyzer.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/controllers/__init__.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/controllers/repository_controller.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/energy/__init__.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/energy/base.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/energy/carbon_reporter.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/energy/codecarbon_meter.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/energy/cpu_meter.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/energy/rapl.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/gsf_patterns.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/models/__init__.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/models/aggregated_stats.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/models/analysis_result.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/models/commit.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/models/repository.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/services/__init__.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/services/commit_extractor.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/services/data_aggregator.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/services/data_analyzer.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/services/github_graphql_fetcher.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/services/reports.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining/utils.py +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining.egg-info/SOURCES.txt +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining.egg-info/dependency_links.txt +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining.egg-info/requires.txt +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/greenmining.egg-info/top_level.txt +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/setup.cfg +0 -0
- {greenmining-1.2.6 → greenmining-1.2.7}/setup.py +0 -0
|
@@ -237,8 +237,9 @@ class LocalRepoAnalyzer:
|
|
|
237
237
|
self.cleanup_after = cleanup_after
|
|
238
238
|
self.commit_order = commit_order
|
|
239
239
|
self.shallow_clone = shallow_clone
|
|
240
|
-
# Auto-calculate clone depth: max_commits *
|
|
241
|
-
|
|
240
|
+
# Auto-calculate clone depth: max_commits * 5 to account for merges/skipped commits
|
|
241
|
+
# and avoid boundary errors where parent commits fall outside the shallow window
|
|
242
|
+
self.clone_depth = clone_depth if clone_depth else max(100, max_commits * 5)
|
|
242
243
|
self.gsf_patterns = GSF_PATTERNS
|
|
243
244
|
|
|
244
245
|
# Phase 1.3: Private repository support
|
|
@@ -559,6 +560,29 @@ class LocalRepoAnalyzer:
|
|
|
559
560
|
# Compute process metrics if enabled
|
|
560
561
|
process_metrics = {}
|
|
561
562
|
if self.compute_process_metrics and local_path.exists():
|
|
563
|
+
# Unshallow the repo before process metrics — they need full history
|
|
564
|
+
# for metrics like CommitsCount, ContributorsExperience, HistoryComplexity
|
|
565
|
+
if self.shallow_clone:
|
|
566
|
+
colored_print(" Deepening clone for process metrics...", "cyan")
|
|
567
|
+
try:
|
|
568
|
+
import subprocess
|
|
569
|
+
|
|
570
|
+
subprocess.run(
|
|
571
|
+
["git", "fetch", "--unshallow"],
|
|
572
|
+
cwd=str(local_path),
|
|
573
|
+
capture_output=True,
|
|
574
|
+
text=True,
|
|
575
|
+
check=True,
|
|
576
|
+
timeout=120,
|
|
577
|
+
)
|
|
578
|
+
except subprocess.CalledProcessError:
|
|
579
|
+
# Already unshallowed or not a shallow repo — safe to ignore
|
|
580
|
+
pass
|
|
581
|
+
except subprocess.TimeoutExpired:
|
|
582
|
+
colored_print(
|
|
583
|
+
" Warning: Unshallow timed out, process metrics may be incomplete",
|
|
584
|
+
"yellow",
|
|
585
|
+
)
|
|
562
586
|
colored_print(" Computing process metrics...", "cyan")
|
|
563
587
|
process_metrics = self._compute_process_metrics(str(local_path))
|
|
564
588
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "greenmining"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.7"
|
|
8
8
|
description = "An empirical Python library for Mining Software Repositories (MSR) in Green IT research"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|