greenmining 1.1.3__tar.gz → 1.1.5__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 (53) hide show
  1. {greenmining-1.1.3 → greenmining-1.1.5}/CHANGELOG.md +1 -1
  2. {greenmining-1.1.3/greenmining.egg-info → greenmining-1.1.5}/PKG-INFO +31 -29
  3. {greenmining-1.1.3 → greenmining-1.1.5}/README.md +5 -4
  4. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/__init__.py +16 -1
  5. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/services/local_repo_analyzer.py +7 -1
  6. {greenmining-1.1.3 → greenmining-1.1.5/greenmining.egg-info}/PKG-INFO +31 -29
  7. greenmining-1.1.5/greenmining.egg-info/requires.txt +32 -0
  8. {greenmining-1.1.3 → greenmining-1.1.5}/pyproject.toml +26 -25
  9. greenmining-1.1.3/greenmining.egg-info/requires.txt +0 -32
  10. {greenmining-1.1.3 → greenmining-1.1.5}/LICENSE +0 -0
  11. {greenmining-1.1.3 → greenmining-1.1.5}/MANIFEST.in +0 -0
  12. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/__main__.py +0 -0
  13. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/__version__.py +0 -0
  14. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/analyzers/__init__.py +0 -0
  15. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/analyzers/code_diff_analyzer.py +0 -0
  16. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/analyzers/metrics_power_correlator.py +0 -0
  17. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/analyzers/power_regression.py +0 -0
  18. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/analyzers/qualitative_analyzer.py +0 -0
  19. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/analyzers/statistical_analyzer.py +0 -0
  20. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/analyzers/temporal_analyzer.py +0 -0
  21. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/analyzers/version_power_analyzer.py +0 -0
  22. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/config.py +0 -0
  23. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/controllers/__init__.py +0 -0
  24. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/controllers/repository_controller.py +0 -0
  25. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/dashboard/__init__.py +0 -0
  26. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/dashboard/app.py +0 -0
  27. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/energy/__init__.py +0 -0
  28. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/energy/base.py +0 -0
  29. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/energy/carbon_reporter.py +0 -0
  30. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/energy/codecarbon_meter.py +0 -0
  31. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/energy/cpu_meter.py +0 -0
  32. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/energy/rapl.py +0 -0
  33. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/gsf_patterns.py +0 -0
  34. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/models/__init__.py +0 -0
  35. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/models/aggregated_stats.py +0 -0
  36. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/models/analysis_result.py +0 -0
  37. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/models/commit.py +0 -0
  38. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/models/repository.py +0 -0
  39. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/presenters/__init__.py +0 -0
  40. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/presenters/console_presenter.py +0 -0
  41. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/services/__init__.py +0 -0
  42. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/services/commit_extractor.py +0 -0
  43. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/services/data_aggregator.py +0 -0
  44. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/services/data_analyzer.py +0 -0
  45. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/services/github_fetcher.py +0 -0
  46. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/services/github_graphql_fetcher.py +0 -0
  47. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/services/reports.py +0 -0
  48. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining/utils.py +0 -0
  49. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining.egg-info/SOURCES.txt +0 -0
  50. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining.egg-info/dependency_links.txt +0 -0
  51. {greenmining-1.1.3 → greenmining-1.1.5}/greenmining.egg-info/top_level.txt +0 -0
  52. {greenmining-1.1.3 → greenmining-1.1.5}/setup.cfg +0 -0
  53. {greenmining-1.1.3 → greenmining-1.1.5}/setup.py +0 -0
@@ -80,7 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
80
80
  - Initial project structure with MCP architecture
81
81
  - GSF patterns database (76 patterns, 190 keywords)
82
82
  - GitHub repository fetching and analysis
83
- - PyDriller integration for commit mining
83
+ - Git-based commit mining integration
84
84
  - Pattern matching engine
85
85
  - Green awareness detection
86
86
  - Data analysis and reporting
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: greenmining
3
- Version: 1.1.3
3
+ Version: 1.1.5
4
4
  Summary: An empirical Python library for Mining Software Repositories (MSR) in Green IT research
5
5
  Author-email: Adam Bouafia <a.bouafia@student.vu.nl>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/adam-bouafia/greenmining
8
8
  Project-URL: Documentation, https://github.com/adam-bouafia/greenmining#readme
