greenmining 1.2.0__tar.gz → 1.2.1__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.0 → greenmining-1.2.1}/CHANGELOG.md +11 -0
- {greenmining-1.2.0/greenmining.egg-info → greenmining-1.2.1}/PKG-INFO +1 -1
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/__init__.py +1 -1
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/services/local_repo_analyzer.py +14 -7
- {greenmining-1.2.0 → greenmining-1.2.1/greenmining.egg-info}/PKG-INFO +1 -1
- {greenmining-1.2.0 → greenmining-1.2.1}/pyproject.toml +1 -1
- {greenmining-1.2.0 → greenmining-1.2.1}/LICENSE +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/MANIFEST.in +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/README.md +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/__main__.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/analyzers/__init__.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/analyzers/code_diff_analyzer.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/analyzers/metrics_power_correlator.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/analyzers/statistical_analyzer.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/analyzers/temporal_analyzer.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/controllers/__init__.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/controllers/repository_controller.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/energy/__init__.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/energy/base.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/energy/carbon_reporter.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/energy/codecarbon_meter.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/energy/cpu_meter.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/energy/rapl.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/gsf_patterns.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/models/__init__.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/models/aggregated_stats.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/models/analysis_result.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/models/commit.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/models/repository.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/services/__init__.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/services/commit_extractor.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/services/data_aggregator.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/services/data_analyzer.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/services/github_graphql_fetcher.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/services/reports.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining/utils.py +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining.egg-info/SOURCES.txt +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining.egg-info/dependency_links.txt +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining.egg-info/requires.txt +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/greenmining.egg-info/top_level.txt +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/setup.cfg +0 -0
- {greenmining-1.2.0 → greenmining-1.2.1}/setup.py +0 -0
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.1] - 2026-02-01
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Clone directory collision in `LocalRepoAnalyzer` when multiple repos share the same name (e.g. `open-android/Android` vs `hmkcode/Android` vs `duckduckgo/Android`)
|
|
7
|
+
- Race condition corruption during parallel analysis (`could not lock config file` errors)
|
|
8
|
+
- Aligned clone path sanitization with `RepositoryController._sanitize_repo_name` (owner\_repo format)
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Clone directory structure now uses unique `owner_repo/` parent dirs per repository
|
|
12
|
+
|
|
3
13
|
## [1.2.0] - 2026-01-31
|
|
4
14
|
|
|
5
15
|
### Added
|
|
@@ -88,6 +98,7 @@
|
|
|
88
98
|
- Green awareness analysis
|
|
89
99
|
- Docker containerization
|
|
90
100
|
|
|
101
|
+
[1.2.1]: https://github.com/adam-bouafia/greenmining/compare/v1.2.0...v1.2.1
|
|
91
102
|
[1.2.0]: https://github.com/adam-bouafia/greenmining/compare/v1.1.9...v1.2.0
|
|
92
103
|
[1.1.9]: https://github.com/adam-bouafia/greenmining/compare/v1.1.6...v1.1.9
|
|
93
104
|
[1.1.6]: https://github.com/adam-bouafia/greenmining/compare/v0.1.12...v1.1.6
|
|
@@ -460,12 +460,18 @@ class LocalRepoAnalyzer:
|
|
|
460
460
|
if self.to_date:
|
|
461
461
|
repo_config["to"] = self.to_date
|
|
462
462
|
|
|
463
|
-
#
|
|
464
|
-
|
|
463
|
+
# Use owner_repo format for unique directory names (avoids collisions
|
|
464
|
+
# when multiple repos share the same name, e.g. open-android/Android
|
|
465
|
+
# vs hmkcode/Android vs duckduckgo/Android).
|
|
466
|
+
safe_name = re.sub(r"[^a-z0-9_-]", "_", f"{owner}_{repo_name}".lower())
|
|
467
|
+
clone_parent = self.clone_path / safe_name
|
|
468
|
+
clone_parent.mkdir(parents=True, exist_ok=True)
|
|
469
|
+
local_path = clone_parent / repo_name
|
|
470
|
+
|
|
465
471
|
if local_path.exists():
|
|
466
472
|
shutil.rmtree(local_path)
|
|
467
473
|
|
|
468
|
-
repo_config["clone_repo_to"] = str(
|
|
474
|
+
repo_config["clone_repo_to"] = str(clone_parent)
|
|
469
475
|
|
|
470
476
|
colored_print(f" Cloning to: {local_path}", "cyan")
|
|
471
477
|
|
|
@@ -540,10 +546,11 @@ class LocalRepoAnalyzer:
|
|
|
540
546
|
return result
|
|
541
547
|
|
|
542
548
|
finally:
|
|
543
|
-
# Cleanup if requested
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
549
|
+
# Cleanup if requested (remove the unique parent dir to avoid
|
|
550
|
+
# accumulating empty owner_repo directories)
|
|
551
|
+
if self.cleanup_after and clone_parent.exists():
|
|
552
|
+
colored_print(f" Cleaning up: {clone_parent}", "cyan")
|
|
553
|
+
shutil.rmtree(clone_parent, ignore_errors=True)
|
|
547
554
|
|
|
548
555
|
def _compute_process_metrics(self, repo_path: str) -> Dict[str, Any]:
|
|
549
556
|
# Compute PyDriller process metrics for the repository.
|
|
@@ -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.1"
|
|
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
|