greenmining 0.1.11__py3-none-any.whl → 1.0.1__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.
- greenmining/__init__.py +42 -1
- greenmining/__version__.py +1 -1
- greenmining/analyzers/__init__.py +17 -0
- greenmining/analyzers/code_diff_analyzer.py +238 -0
- greenmining/analyzers/ml_feature_extractor.py +512 -0
- greenmining/analyzers/nlp_analyzer.py +365 -0
- greenmining/analyzers/qualitative_analyzer.py +460 -0
- greenmining/analyzers/statistical_analyzer.py +245 -0
- greenmining/analyzers/temporal_analyzer.py +434 -0
- greenmining/cli.py +126 -25
- greenmining/config.py +21 -0
- greenmining/controllers/repository_controller.py +58 -3
- greenmining/gsf_patterns.py +10 -5
- greenmining/models/aggregated_stats.py +3 -1
- greenmining/models/commit.py +3 -0
- greenmining/models/repository.py +3 -1
- greenmining/presenters/console_presenter.py +3 -1
- greenmining/services/commit_extractor.py +27 -1
- greenmining/services/data_aggregator.py +163 -5
- greenmining/services/data_analyzer.py +111 -8
- greenmining/services/github_fetcher.py +62 -5
- greenmining/services/reports.py +123 -2
- greenmining-1.0.1.dist-info/METADATA +699 -0
- greenmining-1.0.1.dist-info/RECORD +36 -0
- greenmining-0.1.11.dist-info/METADATA +0 -335
- greenmining-0.1.11.dist-info/RECORD +0 -29
- {greenmining-0.1.11.dist-info → greenmining-1.0.1.dist-info}/WHEEL +0 -0
- {greenmining-0.1.11.dist-info → greenmining-1.0.1.dist-info}/entry_points.txt +0 -0
- {greenmining-0.1.11.dist-info → greenmining-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {greenmining-0.1.11.dist-info → greenmining-1.0.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
greenmining/__init__.py,sha256=c_Vaq_WW6-SkI_es4cQKXpdEtXdfVEnGjIDxACF6bzk,1764
|
|
2
|
+
greenmining/__main__.py,sha256=1RwcSXcwdza6xJX5fRT8-HhZjlnKbkmGY_uxTm-NYZ4,138
|
|
3
|
+
greenmining/__version__.py,sha256=1jisBTMaMLSYH7jCobgcRNneQXzskU1YHLC5Za-5YsQ,66
|
|
4
|
+
greenmining/cli.py,sha256=40eKDEZHNeDVb91xKBG70VfPk45mwb4YjuVCC2efVPA,17458
|
|
5
|
+
greenmining/config.py,sha256=1_puT52zNS589hTxEZ3UCqRC_Qw5Jw2UupUPNbNz_hs,5195
|
|
6
|
+
greenmining/gsf_patterns.py,sha256=Prsk_stnQrfOsk0x0zn-zdevbueAnPfGDM4XNA9PbdA,54664
|
|
7
|
+
greenmining/main.py,sha256=h8J9OcwyGpVJ-gjSFUS2SZExQQlHV0eDMMjAoI_sgAo,952
|
|
8
|
+
greenmining/utils.py,sha256=-pL8yznf1jSazBMk1ugjPQbtFOQI1E9wRI1NJbHl2xs,7941
|
|
9
|
+
greenmining/analyzers/__init__.py,sha256=6emAyka8ifjNjEpqhWOGkWkTJU1SgJy8Xuva-b9XSNY,518
|
|
10
|
+
greenmining/analyzers/code_diff_analyzer.py,sha256=mL8sCpnVo_m8vsgabe2t3gF0b_gNp3MIM-D4v31-zNQ,7682
|
|
11
|
+
greenmining/analyzers/ml_feature_extractor.py,sha256=rbCPA12hD1Xda7CGkLA7vGZgDjZK0r4ev5crDcbg3Jc,17727
|
|
12
|
+
greenmining/analyzers/nlp_analyzer.py,sha256=fBwkHqV0e4rnI-dz2DH2zmrnLZYpcRTkMrAY-zmMBTo,12616
|
|
13
|
+
greenmining/analyzers/qualitative_analyzer.py,sha256=6HU_Rn-mAOBXiwroj7UjV13nmagSboz5rB4eYuiYs6U,17256
|
|
14
|
+
greenmining/analyzers/statistical_analyzer.py,sha256=g_suZ6AAJzTft2kZH5dwSUZ8S06JyuaBy4MPSZidavY,8755
|
|
15
|
+
greenmining/analyzers/temporal_analyzer.py,sha256=-1fmZdkGsNqmukoy8xxEG1v4AdJ5P6Y1C1Q8e-aI1cs,15976
|
|
16
|
+
greenmining/controllers/__init__.py,sha256=y-W1Xnnhm4JnrY2QEo5osK8jQs7hpxXovVbHlE334F0,279
|
|
17
|
+
greenmining/controllers/repository_controller.py,sha256=_DtX0OAm5VUEOPY8SxrvVWNujjQmkoyt-2PpL-R2sQ0,6453
|
|
18
|
+
greenmining/models/__init__.py,sha256=K8udzQW2V5LqPowIm5aCiK07LxJZxCt_oW3gz5Qi-mc,397
|
|
19
|
+
greenmining/models/aggregated_stats.py,sha256=eYyEcKfL8oqqE_hN0tzM7eyXFzc54by20N3-72vcJ7Y,1032
|
|
20
|
+
greenmining/models/analysis_result.py,sha256=-6hwmickqncRXDGWM3aXBEaOGlddM5G6hnmRTyHFcMs,1525
|
|
21
|
+
greenmining/models/commit.py,sha256=OT95QqVzU-0xbXB5l7m7V6J4FXSPIO80M2zYJHJdyOU,2459
|
|
22
|
+
greenmining/models/repository.py,sha256=k1X9UYZYLl0RznohOHx_Y5wur-ZBvLcNyc9vPVArb7E,2876
|
|
23
|
+
greenmining/presenters/__init__.py,sha256=-ukAvhNuTvy1Xpknps0faDZ78HKdPHPySzFpQHABzKM,203
|
|
24
|
+
greenmining/presenters/console_presenter.py,sha256=ykJ9Hgors2dRTqQNaqCTxH4fd49F0AslQTgUOr_csI0,5347
|
|
25
|
+
greenmining/services/__init__.py,sha256=7CJDjHMTrY0bBoqzx22AUzIwEvby0FbAUUKYbjSlNPQ,460
|
|
26
|
+
greenmining/services/commit_extractor.py,sha256=ldwfb6pNMPqaAXEYMIGYyo5yFx-tYcLlAiMpJdKc8Ek,12738
|
|
27
|
+
greenmining/services/data_aggregator.py,sha256=WRYmVoscX0kMyI0CRnYFPhYwOBVI73o573LhibZTcPA,23770
|
|
28
|
+
greenmining/services/data_analyzer.py,sha256=HZDQLFZDCwCUGIzRjypyXC09Fl_-zaxhly74n3siwQc,16325
|
|
29
|
+
greenmining/services/github_fetcher.py,sha256=J47-plM_NKXwHDSWNBuSUZMnZnGP6wXiJyrVfeWT9ug,11360
|
|
30
|
+
greenmining/services/reports.py,sha256=NCNI9SCTnSLeAO8WmkNIdkB0hr-XyVpuzV0sovOoUOM,27107
|
|
31
|
+
greenmining-1.0.1.dist-info/licenses/LICENSE,sha256=M7ma3JHGeiIZIs3ea0HTcFl_wLFPX2NZElUliYs4bCA,1083
|
|
32
|
+
greenmining-1.0.1.dist-info/METADATA,sha256=BxsHBbcm6_287X-8Cq2Phi-twkwXN7E8OrDDdYemhUw,25694
|
|
33
|
+
greenmining-1.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
34
|
+
greenmining-1.0.1.dist-info/entry_points.txt,sha256=oHvTWMzNFGf2W3CFEKVVPsG4exeMv0MaQu9YsUoQ9lw,53
|
|
35
|
+
greenmining-1.0.1.dist-info/top_level.txt,sha256=nreXgXxZIWI-42yQknQ0HXtUrFnzZ8N1ra4Mdy2KcsI,12
|
|
36
|
+
greenmining-1.0.1.dist-info/RECORD,,
|
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: greenmining
|
|
3
|
-
Version: 0.1.11
|
|
4
|
-
Summary: Analyze GitHub repositories to identify green software engineering patterns and energy-efficient practices
|
|
5
|
-
Author-email: Your Name <your.email@example.com>
|
|
6
|
-
Maintainer-email: Your Name <your.email@example.com>
|
|
7
|
-
License: MIT
|
|
8
|
-
Project-URL: Homepage, https://github.com/yourusername/greenmining
|
|
9
|
-
Project-URL: Documentation, https://github.com/yourusername/greenmining#readme
|
|
10
|
-
Project-URL: Repository, https://github.com/yourusername/greenmining
|
|
11
|
-
Project-URL: Issues, https://github.com/yourusername/greenmining/issues
|
|
12
|
-
Project-URL: Changelog, https://github.com/yourusername/greenmining/blob/main/CHANGELOG.md
|
|
13
|
-
Keywords: green-software,gsf,sustainability,carbon-footprint,microservices,mining,repository-analysis,energy-efficiency,github-analysis
|
|
14
|
-
Classifier: Development Status :: 3 - Alpha
|
|
15
|
-
Classifier: Intended Audience :: Developers
|
|
16
|
-
Classifier: Intended Audience :: Science/Research
|
|
17
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
18
|
-
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
19
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
-
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
-
Classifier: Operating System :: OS Independent
|
|
27
|
-
Classifier: Environment :: Console
|
|
28
|
-
Requires-Python: >=3.9
|
|
29
|
-
Description-Content-Type: text/markdown
|
|
30
|
-
License-File: LICENSE
|
|
31
|
-
Requires-Dist: PyGithub>=2.1.1
|
|
32
|
-
Requires-Dist: PyDriller>=2.5
|
|
33
|
-
Requires-Dist: pandas>=2.2.0
|
|
34
|
-
Requires-Dist: click>=8.1.7
|
|
35
|
-
Requires-Dist: colorama>=0.4.6
|
|
36
|
-
Requires-Dist: tabulate>=0.9.0
|
|
37
|
-
Requires-Dist: tqdm>=4.66.0
|
|
38
|
-
Requires-Dist: matplotlib>=3.8.0
|
|
39
|
-
Requires-Dist: plotly>=5.18.0
|
|
40
|
-
Requires-Dist: python-dotenv>=1.0.0
|
|
41
|
-
Provides-Extra: dev
|
|
42
|
-
Requires-Dist: pytest>=7.4.0; extra == "dev"
|
|
43
|
-
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
44
|
-
Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
|
|
45
|
-
Requires-Dist: black>=23.12.0; extra == "dev"
|
|
46
|
-
Requires-Dist: ruff>=0.1.9; extra == "dev"
|
|
47
|
-
Requires-Dist: mypy>=1.8.0; extra == "dev"
|
|
48
|
-
Requires-Dist: build>=1.0.3; extra == "dev"
|
|
49
|
-
Requires-Dist: twine>=4.0.2; extra == "dev"
|
|
50
|
-
Provides-Extra: docs
|
|
51
|
-
Requires-Dist: sphinx>=7.2.0; extra == "docs"
|
|
52
|
-
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
|
|
53
|
-
Requires-Dist: myst-parser>=2.0.0; extra == "docs"
|
|
54
|
-
Dynamic: license-file
|
|
55
|
-
|
|
56
|
-
# greenmining
|
|
57
|
-
|
|
58
|
-
Green mining for microservices repositories.
|
|
59
|
-
|
|
60
|
-
[](https://pypi.org/project/greenmining/)
|
|
61
|
-
[](https://pypi.org/project/greenmining/)
|
|
62
|
-
[](LICENSE)
|
|
63
|
-
|
|
64
|
-
## Overview
|
|
65
|
-
|
|
66
|
-
`greenmining` is a Python library and CLI tool for analyzing GitHub repositories to identify green software engineering practices and energy-efficient patterns. It detects 76 sustainable software patterns across cloud, web, AI, database, networking, and general categories.
|
|
67
|
-
|
|
68
|
-
## Features
|
|
69
|
-
|
|
70
|
-
- 🔍 **76 Sustainability Patterns**: Detect energy-efficient and environmentally conscious coding practices
|
|
71
|
-
- 📊 **Repository Mining**: Analyze 100+ microservices repositories from GitHub
|
|
72
|
-
- 📈 **Green Awareness Detection**: Identify sustainability-focused commits
|
|
73
|
-
- 📄 **Comprehensive Reports**: Generate analysis reports in multiple formats
|
|
74
|
-
- 🐳 **Docker Support**: Run in containers for consistent environments
|
|
75
|
-
- ⚡ **Fast Analysis**: Parallel processing and checkpoint system
|
|
76
|
-
|
|
77
|
-
## Installation
|
|
78
|
-
|
|
79
|
-
### Via pip
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
pip install greenmining
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### From source
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
git clone https://github.com/adam-bouafia/greenmining.git
|
|
89
|
-
cd greenmining
|
|
90
|
-
pip install -e .
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### With Docker
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
docker pull adambouafia/greenmining:latest
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Quick Start
|
|
100
|
-
|
|
101
|
-
### CLI Usage
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
# Set your GitHub token
|
|
105
|
-
export GITHUB_TOKEN="your_github_token"
|
|
106
|
-
|
|
107
|
-
# Run full analysis pipeline
|
|
108
|
-
greenmining pipeline --max-repos 100
|
|
109
|
-
|
|
110
|
-
# Fetch repositories
|
|
111
|
-
greenmining fetch --max-repos 100 --min-stars 100
|
|
112
|
-
|
|
113
|
-
# Extract commits
|
|
114
|
-
greenmining extract --max-commits 50
|
|
115
|
-
|
|
116
|
-
# Analyze for green patterns
|
|
117
|
-
greenmining analyze
|
|
118
|
-
|
|
119
|
-
# Generate report
|
|
120
|
-
greenmining report
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Python API
|
|
124
|
-
|
|
125
|
-
#### Basic Pattern Detection
|
|
126
|
-
|
|
127
|
-
```python
|
|
128
|
-
from greenmining import GSF_PATTERNS, is_green_aware, get_pattern_by_keywords
|
|
129
|
-
|
|
130
|
-
# Check available patterns
|
|
131
|
-
print(f"Total patterns: {len(GSF_PATTERNS)}") # 76
|
|
132
|
-
|
|
133
|
-
# Detect green awareness in commit messages
|
|
134
|
-
commit_msg = "Optimize Redis caching to reduce energy consumption"
|
|
135
|
-
if is_green_aware(commit_msg):
|
|
136
|
-
patterns = get_pattern_by_keywords(commit_msg)
|
|
137
|
-
print(f"Matched patterns: {patterns}")
|
|
138
|
-
# Output: ['Cache Static Data', 'Use Efficient Cache Strategies']
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
#### Analyze Repository Commits
|
|
142
|
-
|
|
143
|
-
```python
|
|
144
|
-
from greenmining.services.github_fetcher import GitHubFetcher
|
|
145
|
-
from greenmining.services.commit_extractor import CommitExtractor
|
|
146
|
-
from greenmining.services.data_analyzer import DataAnalyzer
|
|
147
|
-
from greenmining.config import Config
|
|
148
|
-
|
|
149
|
-
# Initialize services
|
|
150
|
-
config = Config()
|
|
151
|
-
fetcher = GitHubFetcher(config)
|
|
152
|
-
extractor = CommitExtractor(config)
|
|
153
|
-
analyzer = DataAnalyzer(config)
|
|
154
|
-
|
|
155
|
-
# Fetch repositories
|
|
156
|
-
repos = fetcher.fetch_repositories(max_repos=10, min_stars=100)
|
|
157
|
-
|
|
158
|
-
# Extract commits from first repo
|
|
159
|
-
commits = extractor.extract_commits(repos[0], max_commits=50)
|
|
160
|
-
|
|
161
|
-
# Analyze commits for green patterns
|
|
162
|
-
results = []
|
|
163
|
-
for commit in commits:
|
|
164
|
-
result = analyzer.analyze_commit(commit)
|
|
165
|
-
if result['green_aware']:
|
|
166
|
-
results.append(result)
|
|
167
|
-
print(f"Green commit found: {commit.message[:50]}...")
|
|
168
|
-
print(f" Patterns: {result['known_pattern']}")
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
#### Access Sustainability Patterns Data
|
|
172
|
-
|
|
173
|
-
```python
|
|
174
|
-
from greenmining import GSF_PATTERNS
|
|
175
|
-
|
|
176
|
-
# Get all cloud patterns
|
|
177
|
-
cloud_patterns = {
|
|
178
|
-
pid: pattern for pid, pattern in GSF_PATTERNS.items()
|
|
179
|
-
if pattern['category'] == 'cloud'
|
|
180
|
-
}
|
|
181
|
-
print(f"Cloud patterns: {len(cloud_patterns)}")
|
|
182
|
-
|
|
183
|
-
# Get pattern details
|
|
184
|
-
cache_pattern = GSF_PATTERNS['gsf_001']
|
|
185
|
-
print(f"Pattern: {cache_pattern['name']}")
|
|
186
|
-
print(f"Category: {cache_pattern['category']}")
|
|
187
|
-
print(f"Keywords: {cache_pattern['keywords']}")
|
|
188
|
-
print(f"Impact: {cache_pattern['sci_impact']}")
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
#### Generate Custom Reports
|
|
192
|
-
|
|
193
|
-
```python
|
|
194
|
-
from greenmining.services.data_aggregator import DataAggregator
|
|
195
|
-
from greenmining.config import Config
|
|
196
|
-
|
|
197
|
-
config = Config()
|
|
198
|
-
aggregator = DataAggregator(config)
|
|
199
|
-
|
|
200
|
-
# Load analysis results
|
|
201
|
-
results = aggregator.load_analysis_results()
|
|
202
|
-
|
|
203
|
-
# Generate statistics
|
|
204
|
-
stats = aggregator.calculate_statistics(results)
|
|
205
|
-
print(f"Total commits analyzed: {stats['total_commits']}")
|
|
206
|
-
print(f"Green-aware commits: {stats['green_aware_count']}")
|
|
207
|
-
print(f"Top patterns: {stats['top_patterns'][:5]}")
|
|
208
|
-
|
|
209
|
-
# Export to CSV
|
|
210
|
-
aggregator.export_to_csv(results, "output.csv")
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
#### Batch Analysis
|
|
214
|
-
|
|
215
|
-
```python
|
|
216
|
-
from greenmining.controllers.repository_controller import RepositoryController
|
|
217
|
-
from greenmining.config import Config
|
|
218
|
-
|
|
219
|
-
config = Config()
|
|
220
|
-
controller = RepositoryController(config)
|
|
221
|
-
|
|
222
|
-
# Run full pipeline programmatically
|
|
223
|
-
controller.fetch_repositories(max_repos=50)
|
|
224
|
-
controller.extract_commits(max_commits=100)
|
|
225
|
-
controller.analyze_commits()
|
|
226
|
-
controller.aggregate_results()
|
|
227
|
-
controller.generate_report()
|
|
228
|
-
|
|
229
|
-
print("Analysis complete! Check data/ directory for results.")
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### Docker Usage
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
# Run analysis pipeline
|
|
236
|
-
docker run -v $(pwd)/data:/app/data \
|
|
237
|
-
adambouafia/greenmining:latest --help
|
|
238
|
-
|
|
239
|
-
# With custom configuration
|
|
240
|
-
docker run -v $(pwd)/.env:/app/.env:ro \
|
|
241
|
-
-v $(pwd)/data:/app/data \
|
|
242
|
-
adambouafia/greenmining:latest pipeline --max-repos 50
|
|
243
|
-
|
|
244
|
-
# Interactive shell
|
|
245
|
-
docker run -it adambouafia/greenmining:latest /bin/bash
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
## Configuration
|
|
249
|
-
|
|
250
|
-
Create a `.env` file or set environment variables:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
GITHUB_TOKEN=your_github_personal_access_token
|
|
254
|
-
MAX_REPOS=100
|
|
255
|
-
COMMITS_PER_REPO=50
|
|
256
|
-
OUTPUT_DIR=./data
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
## GSF Pattern Categories
|
|
260
|
-
|
|
261
|
-
- **Cloud** (40 patterns): Autoscaling, serverless, right-sizing, region selection
|
|
262
|
-
- **Web** (15 patterns): CDN, caching, lazy loading, compression
|
|
263
|
-
- **AI/ML** (8 patterns): Model optimization, pruning, quantization
|
|
264
|
-
- **Database** (6 patterns): Indexing, query optimization, connection pooling
|
|
265
|
-
- **Networking** (4 patterns): Protocol optimization, connection reuse
|
|
266
|
-
- **General** (3 patterns): Code efficiency, resource management
|
|
267
|
-
|
|
268
|
-
## CLI Commands
|
|
269
|
-
|
|
270
|
-
| Command | Description |
|
|
271
|
-
|---------|-------------|
|
|
272
|
-
| `fetch` | Fetch microservices repositories from GitHub |
|
|
273
|
-
| `extract` | Extract commit history from repositories |
|
|
274
|
-
| `analyze` | Analyze commits for green patterns |
|
|
275
|
-
| `aggregate` | Aggregate analysis results |
|
|
276
|
-
| `report` | Generate comprehensive report |
|
|
277
|
-
| `pipeline` | Run complete analysis pipeline |
|
|
278
|
-
| `status` | Show current analysis status |
|
|
279
|
-
|
|
280
|
-
## Output Files
|
|
281
|
-
|
|
282
|
-
All outputs are saved to the `data/` directory:
|
|
283
|
-
|
|
284
|
-
- `repositories.json` - Repository metadata
|
|
285
|
-
- `commits.json` - Extracted commit data
|
|
286
|
-
- `analysis_results.json` - Pattern analysis results
|
|
287
|
-
- `aggregated_statistics.json` - Summary statistics
|
|
288
|
-
- `green_analysis_results.csv` - CSV export for spreadsheets
|
|
289
|
-
- `green_microservices_analysis.md` - Final report
|
|
290
|
-
|
|
291
|
-
## Development
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
# Clone repository
|
|
295
|
-
git clone https://github.com/adam-bouafia/greenmining.git
|
|
296
|
-
cd greenmining
|
|
297
|
-
|
|
298
|
-
# Install development dependencies
|
|
299
|
-
pip install -e ".[dev]"
|
|
300
|
-
|
|
301
|
-
# Run tests
|
|
302
|
-
pytest tests/
|
|
303
|
-
|
|
304
|
-
# Run with coverage
|
|
305
|
-
pytest --cov=greenmining tests/
|
|
306
|
-
|
|
307
|
-
# Format code
|
|
308
|
-
black greenmining/ tests/
|
|
309
|
-
ruff check greenmining/ tests/
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
## Requirements
|
|
313
|
-
|
|
314
|
-
- Python 3.9+
|
|
315
|
-
- PyGithub >= 2.1.1
|
|
316
|
-
- PyDriller >= 2.5
|
|
317
|
-
- pandas >= 2.2.0
|
|
318
|
-
- click >= 8.1.7
|
|
319
|
-
|
|
320
|
-
## License
|
|
321
|
-
|
|
322
|
-
MIT License - See [LICENSE](LICENSE) for details.
|
|
323
|
-
|
|
324
|
-
## Contributing
|
|
325
|
-
|
|
326
|
-
Contributions are welcome! Please open an issue or submit a pull request.
|
|
327
|
-
|
|
328
|
-
## Links
|
|
329
|
-
|
|
330
|
-
- **GitHub**: https://github.com/adam-bouafia/greenmining
|
|
331
|
-
- **PyPI**: https://pypi.org/project/greenmining/
|
|
332
|
-
- **Docker Hub**: https://hub.docker.com/r/adambouafia/greenmining
|
|
333
|
-
- **Documentation**: https://github.com/adam-bouafia/greenmining#readme
|
|
334
|
-
|
|
335
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
greenmining/__init__.py,sha256=5AzBFG0un1yE0v8mKexO8yYnt3DmYwP-gou6rW4ephA,396
|
|
2
|
-
greenmining/__main__.py,sha256=1RwcSXcwdza6xJX5fRT8-HhZjlnKbkmGY_uxTm-NYZ4,138
|
|
3
|
-
greenmining/__version__.py,sha256=Hry6u6QztktMYf7nqf0jPXFaA0b7lmr6pjdAaVRXDaE,66
|
|
4
|
-
greenmining/cli.py,sha256=11DEE9bwKDIzj8CbR4-B8re_1cmywPo1CyLGWVGzF9U,13254
|
|
5
|
-
greenmining/config.py,sha256=jTWEIHIwRiQmdoGV5iCILT_nPTka6ZX1DL5ltTIzWJ0,4004
|
|
6
|
-
greenmining/gsf_patterns.py,sha256=aSyj6XNgfxJlqFAI8I5xd47PQlU9DHFlDkrBFwRt6pM,54516
|
|
7
|
-
greenmining/main.py,sha256=h8J9OcwyGpVJ-gjSFUS2SZExQQlHV0eDMMjAoI_sgAo,952
|
|
8
|
-
greenmining/utils.py,sha256=-pL8yznf1jSazBMk1ugjPQbtFOQI1E9wRI1NJbHl2xs,7941
|
|
9
|
-
greenmining/controllers/__init__.py,sha256=y-W1Xnnhm4JnrY2QEo5osK8jQs7hpxXovVbHlE334F0,279
|
|
10
|
-
greenmining/controllers/repository_controller.py,sha256=q2JO5LtmpWRbNzVrE9lFBhHU0kcDSlkG3TVIB6mYqGY,4278
|
|
11
|
-
greenmining/models/__init__.py,sha256=K8udzQW2V5LqPowIm5aCiK07LxJZxCt_oW3gz5Qi-mc,397
|
|
12
|
-
greenmining/models/aggregated_stats.py,sha256=SysZD7ZeyvOG4Qsq9B_JdMjI5NpKCNKC63sJ6-s2k2M,984
|
|
13
|
-
greenmining/models/analysis_result.py,sha256=-6hwmickqncRXDGWM3aXBEaOGlddM5G6hnmRTyHFcMs,1525
|
|
14
|
-
greenmining/models/commit.py,sha256=9-PbZmHSyorD1ed13rFkrT9u5XOG7SBT5Nowlr82-PE,2399
|
|
15
|
-
greenmining/models/repository.py,sha256=lpe9Pte6KPCcRvx0aOH16v2PiH3NwjPeQRJYxriKnns,2834
|
|
16
|
-
greenmining/presenters/__init__.py,sha256=-ukAvhNuTvy1Xpknps0faDZ78HKdPHPySzFpQHABzKM,203
|
|
17
|
-
greenmining/presenters/console_presenter.py,sha256=jK_8agdEz-_2mqoyMNht-mNA9hXWe9EA8VlAUT_XFxA,5299
|
|
18
|
-
greenmining/services/__init__.py,sha256=7CJDjHMTrY0bBoqzx22AUzIwEvby0FbAUUKYbjSlNPQ,460
|
|
19
|
-
greenmining/services/commit_extractor.py,sha256=XB7Y1HKeQ4OpgEz0yAjKDPdiQcq07QCQ5Xrx9AxGfrM,11814
|
|
20
|
-
greenmining/services/data_aggregator.py,sha256=m3O9Gp1kxR6vZ6kWTBMxfZqhLVSP5K76tXg30fDf6nc,16865
|
|
21
|
-
greenmining/services/data_analyzer.py,sha256=MOQ-soPZRqiuEONB_-9QmWA-2akx1H7T2IFRp3GIizg,12035
|
|
22
|
-
greenmining/services/github_fetcher.py,sha256=9aHSbZoA8BWL1Cp0cCv2NltXf0Jr7W_mO5d_-7TuOvY,9294
|
|
23
|
-
greenmining/services/reports.py,sha256=cE7XvB2ihD5KwrO4W1Uj_I1h5pELBPF85MjgGFzkgOQ,21829
|
|
24
|
-
greenmining-0.1.11.dist-info/licenses/LICENSE,sha256=M7ma3JHGeiIZIs3ea0HTcFl_wLFPX2NZElUliYs4bCA,1083
|
|
25
|
-
greenmining-0.1.11.dist-info/METADATA,sha256=pDqi4Vpx7sqaXeVHlp6YZcKmJphblD2SvqhgTtAeLp4,9970
|
|
26
|
-
greenmining-0.1.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
-
greenmining-0.1.11.dist-info/entry_points.txt,sha256=oHvTWMzNFGf2W3CFEKVVPsG4exeMv0MaQu9YsUoQ9lw,53
|
|
28
|
-
greenmining-0.1.11.dist-info/top_level.txt,sha256=nreXgXxZIWI-42yQknQ0HXtUrFnzZ8N1ra4Mdy2KcsI,12
|
|
29
|
-
greenmining-0.1.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|