9
+ Project-URL: Linkedin, https://www.linkedin.com/in/adam-bouafia/
9
10
  Project-URL: Repository, https://github.com/adam-bouafia/greenmining
10
11
  Project-URL: Issues, https://github.com/adam-bouafia/greenmining/issues
11
12
  Project-URL: Changelog, https://github.com/adam-bouafia/greenmining/blob/main/CHANGELOG.md
@@ -26,34 +27,34 @@ Classifier: Operating System :: OS Independent
26
27
  Requires-Python: >=3.9
27
28
  Description-Content-Type: text/markdown
28
29
  License-File: LICENSE
29
- Requires-Dist: PyGithub>=2.1.1
30
- Requires-Dist: PyDriller>=2.5
31
- Requires-Dist: pandas>=2.2.0
32
- Requires-Dist: colorama>=0.4.6
33
- Requires-Dist: tabulate>=0.9.0
34
- Requires-Dist: tqdm>=4.66.0
35
- Requires-Dist: matplotlib>=3.8.0
36
- Requires-Dist: plotly>=5.18.0
37
- Requires-Dist: python-dotenv>=1.0.0
38
- Requires-Dist: requests>=2.31.0
30
+ Requires-Dist: PyGithub
31
+ Requires-Dist: PyDriller
32
+ Requires-Dist: pandas
33
+ Requires-Dist: colorama
34
+ Requires-Dist: tabulate
35
+ Requires-Dist: tqdm
36
+ Requires-Dist: matplotlib
37
+ Requires-Dist: plotly
38
+ Requires-Dist: python-dotenv
39
+ Requires-Dist: requests
39
40
  Provides-Extra: dev
40
- Requires-Dist: pytest>=7.4.0; extra == "dev"
41
- Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
42
- Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
43
- Requires-Dist: black>=23.12.0; extra == "dev"
44
- Requires-Dist: ruff>=0.1.9; extra == "dev"
45
- Requires-Dist: mypy>=1.8.0; extra == "dev"
46
- Requires-Dist: build>=1.0.5; extra == "dev"
47
- Requires-Dist: twine>=4.0.2; extra == "dev"
41
+ Requires-Dist: pytest; extra == "dev"
42
+ Requires-Dist: pytest-cov; extra == "dev"
43
+ Requires-Dist: pytest-mock; extra == "dev"
44
+ Requires-Dist: black; extra == "dev"
45
+ Requires-Dist: ruff; extra == "dev"
46
+ Requires-Dist: mypy; extra == "dev"
47
+ Requires-Dist: build; extra == "dev"
48
+ Requires-Dist: twine; extra == "dev"
48
49
  Provides-Extra: energy
49
- Requires-Dist: psutil>=5.9.0; extra == "energy"
50
- Requires-Dist: codecarbon>=2.3.0; extra == "energy"
50
+ Requires-Dist: psutil; extra == "energy"
51
+ Requires-Dist: codecarbon; extra == "energy"
51
52
  Provides-Extra: dashboard
52
- Requires-Dist: flask>=3.0.0; extra == "dashboard"
53
+ Requires-Dist: flask; extra == "dashboard"
53
54
  Provides-Extra: docs
54
- Requires-Dist: sphinx>=7.2.0; extra == "docs"
55
- Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
56
- Requires-Dist: myst-parser>=2.0.0; extra == "docs"
55
+ Requires-Dist: sphinx; extra == "docs"
56
+ Requires-Dist: sphinx-rtd-theme; extra == "docs"
57
+ Requires-Dist: myst-parser; extra == "docs"
57
58
  Dynamic: license-file
58
59
 
59
60
  # greenmining
@@ -72,7 +73,7 @@ An empirical Python library for Mining Software Repositories (MSR) in Green IT r
72
73
  - **Mine repositories at scale** - Fetch and analyze GitHub repositories via GraphQL API with configurable filters
73
74
  - **Batch analysis with parallelism** - Analyze multiple repositories concurrently with configurable worker pools
74
75
  - **Classify green commits** - Detect 122 sustainability patterns from the Green Software Foundation (GSF) catalog
75
- - **Analyze any repository by URL** - Direct PyDriller-based analysis with support for private repositories
76
+ - **Analyze any repository by URL** - Direct Git-based analysis with support for private repositories
76
77
  - **Measure energy consumption** - RAPL, CodeCarbon, and CPU Energy Meter backends for power profiling
