metripy 0.3.2__py3-none-any.whl → 0.3.4__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.

Potentially problematic release.


This version of metripy might be problematic. Click here for more details.

@@ -0,0 +1,441 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Git Analysis - Code Metrics Dashboard</title>
7
+ <link rel="stylesheet" href="css/styles.css">
8
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
+ <style>
11
+ .dependency-list {
12
+ max-width: 100%;
13
+ margin: auto;
14
+ }
15
+
16
+ .dependency {
17
+ background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(255, 255, 255, 0.95) 100%);
18
+ border: 1px solid var(--border-light);
19
+ border-left: 4px solid var(--primary-color);
20
+ padding: var(--spacing-xl);
21
+ margin-bottom: var(--spacing-xl);
22
+ border-radius: var(--radius-xl);
23
+ box-shadow: var(--shadow-md);
24
+ transition: all var(--transition-normal);
25
+ }
26
+
27
+ .dependency:hover {
28
+ transform: translateY(-2px);
29
+ box-shadow: var(--shadow-xl);
30
+ border-left-color: var(--primary-dark);
31
+ }
32
+
33
+ .dependency .header {
34
+ display: flex;
35
+ justify-content: space-between;
36
+ align-items: center;
37
+ margin-bottom: var(--spacing-md);
38
+ padding-bottom: var(--spacing-md);
39
+ border-bottom: 1px solid var(--border-light);
40
+ }
41
+
42
+ .dependency h2 {
43
+ margin: 0;
44
+ font-size: 1.375rem;
45
+ font-weight: 600;
46
+ color: var(--text-primary);
47
+ display: flex;
48
+ align-items: center;
49
+ gap: var(--spacing-sm);
50
+ }
51
+
52
+ .dependency h2::before {
53
+ content: '📦';
54
+ font-size: 1.5rem;
55
+ }
56
+
57
+ .dependency a {
58
+ color: var(--primary-color);
59
+ text-decoration: none;
60
+ transition: color var(--transition-fast);
61
+ }
62
+
63
+ .dependency a:hover {
64
+ color: var(--primary-dark);
65
+ text-decoration: none;
66
+ }
67
+
68
+ .status {
69
+ padding: 0.375rem 0.875rem;
70
+ border-radius: 20px;
71
+ font-size: 0.6875rem;
72
+ font-weight: 700;
73
+ text-transform: uppercase;
74
+ letter-spacing: 0.05em;
75
+ white-space: nowrap;
76
+ box-shadow: 0 2px 4px rgba(0,0,0,0.08);
77
+ transition: all var(--transition-fast);
78
+ position: relative;
79
+ overflow: hidden;
80
+ }
81
+
82
+ .status::before {
83
+ content: '';
84
+ position: absolute;
85
+ top: 0;
86
+ left: -100%;
87
+ width: 100%;
88
+ height: 100%;
89
+ background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
90
+ transition: left 0.5s;
91
+ }
92
+
93
+ .status:hover::before {
94
+ left: 100%;
95
+ }
96
+
97
+ .status.latest {
98
+ background: linear-gradient(135deg, #10b981, #059669);
99
+ color: white;
100
+ border: none;
101
+ }
102
+
103
+ .status.latest::after {
104
+ content: '✓';
105
+ margin-left: 0.375rem;
106
+ font-weight: bold;
107
+ }
108
+
109
+ .status.outdated {
110
+ background: linear-gradient(135deg, #f59e0b, #d97706);
111
+ color: white;
112
+ border: none;
113
+ }
114
+
115
+ .status.outdated::after {
116
+ content: '⚠';
117
+ margin-left: 0.375rem;
118
+ }
119
+
120
+ .description {
121
+ margin: var(--spacing-md) 0;
122
+ font-size: 0.9375rem;
123
+ color: var(--text-secondary);
124
+ line-height: 1.6;
125
+ font-style: normal;
126
+ padding: var(--spacing-md);
127
+ background-color: var(--bg-tertiary);
128
+ border-radius: var(--radius-md);
129
+ border-left: 3px solid var(--info-color);
130
+ }
131
+
132
+ .details {
133
+ list-style: none;
134
+ padding: 0;
135
+ margin: var(--spacing-md) 0 0 0;
136
+ display: flex;
137
+ flex-wrap: wrap;
138
+ gap: var(--spacing-sm);
139
+ align-items: center;
140
+ }
141
+
142
+ .details li {
143
+ padding: var(--spacing-sm) var(--spacing-md);
144
+ background-color: var(--bg-secondary);
145
+ border-radius: var(--radius-md);
146
+ font-size: 0.8125rem;
147
+ display: inline-flex;
148
+ align-items: center;
149
+ gap: 0.375rem;
150
+ transition: all var(--transition-fast);
151
+ white-space: nowrap;
152
+ flex-shrink: 0;
153
+ }
154
+
155
+ .details li:hover {
156
+ background-color: var(--bg-tertiary);
157
+ transform: translateY(-2px);
158
+ box-shadow: 0 2px 6px rgba(0,0,0,0.1);
159
+ }
160
+
161
+ .details li strong {
162
+ color: var(--text-primary);
163
+ font-weight: 600;
164
+ }
165
+
166
+ .details li:not(:has(strong)) {
167
+ color: var(--text-secondary);
168
+ }
169
+
170
+ /* Add icons to specific detail items */
171
+ .details li:first-child::before {
172
+ content: '🔖';
173
+ font-size: 0.875rem;
174
+ }
175
+
176
+ .details li:nth-child(2)::before {
177
+ content: '🏷️';
178
+ font-size: 0.875rem;
179
+ }
180
+
181
+ .details li:nth-child(3)::before {
182
+ content: '🏷️';
183
+ font-size: 0.875rem;
184
+ }
185
+
186
+ .details li:nth-child(4)::before {
187
+ content: '⭐';
188
+ font-size: 0.875rem;
189
+ }
190
+
191
+ .details li:nth-child(5)::before {
192
+ content: '📊';
193
+ font-size: 0.875rem;
194
+ }
195
+
196
+ .details li:nth-child(6)::before {
197
+ content: '📜';
198
+ font-size: 0.875rem;
199
+ }
200
+
201
+ @media (max-width: 768px) {
202
+ .dependency {
203
+ padding: var(--spacing-lg);
204
+ }
205
+
206
+ .dependency .header {
207
+ flex-direction: column;
208
+ align-items: flex-start;
209
+ gap: var(--spacing-md);
210
+ }
211
+
212
+ .dependency h2 {
213
+ font-size: 1.125rem;
214
+ }
215
+
216
+ .details {
217
+ flex-direction: column;
218
+ align-items: stretch;
219
+ }
220
+
221
+ .details li {
222
+ width: 100%;
223
+ justify-content: flex-start;
224
+ }
225
+ }
226
+ </style>
227
+ </head>
228
+ <body>
229
+ <div class="dashboard">
230
+ <!-- Sidebar -->
231
+ <aside class="sidebar">
232
+ <div class="sidebar-header">
233
+ <div class="logo">
234
+ <img src="images/logo.svg" alt="Metripy Logo" class="logo-icon">
235
+ <h2>Metripy</h2>
236
+ </div>
237
+ </div>
238
+
239
+ <nav class="sidebar-nav">
240
+ <ul>
241
+ <li class="nav-item">
242
+ <a href="index.html" class="nav-link">
243
+ <i class="fas fa-tachometer-alt"></i>
244
+ <span>Overview</span>
245
+ </a>
246
+ </li>
247
+ <li class="nav-item">
248
+ <a href="files.html" class="nav-link">
249
+ <i class="fas fa-file-code"></i>
250
+ <span>Files</span>
251
+ </a>
252
+ </li>
253
+ <li class="nav-item">
254
+ <a href="top_offenders.html" class="nav-link">
255
+ <i class="fa-solid fa-stethoscope"></i>
256
+ <span>Top Offenders</span>
257
+ </a>
258
+ </li>
259
+ <li class="nav-item">
260
+ <a href="git_analysis.html" class="nav-link">
261
+ <i class="fab fa-git-alt"></i>
262
+ <span>Git Analysis</span>
263
+ </a>
264
+ </li>
265
+ <li class="nav-item active">
266
+ <a href="dependencies.html" class="nav-link">
267
+ <i class="fas fa-cubes"></i>
268
+ <span>Dependencies</span>
269
+ </a>
270
+ </li>
271
+ <li class="nav-item">
272
+ <a href="trends.html" class="nav-link">
273
+ <i class="fas fa-chart-line"></i>
274
+ <span>Trends</span>
275
+ </a>
276
+ </li>
277
+ </ul>
278
+ </nav>
279
+
280
+ <div class="sidebar-footer">
281
+ <div class="project-info">
282
+ <h4>Project: {{project_name}}</h4>
283
+ <p>Last updated: {{last_updated}}</p>
284
+ </div>
285
+ </div>
286
+ </aside>
287
+
288
+ <!-- Main Content -->
289
+ <main class="main-content">
290
+ <header class="page-header">
291
+ <div class="header-content">
292
+ <h1>Dependency Details</h1>
293
+ <p class="subtitle">Dependency details and stats</p>
294
+ </div>
295
+ </header>
296
+
297
+ {{#IF has_dependencies_data}}
298
+
299
+ <!-- License Chart Section -->
300
+ <section class="chart-section" style="grid-template-columns: 1fr; max-width: 600px;">
301
+ <div class="chart-container">
302
+ <div class="chart-header">
303
+ <h3>License Distribution</h3>
304
+ <p>Licenses used across dependencies</p>
305
+ </div>
306
+ <div class="chart-content">
307
+ <canvas id="licenseTypesChart"></canvas>
308
+ </div>
309
+ </div>
310
+ </section>
311
+
312
+ <div class="info-card">
313
+ <div>
314
+ {{#EACH dependencies AS dependency}}
315
+
316
+ <div class="dependency">
317
+ <div class="header">
318
+ <h2><a href="{{dependency.repository}}">{{dependency.name}}</a></h2>
319
+ <span class="status {{dependency.status}}">{{dependency.status}}</span>
320
+ </div>
321
+ <p class="description">{{dependency.description}}</p>
322
+ <ul class="details">
323
+ <li><strong>Type:</strong> {{dependency.type}}</li>
324
+ <li><strong>Required Version:</strong> {{dependency.version}}</li>
325
+ <li><strong>Latest Version:</strong> {{dependency.latest}}</li>
326
+ <li><strong>GitHub Stars:</strong> ⭐ {{dependency.github_stars}}</li>
327
+ <li><strong>Monthly Downloads:</strong> 📦 {{dependency.downloads_monthly}}</li>
328
+ <li><strong>License:</strong> {{dependency.licenses}}</li>
329
+ </ul>
330
+ </div>
331
+ {{/EACH}}
332
+ </div>
333
+ </div>
334
+
335
+ <!-- No Dependencies Data State -->
336
+ {{#ELSE}}
337
+ <div class="empty-state">
338
+ <i class="fas fa-chart-line"></i>
339
+ <h3>No Dependency Data Available</h3>
340
+ <p>Enable analysis of dependencies in your config file.</p>
341
+ </div>
342
+ {{/IF}}
343
+
344
+ </main>
345
+ </div>
346
+
347
+ <!-- Scripts -->
348
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
349
+ <script>
350
+ // Embed data directly from template engine
351
+ window.DEPENDENCIES_DATA = {{dependencies_json}};
352
+ </script>
353
+ <script>
354
+ function createLicenseTypesChart() {
355
+ const canvas = document.getElementById('licenseTypesChart');
356
+ if (!canvas) {
357
+ console.warn('License types chart canvas not found');
358
+ return;
359
+ }
360
+
361
+ const ctx = canvas.getContext('2d');
362
+
363
+ // Extract and aggregate license data from dependencies
364
+ const licenseCounts = {};
365
+
366
+ if (window.DEPENDENCIES_DATA && Array.isArray(window.DEPENDENCIES_DATA)) {
367
+ window.DEPENDENCIES_DATA.forEach(dep => {
368
+ if (dep.licenses) {
369
+ const licenses = Array.isArray(dep.licenses) ? dep.licenses : [dep.licenses];
370
+ licenses.forEach(license => {
371
+ if (license && license !== 'Unknown' && license !== 'N/A') {
372
+ licenseCounts[license] = (licenseCounts[license] || 0) + 1;
373
+ }
374
+ });
375
+ }
376
+ });
377
+ }
378
+
379
+ // If no license data found, use sample data
380
+ const chartData = Object.keys(licenseCounts).length > 0 ? licenseCounts : {
381
+ "MIT": 3,
382
+ "BSD-3-Clause": 1,
383
+ "Apache-2.0": 1,
384
+ "Apache 2.0": 1
385
+ };
386
+
387
+ // Generate colors for the chart
388
+ const colors = [
389
+ '#3b82f6', '#10b981', '#f59e0b', '#ef4444',
390
+ '#8b5cf6', '#ec4899', '#06b6d4', '#84cc16',
391
+ '#f97316', '#14b8a6', '#6366f1', '#a855f7'
392
+ ];
393
+
394
+ new Chart(ctx, {
395
+ type: 'pie',
396
+ data: {
397
+ labels: Object.keys(chartData),
398
+ datasets: [{
399
+ label: "License Types",
400
+ data: Object.values(chartData),
401
+ backgroundColor: colors.slice(0, Object.keys(chartData).length),
402
+ hoverOffset: 4
403
+ }]
404
+ },
405
+ options: {
406
+ responsive: true,
407
+ maintainAspectRatio: true,
408
+ plugins: {
409
+ legend: {
410
+ position: 'right',
411
+ labels: {
412
+ padding: 15,
413
+ font: {
414
+ size: 12
415
+ }
416
+ }
417
+ },
418
+ title: {
419
+ display: false
420
+ },
421
+ tooltip: {
422
+ callbacks: {
423
+ label: function(context) {
424
+ const label = context.label || '';
425
+ const value = context.parsed || 0;
426
+ const total = context.dataset.data.reduce((a, b) => a + b, 0);
427
+ const percentage = ((value / total) * 100).toFixed(1);
428
+ return `${label}: ${value} (${percentage}%)`;
429
+ }
430
+ }
431
+ }
432
+ }
433
+ }
434
+ });
435
+ }
436
+
437
+ // Create chart when page loads
438
+ document.addEventListener('DOMContentLoaded', createLicenseTypesChart);
439
+ </script>
440
+ </body>
441
+ </html>