77
78
  - **Carbon footprint reporting** - CO2 emissions calculation with 20+ country profiles and cloud region support
78
79
  - **Power regression detection** - Identify commits that increased energy consumption
@@ -684,7 +685,7 @@ config = Config(
684
685
  - **Pattern Detection**: 122 sustainability patterns across 15 categories from the GSF catalog
685
686
  - **Keyword Analysis**: 321 green software detection keywords
686
687
  - **Repository Fetching**: GraphQL API with date, star, and language filters
687
- - **URL-Based Analysis**: Direct PyDriller analysis from GitHub URLs (HTTPS and SSH)
688
+ - **URL-Based Analysis**: Direct Git-based analysis from GitHub URLs (HTTPS and SSH)
688
689
  - **Batch Processing**: Parallel analysis of multiple repositories with configurable workers
689
690
  - **Private Repository Support**: Authentication via SSH keys or GitHub tokens
690
691
  - **Energy Measurement**: RAPL, CodeCarbon, and CPU Energy Meter backends
@@ -694,7 +695,7 @@ config = Config(
694
695
  - **Version Power Comparison**: Compare power consumption across software versions with trend detection
695
696
  - **Method-Level Analysis**: Per-method complexity metrics via Lizard integration
696
697
  - **Source Code Access**: Before/after source code for refactoring detection
697
- - **Full Process Metrics**: All 8 PyDriller process metrics (ChangeSet, CodeChurn, CommitsCount, ContributorsCount, ContributorsExperience, HistoryComplexity, HunksCount, LinesCount)
698
+ - **Full Process Metrics**: All 8 process metrics (ChangeSet, CodeChurn, CommitsCount, ContributorsCount, ContributorsExperience, HistoryComplexity, HunksCount, LinesCount)
698
699
  - **Statistical Analysis**: Correlations, effect sizes, and temporal trends
699
700
  - **Multi-format Output**: Markdown reports, CSV exports, JSON data
700
701
  - **Web Dashboard**: Flask-based interactive visualization (`pip install greenmining[dashboard]`)
@@ -848,7 +849,8 @@ ruff check greenmining/ tests/
848
849
 
849
850
  - Python 3.9+
850
851
  - PyGithub >= 2.1.1
851
- - PyDriller >= 2.5
852
+ - gitpython >= 3.1.0
853
+ - lizard >= 1.17.0
852
854
  - pandas >= 2.2.0
853
855
 
854
856
  **Optional dependencies:**
@@ -14,7 +14,7 @@ An empirical Python library for Mining Software Repositories (MSR) in Green IT r
14
14
  - **Mine repositories at scale** - Fetch and analyze GitHub repositories via GraphQL API with configurable filters
15
15
  - **Batch analysis with parallelism** - Analyze multiple repositories concurrently with configurable worker pools
16
16
  - **Classify green commits** - Detect 122 sustainability patterns from the Green Software Foundation (GSF) catalog
17
- - **Analyze any repository by URL** - Direct PyDriller-based analysis with support for private repositories
17
+ - **Analyze any repository by URL** - Direct Git-based analysis with support for private repositories
18
18
  - **Measure energy consumption** - RAPL, CodeCarbon, and CPU Energy Meter backends for power profiling
19
19
  - **Carbon footprint reporting** - CO2 emissions calculation with 20+ country profiles and cloud region support
20
20
  - **Power regression detection** - Identify commits that increased energy consumption
@@ -626,7 +626,7 @@ config = Config(
626
626
  - **Pattern Detection**: 122 sustainability patterns across 15 categories from the GSF catalog
627
627
  - **Keyword Analysis**: 321 green software detection keywords
628
628
  - **Repository Fetching**: GraphQL API with date, star, and language filters
629
- - **URL-Based Analysis**: Direct PyDriller analysis from GitHub URLs (HTTPS and SSH)
629
+ - **URL-Based Analysis**: Direct Git-based analysis from GitHub URLs (HTTPS and SSH)
630
630
  - **Batch Processing**: Parallel analysis of multiple repositories with configurable workers
631
631
  - **Private Repository Support**: Authentication via SSH keys or GitHub tokens
632
632
  - **Energy Measurement**: RAPL, CodeCarbon, and CPU Energy Meter backends
@@ -636,7 +636,7 @@ config = Config(
636
636
  - **Version Power Comparison**: Compare power consumption across software versions with trend detection
637
637
  - **Method-Level Analysis**: Per-method complexity metrics via Lizard integration
638
638
  - **Source Code Access**: Before/after source code for refactoring detection
639
- - **Full Process Metrics**: All 8 PyDriller process metrics (ChangeSet, CodeChurn, CommitsCount, ContributorsCount, ContributorsExperience, HistoryComplexity, HunksCount, LinesCount)
639
+ - **Full Process Metrics**: All 8 process metrics (ChangeSet, CodeChurn, CommitsCount, ContributorsCount, ContributorsExperience, HistoryComplexity, HunksCount, LinesCount)
640
640
  - **Statistical Analysis**: Correlations, effect sizes, and temporal trends
641
641
  - **Multi-format Output**: Markdown reports, CSV exports, JSON data
642
642
  - **Web Dashboard**: Flask-based interactive visualization (`pip install greenmining[dashboard]`)
@@ -790,7 +790,8 @@ ruff check greenmining/ tests/
790
790
 
791
791
  - Python 3.9+
792
792
  - PyGithub >= 2.1.1
793
- - PyDriller >= 2.5
793
+ - gitpython >= 3.1.0
794
+ - lizard >= 1.17.0
794
795
  - pandas >= 2.2.0
795
796
 
796
797
  **Optional dependencies:**
@@ -9,7 +9,7 @@ from greenmining.gsf_patterns import (
9
9
  is_green_aware,
10
10
  )
11
11
 
12
- __version__ = "1.1.3"
12
+ __version__ = "1.1.5"
13
13
 
14
14
 
15
15
  def fetch_repositories(
@@ -51,6 +51,8 @@ def analyze_repositories(
51
51
  include_source_code: bool = False,
52
52
  ssh_key_path: str = None,
53
53
  github_token: str = None,
54
+ since_date: str = None,
55
+ to_date: str = None,
54
56
  ):
55
57
  # Analyze multiple repositories from URLs.
56
58
  # Args:
@@ -64,8 +66,20 @@ def analyze_repositories(
64
66
  # include_source_code: Include source code before/after in results
65
67
  # ssh_key_path: SSH key path for private repositories
66
68
  # github_token: GitHub token for private HTTPS repositories
69
+ # since_date: Analyze commits from this date (YYYY-MM-DD string)
70
+ # to_date: Analyze commits up to this date (YYYY-MM-DD string)
67
71
  from greenmining.services.local_repo_analyzer import LocalRepoAnalyzer
68
72
 
73
+ kwargs = {}
74
+ if since_date:
75
+ from datetime import datetime
76
+
77
+ kwargs["since_date"] = datetime.strptime(since_date, "%Y-%m-%d")
78
+ if to_date:
79
+ from datetime import datetime
80
+
81
+ kwargs["to_date"] = datetime.strptime(to_date, "%Y-%m-%d")
82
+
69
83
  analyzer = LocalRepoAnalyzer(
70
84
  max_commits=max_commits,
71
85
  energy_tracking=energy_tracking,
@@ -74,6 +88,7 @@ def analyze_repositories(
74
88
  include_source_code=include_source_code,
75
89
  ssh_key_path=ssh_key_path,
76
90
  github_token=github_token,
91
+ **kwargs,
77
92
  )
78
93
 
79
94
  return analyzer.analyze_repositories(
@@ -204,6 +204,8 @@ class LocalRepoAnalyzer:
204
204
  method_level_analysis: bool = False,
205
205
  include_source_code: bool = False,
206
206
  process_metrics: str = "standard",
207
+ since_date: Optional[datetime] = None,
208
+ to_date: Optional[datetime] = None,
207
209
  ):
208
210
  # Initialize the local repository analyzer.
209
211
  # Args:
@@ -224,6 +226,8 @@ class LocalRepoAnalyzer:
224
226
  self.clone_path.mkdir(parents=True, exist_ok=True)
225
227
  self.max_commits = max_commits
226
228
  self.days_back = days_back
229
+ self.since_date = since_date
230
+ self.to_date = to_date
227
231
  self.skip_merges = skip_merges
228
232
  self.compute_process_metrics = compute_process_metrics
229
233
  self.cleanup_after = cleanup_after
@@ -446,7 +450,7 @@ class LocalRepoAnalyzer:
446
450
  auth_url = self._prepare_auth_url(url)
447
451
 
448
452
  # Calculate date range
449
- since_date = datetime.now() - timedelta(days=self.days_back)
453
+ since_date = self.since_date or (datetime.now() - timedelta(days=self.days_back))
450
454
 
451
455
  # Configure PyDriller Repository
452
456
  repo_config = {
@@ -454,6 +458,8 @@ class LocalRepoAnalyzer:
454
458
  "since": since_date,
455
459
  "only_no_merge": self.skip_merges,
456
460
  }
461
+ if self.to_date:
462
+ repo_config["to"] = self.to_date
457
463
 
458
464
  # Clone to specific path if needed
459
465
  local_path = self.clone_path / repo_name
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: greenmining
3
- Version: 1.1.3
3
+ Version: 1.1.5
4
4
  Summary: An empirical Python library for Mining Software Repositories (MSR) in Green IT research
5
5
  Author-email: Adam Bouafia <a.bouafia@student.vu.nl>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/adam-bouafia/greenmining
8
8
  Project-URL: Documentation, https://github.com/adam-bouafia/greenmining#readme
9
+ Project-URL: Linkedin, https://www.linkedin.com/in/adam-bouafia/
9
10
  Project-URL: Repository, https://github.com/adam-bouafia/greenmining
10
11
  Project-URL: Issues, https://github.com/adam-bouafia/greenmining/issues
11
12
  Project-URL: Changelog, https://github.com/adam-bouafia/greenmining/blob/main/CHANGELOG.md
@@ -26,34 +27,34 @@ Classifier: Operating System :: OS Independent
26
27
  Requires-Python: >=3.9
27
28
  Description-Content-Type: text/markdown
28
29
  License-File: LICENSE
29
- Requires-Dist: PyGithub>=2.1.1
30
- Requires-Dist: PyDriller>=2.5
31
- Requires-Dist: pandas>=2.2.0
32
- Requires-Dist: colorama>=0.4.6
33
- Requires-Dist: tabulate>=0.9.0
34
- Requires-Dist: tqdm>=4.66.0
35
- Requires-Dist: matplotlib>=3.8.0
36
- Requires-Dist: plotly>=5.18.0
37
- Requires-Dist: python-dotenv>=1.0.0
38
- Requires-Dist: requests>=2.31.0
30
+ Requires-Dist: PyGithub
31
+ Requires-Dist: PyDriller
32
+ Requires-Dist: pandas
33
+ Requires-Dist: colorama
34
+ Requires-Dist: tabulate
35
+ Requires-Dist: tqdm
36
+ Requires-Dist: matplotlib
37
+ Requires-Dist: plotly
38
+ Requires-Dist: python-dotenv
39
+ Requires-Dist: requests
39
40
  Provides-Extra: dev
40
- Requires-Dist: pytest>=7.4.0; extra == "dev"
41
- Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
42
- Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
43
- Requires-Dist: black>=23.12.0; extra == "dev"
44
- Requires-Dist: ruff>=0.1.9; extra == "dev"
45
- Requires-Dist: mypy>=1.8.0; extra == "dev"
46
- Requires-Dist: build>=1.0.5; extra == "dev"
47
- Requires-Dist: twine>=4.0.2; extra == "dev"
41
+ Requires-Dist: pytest; extra == "dev"
42
+ Requires-Dist: pytest-cov; extra == "dev"
43
+ Requires-Dist: pytest-mock; extra == "dev"
44
+ Requires-Dist: black; extra == "dev"
45
+ Requires-Dist: ruff; extra == "dev"
46
+ Requires-Dist: mypy; extra == "dev"
47
+ Requires-Dist: build; extra == "dev"
48
+ Requires-Dist: twine; extra == "dev"
48
49
  Provides-Extra: energy
49
- Requires-Dist: psutil>=5.9.0; extra == "energy"
50
- Requires-Dist: codecarbon>=2.3.0; extra == "energy"
50
+ Requires-Dist: psutil; extra == "energy"
51
+ Requires-Dist: codecarbon; extra == "energy"
51
52
  Provides-Extra: dashboard
52
- Requires-Dist: flask>=3.0.0; extra == "dashboard"
53
+ Requires-Dist: flask; extra == "dashboard"
53
54
  Provides-Extra: docs
54
- Requires-Dist: sphinx>=7.2.0; extra == "docs"
55
- Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
56
- Requires-Dist: myst-parser>=2.0.0; extra == "docs"
55
+ Requires-Dist: sphinx; extra == "docs"
56
+ Requires-Dist: sphinx-rtd-theme; extra == "docs"
57
+ Requires-Dist: myst-parser; extra == "docs"
57
58
  Dynamic: license-file
58
59
 
59
60
  # greenmining
@@ -72,7 +73,7 @@ An empirical Python library for Mining Software Repositories (MSR) in Green IT r
72
73
  - **Mine repositories at scale** - Fetch and analyze GitHub repositories via GraphQL API with configurable filters
73
74
  - **Batch analysis with parallelism** - Analyze multiple repositories concurrently with configurable worker pools
74
75
  - **Classify green commits** - Detect 122 sustainability patterns from the Green Software Foundation (GSF) catalog
75
- - **Analyze any repository by URL** - Direct PyDriller-based analysis with support for private repositories
76
+ - **Analyze any repository by URL** - Direct Git-based analysis with support for private repositories
76
77
  - **Measure energy consumption** - RAPL, CodeCarbon, and CPU Energy Meter backends for power profiling
77
78
  - **Carbon footprint reporting** - CO2 emissions calculation with 20+ country profiles and cloud region support
78
79
  - **Power regression detection** - Identify commits that increased energy consumption
@@ -684,7 +685,7 @@ config = Config(
684
685
  - **Pattern Detection**: 122 sustainability patterns across 15 categories from the GSF catalog
685
686
  - **Keyword Analysis**: 321 green software detection keywords
686
687
  - **Repository Fetching**: GraphQL API with date, star, and language filters
687
- - **URL-Based Analysis**: Direct PyDriller analysis from GitHub URLs (HTTPS and SSH)
688
+ - **URL-Based Analysis**: Direct Git-based analysis from GitHub URLs (HTTPS and SSH)
688
689
  - **Batch Processing**: Parallel analysis of multiple repositories with configurable workers
689
690
  - **Private Repository Support**: Authentication via SSH keys or GitHub tokens
690
691
  - **Energy Measurement**: RAPL, CodeCarbon, and CPU Energy Meter backends
@@ -694,7 +695,7 @@ config = Config(
694
695
  - **Version Power Comparison**: Compare power consumption across software versions with trend detection
695
696
  - **Method-Level Analysis**: Per-method complexity metrics via Lizard integration
696
697
  - **Source Code Access**: Before/after source code for refactoring detection
697
- - **Full Process Metrics**: All 8 PyDriller process metrics (ChangeSet, CodeChurn, CommitsCount, ContributorsCount, ContributorsExperience, HistoryComplexity, HunksCount, LinesCount)
698
+ - **Full Process Metrics**: All 8 process metrics (ChangeSet, CodeChurn, CommitsCount, ContributorsCount, ContributorsExperience, HistoryComplexity, HunksCount, LinesCount)
698
699
  - **Statistical Analysis**: Correlations, effect sizes, and temporal trends
699
700
  - **Multi-format Output**: Markdown reports, CSV exports, JSON data
700
701
  - **Web Dashboard**: Flask-based interactive visualization (`pip install greenmining[dashboard]`)
@@ -848,7 +849,8 @@ ruff check greenmining/ tests/
848
849
 
849
850
  - Python 3.9+
850
851
  - PyGithub >= 2.1.1
851
- - PyDriller >= 2.5
852
+ - gitpython >= 3.1.0
853
+ - lizard >= 1.17.0
852
854
  - pandas >= 2.2.0
853
855
 
854
856
  **Optional dependencies:**
@@ -0,0 +1,32 @@
1
+ PyGithub
2
+ PyDriller
3
+ pandas
4
+ colorama
5
+ tabulate
6
+ tqdm
7
+ matplotlib
8
+ plotly
9
+ python-dotenv
10
+ requests
11
+
12
+ [dashboard]
13
+ flask
14
+
15
+ [dev]
16
+ pytest
17
+ pytest-cov
18
+ pytest-mock
19
+ black
20
+ ruff
21
+ mypy
22
+ build
23
+ twine
24
+
25
+ [docs]
26
+ sphinx
27
+ sphinx-rtd-theme
28
+ myst-parser
29
+
30
+ [energy]
31
+ psutil
32
+ codecarbon
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "greenmining"
7
- version = "1.1.3"
7
+ version = "1.1.5"
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"
@@ -43,48 +43,49 @@ classifiers = [
43
43
  ]
44
44
 
45
45
  dependencies = [
46
- "PyGithub>=2.1.1",
47
- "PyDriller>=2.5",
48
- "pandas>=2.2.0",
49
- "colorama>=0.4.6",
50
- "tabulate>=0.9.0",
51
- "tqdm>=4.66.0",
52
- "matplotlib>=3.8.0",
53
- "plotly>=5.18.0",
54
- "python-dotenv>=1.0.0",
55
- "requests>=2.31.0"
46
+ "PyGithub",
47
+ "PyDriller",
48
+ "pandas",
49
+ "colorama",
50
+ "tabulate",
51
+ "tqdm",
52
+ "matplotlib",
53
+ "plotly",
54
+ "python-dotenv",
55
+ "requests"
56
56
  ]
57
57
 
58
58
  [project.optional-dependencies]
59
59
  dev = [
60
- "pytest>=7.4.0",
61
- "pytest-cov>=4.1.0",
62
- "pytest-mock>=3.12.0",
63
- "black>=23.12.0",
64
- "ruff>=0.1.9",
65
- "mypy>=1.8.0",
66
- "build>=1.0.5",
67
- "twine>=4.0.2"
60
+ "pytest",
61
+ "pytest-cov",
62
+ "pytest-mock",
63
+ "black",
64
+ "ruff",
65
+ "mypy",
66
+ "build",
67
+ "twine"
68
68
  ]
69
69
 
70
70
  energy = [
71
- "psutil>=5.9.0",
72
- "codecarbon>=2.3.0"
71
+ "psutil",
72
+ "codecarbon"
73
73
  ]
74
74
 
75
75
  dashboard = [
76
- "flask>=3.0.0"
76
+ "flask"
77
77
  ]
78
78
 
79
79
  docs = [
80
- "sphinx>=7.2.0",
81
- "sphinx-rtd-theme>=2.0.0",
82
- "myst-parser>=2.0.0"
80
+ "sphinx",
81
+ "sphinx-rtd-theme",
82
+ "myst-parser"
83
83
  ]
84
84
 
85
85
  [project.urls]
86
86
  Homepage = "https://github.com/adam-bouafia/greenmining"
87
87
  Documentation = "https://github.com/adam-bouafia/greenmining#readme"
88
+ Linkedin = "https://www.linkedin.com/in/adam-bouafia/"
88
89
  Repository = "https://github.com/adam-bouafia/greenmining"
89
90
  Issues = "https://github.com/adam-bouafia/greenmining/issues"
90
91
  Changelog = "https://github.com/adam-bouafia/greenmining/blob/main/CHANGELOG.md"
@@ -1,32 +0,0 @@
1
- PyGithub>=2.1.1
2
- PyDriller>=2.5
3
- pandas>=2.2.0
4
- colorama>=0.4.6
5
- tabulate>=0.9.0
6
- tqdm>=4.66.0
7
- matplotlib>=3.8.0
8
- plotly>=5.18.0
9
- python-dotenv>=1.0.0
10
- requests>=2.31.0
11
-
12
- [dashboard]
13
- flask>=3.0.0
14
-
15
- [dev]
16
- pytest>=7.4.0
17
- pytest-cov>=4.1.0
18
- pytest-mock>=3.12.0
19
- black>=23.12.0
20
- ruff>=0.1.9
21
- mypy>=1.8.0
22
- build>=1.0.5
23
- twine>=4.0.2
24
-
25
- [docs]
26
- sphinx>=7.2.0
27
- sphinx-rtd-theme>=2.0.0
28
- myst-parser>=2.0.0
29
-
30
- [energy]
31
- psutil>=5.9.0
32
- codecarbon>=2.3.0
File without changes
File without changes
File without changes
File without changes