metripy 0.2.7__py3-none-any.whl → 0.3.6__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.
- metripy/Application/Analyzer.py +23 -3
- metripy/Application/Application.py +16 -2
- metripy/Application/Config/Config.py +34 -0
- metripy/Application/Config/File/ConfigFileReaderFactory.py +6 -5
- metripy/Application/Config/File/ConfigFileReaderInterface.py +70 -3
- metripy/Application/Config/File/JsonConfigFileReader.py +5 -70
- metripy/Application/Config/File/YamlConfigFileReader.py +17 -0
- metripy/Application/Config/Parser.py +24 -11
- metripy/Application/Config/ProjectConfig.py +64 -0
- metripy/Application/Info.py +61 -0
- metripy/Dependency/Dependency.py +17 -1
- metripy/Dependency/Pip/Pip.py +21 -31
- metripy/Dependency/Pip/PyPi.py +1 -0
- metripy/Git/GitAnalyzer.py +0 -3
- metripy/Import/Json/JsonImporter.py +17 -0
- metripy/LangAnalyzer/AbstractLangAnalyzer.py +4 -3
- metripy/LangAnalyzer/Php/PhpAnalyzer.py +2 -1
- metripy/LangAnalyzer/Python/PythonAnalyzer.py +31 -9
- metripy/LangAnalyzer/Python/PythonHalSteadAnalyzer.py +55 -0
- metripy/LangAnalyzer/Typescript/TypescriptAnalyzer.py +12 -9
- metripy/LangAnalyzer/Typescript/TypescriptAstParser.py +1 -1
- metripy/Metric/Code/AggregatedMetrics.py +12 -5
- metripy/Metric/Code/FileMetrics.py +32 -1
- metripy/Metric/Code/ModuleMetrics.py +5 -5
- metripy/Metric/Code/SegmentedMetrics.py +72 -36
- metripy/Metric/Code/Segmentor.py +44 -0
- metripy/Metric/FileTree/FileTreeParser.py +0 -4
- metripy/Metric/Git/GitMetrics.py +1 -1
- metripy/Metric/ProjectMetrics.py +29 -0
- metripy/Metric/Trend/AggregatedTrendMetric.py +101 -0
- metripy/Metric/Trend/ClassTrendMetric.py +20 -0
- metripy/Metric/Trend/FileTrendMetric.py +46 -0
- metripy/Metric/Trend/FunctionTrendMetric.py +28 -0
- metripy/Metric/Trend/SegmentedTrendMetric.py +29 -0
- metripy/Report/Html/DependencyPageRenderer.py +21 -0
- metripy/Report/Html/FilesPageRenderer.py +28 -0
- metripy/Report/Html/GitAnalysisPageRenderer.py +55 -0
- metripy/Report/Html/IndexPageRenderer.py +47 -0
- metripy/Report/Html/PageRenderer.py +43 -0
- metripy/Report/Html/PageRendererFactory.py +37 -0
- metripy/Report/Html/Reporter.py +78 -137
- metripy/Report/Html/TopOffendersPageRenderer.py +84 -0
- metripy/Report/Html/TrendsPageRenderer.py +137 -0
- metripy/Report/Json/GitJsonReporter.py +3 -0
- metripy/Report/Json/JsonReporter.py +6 -2
- metripy/Report/ReporterFactory.py +6 -3
- metripy/Tree/ClassNode.py +21 -0
- metripy/Tree/FunctionNode.py +66 -1
- metripy/Trend/TrendAnalyzer.py +150 -0
- metripy/templates/html_report/css/styles.css +1386 -0
- metripy/templates/html_report/dependencies.html +411 -0
- metripy/templates/html_report/files.html +1080 -0
- metripy/templates/html_report/git_analysis.html +325 -0
- metripy/templates/html_report/images/logo.svg +31 -0
- metripy/templates/html_report/index.html +374 -0
- metripy/templates/html_report/js/charts.js +313 -0
- metripy/templates/html_report/js/dashboard.js +546 -0
- metripy/templates/html_report/js/git_analysis.js +383 -0
- metripy/templates/html_report/top_offenders.html +267 -0
- metripy/templates/html_report/trends.html +468 -0
- {metripy-0.2.7.dist-info → metripy-0.3.6.dist-info}/METADATA +27 -9
- metripy-0.3.6.dist-info/RECORD +96 -0
- {metripy-0.2.7.dist-info → metripy-0.3.6.dist-info}/licenses/LICENSE +1 -1
- metripy-0.2.7.dist-info/RECORD +0 -66
- {metripy-0.2.7.dist-info → metripy-0.3.6.dist-info}/WHEEL +0 -0
- {metripy-0.2.7.dist-info → metripy-0.3.6.dist-info}/entry_points.txt +0 -0
- {metripy-0.2.7.dist-info → metripy-0.3.6.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,468 @@
|
|
|
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>Trends - 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
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div class="dashboard">
|
|
13
|
+
<!-- Sidebar -->
|
|
14
|
+
<aside class="sidebar">
|
|
15
|
+
<div class="sidebar-header">
|
|
16
|
+
<div class="logo">
|
|
17
|
+
<img src="images/logo.svg" alt="Metripy Logo" class="logo-icon">
|
|
18
|
+
<h2>Metripy</h2>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<nav class="sidebar-nav">
|
|
23
|
+
<ul>
|
|
24
|
+
<li class="nav-item">
|
|
25
|
+
<a href="index.html" class="nav-link">
|
|
26
|
+
<i class="fas fa-tachometer-alt"></i>
|
|
27
|
+
<span>Overview</span>
|
|
28
|
+
</a>
|
|
29
|
+
</li>
|
|
30
|
+
<li class="nav-item">
|
|
31
|
+
<a href="files.html" class="nav-link">
|
|
32
|
+
<i class="fas fa-file-code"></i>
|
|
33
|
+
<span>Files</span>
|
|
34
|
+
</a>
|
|
35
|
+
</li>
|
|
36
|
+
<li class="nav-item">
|
|
37
|
+
<a href="top_offenders.html" class="nav-link">
|
|
38
|
+
<i class="fa-solid fa-stethoscope"></i>
|
|
39
|
+
<span>Top Offenders</span>
|
|
40
|
+
</a>
|
|
41
|
+
</li>
|
|
42
|
+
<li class="nav-item">
|
|
43
|
+
<a href="git_analysis.html" class="nav-link">
|
|
44
|
+
<i class="fab fa-git-alt"></i>
|
|
45
|
+
<span>Git Analysis</span>
|
|
46
|
+
</a>
|
|
47
|
+
</li>
|
|
48
|
+
<li class="nav-item">
|
|
49
|
+
<a href="dependencies.html" class="nav-link">
|
|
50
|
+
<i class="fas fa-cubes"></i>
|
|
51
|
+
<span>Dependencies</span>
|
|
52
|
+
</a>
|
|
53
|
+
</li>
|
|
54
|
+
<li class="nav-item active">
|
|
55
|
+
<a href="trends.html" class="nav-link">
|
|
56
|
+
<i class="fas fa-chart-line"></i>
|
|
57
|
+
<span>Trends</span>
|
|
58
|
+
</a>
|
|
59
|
+
</li>
|
|
60
|
+
</ul>
|
|
61
|
+
</nav>
|
|
62
|
+
|
|
63
|
+
<div class="sidebar-footer">
|
|
64
|
+
<div class="project-info">
|
|
65
|
+
<h4>Project: {{project_name}}</h4>
|
|
66
|
+
<p>Last updated: {{last_updated}}</p>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</aside>
|
|
70
|
+
|
|
71
|
+
<!-- Main Content -->
|
|
72
|
+
<main class="main-content">
|
|
73
|
+
<header class="page-header">
|
|
74
|
+
<div class="header-content">
|
|
75
|
+
<h1>Code Quality Trends</h1>
|
|
76
|
+
<p class="subtitle">Track improvements and regressions over time</p>
|
|
77
|
+
</div>
|
|
78
|
+
</header>
|
|
79
|
+
|
|
80
|
+
{{#IF has_trend_data}}
|
|
81
|
+
|
|
82
|
+
<!-- Health Distribution Over Time -->
|
|
83
|
+
<section class="trends-section">
|
|
84
|
+
<div class="section-header">
|
|
85
|
+
<h2><i class="fas fa-heartbeat"></i> Health Distribution Evolution</h2>
|
|
86
|
+
<p>See how code quality segments have changed</p>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div class="health-distribution-grid">
|
|
90
|
+
<!-- Lines of Code Segment -->
|
|
91
|
+
<div class="health-card">
|
|
92
|
+
<div class="health-card-header">
|
|
93
|
+
<h3>Lines of Code</h3>
|
|
94
|
+
<span class="time-label">Previous → Current</span>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="segment-comparison">
|
|
97
|
+
<div class="comparison-row">
|
|
98
|
+
<span class="row-label">Previous</span>
|
|
99
|
+
<div class="segment-bar-horizontal">
|
|
100
|
+
<div class="segment-piece good" style="width: {{trend_data.loc_segments_prev.good_percent}}%" data-count="{{trend_data.loc_segments_prev.good}}"></div>
|
|
101
|
+
<div class="segment-piece okay" style="width: {{trend_data.loc_segments_prev.ok_percent}}%" data-count="{{trend_data.loc_segments_prev.ok}}"></div>
|
|
102
|
+
<div class="segment-piece warning" style="width: {{trend_data.loc_segments_prev.warning_percent}}%" data-count="{{trend_data.loc_segments_prev.warning}}"></div>
|
|
103
|
+
<div class="segment-piece critical" style="width: {{trend_data.loc_segments_prev.critical_percent}}%" data-count="{{trend_data.loc_segments_prev.critical}}"></div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="comparison-row">
|
|
107
|
+
<span class="row-label">Current</span>
|
|
108
|
+
<div class="segment-bar-horizontal">
|
|
109
|
+
<div class="segment-piece good" style="width: {{trend_data.loc_segments_current.good_percent}}%" data-count="{{trend_data.loc_segments_current.good}}"></div>
|
|
110
|
+
<div class="segment-piece okay" style="width: {{trend_data.loc_segments_current.ok_percent}}%" data-count="{{trend_data.loc_segments_current.ok}}"></div>
|
|
111
|
+
<div class="segment-piece warning" style="width: {{trend_data.loc_segments_current.warning_percent}}%" data-count="{{trend_data.loc_segments_current.warning}}"></div>
|
|
112
|
+
<div class="segment-piece critical" style="width: {{trend_data.loc_segments_current.critical_percent}}%" data-count="{{trend_data.loc_segments_current.critical}}"></div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="segment-legend">
|
|
117
|
+
<div class="legend-item">
|
|
118
|
+
<span class="legend-dot good"></span>
|
|
119
|
+
<div class="legend-info">
|
|
120
|
+
<span class="legend-label">Small</span>
|
|
121
|
+
<span class="legend-values">{{trend_data.loc_segments_prev.good}} → {{trend_data.loc_segments_current.good}}</span>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="legend-item">
|
|
125
|
+
<span class="legend-dot okay"></span>
|
|
126
|
+
<div class="legend-info">
|
|
127
|
+
<span class="legend-label">Medium</span>
|
|
128
|
+
<span class="legend-values">{{trend_data.loc_segments_prev.ok}} → {{trend_data.loc_segments_current.ok}}</span>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="legend-item">
|
|
132
|
+
<span class="legend-dot warning"></span>
|
|
133
|
+
<div class="legend-info">
|
|
134
|
+
<span class="legend-label">Large</span>
|
|
135
|
+
<span class="legend-values">{{trend_data.loc_segments_prev.warning}} → {{trend_data.loc_segments_current.warning}}</span>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="legend-item">
|
|
139
|
+
<span class="legend-dot critical"></span>
|
|
140
|
+
<div class="legend-info">
|
|
141
|
+
<span class="legend-label">Very Large</span>
|
|
142
|
+
<span class="legend-values">{{trend_data.loc_segments_prev.critical}} → {{trend_data.loc_segments_current.critical}}</span>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<!-- Complexity Segment -->
|
|
149
|
+
<div class="health-card">
|
|
150
|
+
<div class="health-card-header">
|
|
151
|
+
<h3>Avg. Complexity</h3>
|
|
152
|
+
<span class="time-label">Previous → Current</span>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="segment-comparison">
|
|
155
|
+
<div class="comparison-row">
|
|
156
|
+
<span class="row-label">Previous</span>
|
|
157
|
+
<div class="segment-bar-horizontal">
|
|
158
|
+
<div class="segment-piece good" style="width: {{trend_data.complexity_segments_prev.good_percent}}%" data-count="{{trend_data.complexity_segments_prev.good}}"></div>
|
|
159
|
+
<div class="segment-piece okay" style="width: {{trend_data.complexity_segments_prev.ok_percent}}%" data-count="{{trend_data.complexity_segments_prev.ok}}"></div>
|
|
160
|
+
<div class="segment-piece warning" style="width: {{trend_data.complexity_segments_prev.warning_percent}}%" data-count="{{trend_data.complexity_segments_prev.warning}}"></div>
|
|
161
|
+
<div class="segment-piece critical" style="width: {{trend_data.complexity_segments_prev.critical_percent}}%" data-count="{{trend_data.complexity_segments_prev.critical}}"></div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="comparison-row">
|
|
165
|
+
<span class="row-label">Current</span>
|
|
166
|
+
<div class="segment-bar-horizontal">
|
|
167
|
+
<div class="segment-piece good" style="width: {{trend_data.complexity_segments_current.good_percent}}%" data-count="{{trend_data.complexity_segments_current.good}}"></div>
|
|
168
|
+
<div class="segment-piece okay" style="width: {{trend_data.complexity_segments_current.ok_percent}}%" data-count="{{trend_data.complexity_segments_current.ok}}"></div>
|
|
169
|
+
<div class="segment-piece warning" style="width: {{trend_data.complexity_segments_current.warning_percent}}%" data-count="{{trend_data.complexity_segments_current.warning}}"></div>
|
|
170
|
+
<div class="segment-piece critical" style="width: {{trend_data.complexity_segments_current.critical_percent}}%" data-count="{{trend_data.complexity_segments_current.critical}}"></div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
<div class="segment-legend">
|
|
175
|
+
<div class="legend-item">
|
|
176
|
+
<span class="legend-dot good"></span>
|
|
177
|
+
<div class="legend-info">
|
|
178
|
+
<span class="legend-label">Simple</span>
|
|
179
|
+
<span class="legend-values">{{trend_data.complexity_segments_prev.good}} → {{trend_data.complexity_segments_current.good}}</span>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
<div class="legend-item">
|
|
183
|
+
<span class="legend-dot okay"></span>
|
|
184
|
+
<div class="legend-info">
|
|
185
|
+
<span class="legend-label">Moderate</span>
|
|
186
|
+
<span class="legend-values">{{trend_data.complexity_segments_prev.ok}} → {{trend_data.complexity_segments_current.ok}}</span>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<div class="legend-item">
|
|
190
|
+
<span class="legend-dot warning"></span>
|
|
191
|
+
<div class="legend-info">
|
|
192
|
+
<span class="legend-label">Complex</span>
|
|
193
|
+
<span class="legend-values">{{trend_data.complexity_segments_prev.warning}} → {{trend_data.complexity_segments_current.warning}}</span>
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
<div class="legend-item">
|
|
197
|
+
<span class="legend-dot critical"></span>
|
|
198
|
+
<div class="legend-info">
|
|
199
|
+
<span class="legend-label">Very Complex</span>
|
|
200
|
+
<span class="legend-values">{{trend_data.complexity_segments_prev.critical}} → {{trend_data.complexity_segments_current.critical}}</span>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<!-- Maintainability Segment -->
|
|
207
|
+
<div class="health-card">
|
|
208
|
+
<div class="health-card-header">
|
|
209
|
+
<h3>Maintainability</h3>
|
|
210
|
+
<span class="time-label">Previous → Current</span>
|
|
211
|
+
</div>
|
|
212
|
+
<div class="segment-comparison">
|
|
213
|
+
<div class="comparison-row">
|
|
214
|
+
<span class="row-label">Previous</span>
|
|
215
|
+
<div class="segment-bar-horizontal">
|
|
216
|
+
<div class="segment-piece good" style="width: {{trend_data.maintainability_segments_prev.good_percent}}%" data-count="{{trend_data.maintainability_segments_prev.good}}"></div>
|
|
217
|
+
<div class="segment-piece okay" style="width: {{trend_data.maintainability_segments_prev.ok_percent}}%" data-count="{{trend_data.maintainability_segments_prev.ok}}"></div>
|
|
218
|
+
<div class="segment-piece warning" style="width: {{trend_data.maintainability_segments_prev.warning_percent}}%" data-count="{{trend_data.maintainability_segments_prev.warning}}"></div>
|
|
219
|
+
<div class="segment-piece critical" style="width: {{trend_data.maintainability_segments_prev.critical_percent}}%" data-count="{{trend_data.maintainability_segments_prev.critical}}"></div>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
<div class="comparison-row">
|
|
223
|
+
<span class="row-label">Current</span>
|
|
224
|
+
<div class="segment-bar-horizontal">
|
|
225
|
+
<div class="segment-piece good" style="width: {{trend_data.maintainability_segments_current.good_percent}}%" data-count="{{trend_data.maintainability_segments_current.good}}"></div>
|
|
226
|
+
<div class="segment-piece okay" style="width: {{trend_data.maintainability_segments_current.ok_percent}}%" data-count="{{trend_data.maintainability_segments_current.ok}}"></div>
|
|
227
|
+
<div class="segment-piece warning" style="width: {{trend_data.maintainability_segments_current.warning_percent}}%" data-count="{{trend_data.maintainability_segments_current.warning}}"></div>
|
|
228
|
+
<div class="segment-piece critical" style="width: {{trend_data.maintainability_segments_current.critical_percent}}%" data-count="{{trend_data.maintainability_segments_current.critical}}"></div>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="segment-legend">
|
|
233
|
+
<div class="legend-item">
|
|
234
|
+
<span class="legend-dot good"></span>
|
|
235
|
+
<div class="legend-info">
|
|
236
|
+
<span class="legend-label">Excellent</span>
|
|
237
|
+
<span class="legend-values">{{trend_data.maintainability_segments_prev.good}} → {{trend_data.maintainability_segments_current.good}}</span>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="legend-item">
|
|
241
|
+
<span class="legend-dot okay"></span>
|
|
242
|
+
<div class="legend-info">
|
|
243
|
+
<span class="legend-label">Good</span>
|
|
244
|
+
<span class="legend-values">{{trend_data.maintainability_segments_prev.ok}} → {{trend_data.maintainability_segments_current.ok}}</span>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
<div class="legend-item">
|
|
248
|
+
<span class="legend-dot warning"></span>
|
|
249
|
+
<div class="legend-info">
|
|
250
|
+
<span class="legend-label">Fair</span>
|
|
251
|
+
<span class="legend-values">{{trend_data.maintainability_segments_prev.warning}} → {{trend_data.maintainability_segments_current.warning}}</span>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
<div class="legend-item">
|
|
255
|
+
<span class="legend-dot critical"></span>
|
|
256
|
+
<div class="legend-info">
|
|
257
|
+
<span class="legend-label">Poor</span>
|
|
258
|
+
<span class="legend-values">{{trend_data.maintainability_segments_prev.critical}} → {{trend_data.maintainability_segments_current.critical}}</span>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
<!-- Method Size Segment -->
|
|
265
|
+
<div class="health-card">
|
|
266
|
+
<div class="health-card-header">
|
|
267
|
+
<h3>Avg. Method Size</h3>
|
|
268
|
+
<span class="time-label">Previous → Current</span>
|
|
269
|
+
</div>
|
|
270
|
+
<div class="segment-comparison">
|
|
271
|
+
<div class="comparison-row">
|
|
272
|
+
<span class="row-label">Previous</span>
|
|
273
|
+
<div class="segment-bar-horizontal">
|
|
274
|
+
<div class="segment-piece good" style="width: {{trend_data.method_size_segments_prev.good_percent}}%" data-count="{{trend_data.method_size_segments_prev.good}}"></div>
|
|
275
|
+
<div class="segment-piece okay" style="width: {{trend_data.method_size_segments_prev.ok_percent}}%" data-count="{{trend_data.method_size_segments_prev.ok}}"></div>
|
|
276
|
+
<div class="segment-piece warning" style="width: {{trend_data.method_size_segments_prev.warning_percent}}%" data-count="{{trend_data.method_size_segments_prev.warning}}"></div>
|
|
277
|
+
<div class="segment-piece critical" style="width: {{trend_data.method_size_segments_prev.critical_percent}}%" data-count="{{trend_data.method_size_segments_prev.critical}}"></div>
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
<div class="comparison-row">
|
|
281
|
+
<span class="row-label">Current</span>
|
|
282
|
+
<div class="segment-bar-horizontal">
|
|
283
|
+
<div class="segment-piece good" style="width: {{trend_data.method_size_segments_current.good_percent}}%" data-count="{{trend_data.method_size_segments_current.good}}"></div>
|
|
284
|
+
<div class="segment-piece okay" style="width: {{trend_data.method_size_segments_current.ok_percent}}%" data-count="{{trend_data.method_size_segments_current.ok}}"></div>
|
|
285
|
+
<div class="segment-piece warning" style="width: {{trend_data.method_size_segments_current.warning_percent}}%" data-count="{{trend_data.method_size_segments_current.warning}}"></div>
|
|
286
|
+
<div class="segment-piece critical" style="width: {{trend_data.method_size_segments_current.critical_percent}}%" data-count="{{trend_data.method_size_segments_current.critical}}"></div>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
<div class="segment-legend">
|
|
291
|
+
<div class="legend-item">
|
|
292
|
+
<span class="legend-dot good"></span>
|
|
293
|
+
<div class="legend-info">
|
|
294
|
+
<span class="legend-label">Concise</span>
|
|
295
|
+
<span class="legend-values">{{trend_data.method_size_segments_prev.good}} → {{trend_data.method_size_segments_current.good}}</span>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
<div class="legend-item">
|
|
299
|
+
<span class="legend-dot okay"></span>
|
|
300
|
+
<div class="legend-info">
|
|
301
|
+
<span class="legend-label">Optimal</span>
|
|
302
|
+
<span class="legend-values">{{trend_data.method_size_segments_prev.ok}} → {{trend_data.method_size_segments_current.ok}}</span>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
<div class="legend-item">
|
|
306
|
+
<span class="legend-dot warning"></span>
|
|
307
|
+
<div class="legend-info">
|
|
308
|
+
<span class="legend-label">Large</span>
|
|
309
|
+
<span class="legend-values">{{trend_data.method_size_segments_prev.warning}} → {{trend_data.method_size_segments_current.warning}}</span>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
<div class="legend-item">
|
|
313
|
+
<span class="legend-dot critical"></span>
|
|
314
|
+
<div class="legend-info">
|
|
315
|
+
<span class="legend-label">Too Large</span>
|
|
316
|
+
<span class="legend-values">{{trend_data.method_size_segments_prev.critical}} → {{trend_data.method_size_segments_current.critical}}</span>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
</section>
|
|
323
|
+
|
|
324
|
+
<!-- Top Improved Files -->
|
|
325
|
+
<section class="trends-section">
|
|
326
|
+
<div class="section-header">
|
|
327
|
+
<h2><i class="fas fa-arrow-up"></i> Top Improved Files</h2>
|
|
328
|
+
<p>Files that showed the most improvement</p>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<div class="improvement-grid">
|
|
332
|
+
<!-- Improved Complexity -->
|
|
333
|
+
<div class="trend-card">
|
|
334
|
+
<div class="trend-card-header improved">
|
|
335
|
+
<i class="fas fa-award"></i>
|
|
336
|
+
<h3>Complexity Reduced</h3>
|
|
337
|
+
</div>
|
|
338
|
+
<div class="trend-list">
|
|
339
|
+
{{#EACH trend_data.top_improved_complexity AS file}}
|
|
340
|
+
<div class="trend-item">
|
|
341
|
+
<div class="trend-item-header">
|
|
342
|
+
<span class="file-name">{{file.name}}</span>
|
|
343
|
+
<span class="trend-delta positive">
|
|
344
|
+
<i class="fas fa-arrow-down"></i>
|
|
345
|
+
<span class="delta-value">{{file.complexity_delta}}</span>
|
|
346
|
+
</span>
|
|
347
|
+
</div>
|
|
348
|
+
<div class="trend-item-details">
|
|
349
|
+
<span class="prev-value">{{file.complexity_prev}}</span>
|
|
350
|
+
<i class="fas fa-arrow-right"></i>
|
|
351
|
+
<span class="curr-value">{{file.complexity_current}}</span>
|
|
352
|
+
</div>
|
|
353
|
+
</div>
|
|
354
|
+
{{/EACH}}
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
<!-- Improved Maintainability -->
|
|
359
|
+
<div class="trend-card">
|
|
360
|
+
<div class="trend-card-header improved">
|
|
361
|
+
<i class="fas fa-star"></i>
|
|
362
|
+
<h3>Maintainability Improved</h3>
|
|
363
|
+
</div>
|
|
364
|
+
<div class="trend-list">
|
|
365
|
+
{{#EACH trend_data.top_improved_maintainability AS file}}
|
|
366
|
+
<div class="trend-item">
|
|
367
|
+
<div class="trend-item-header">
|
|
368
|
+
<span class="file-name">{{file.name}}</span>
|
|
369
|
+
<span class="trend-delta positive">
|
|
370
|
+
<i class="fas fa-arrow-up"></i>
|
|
371
|
+
<span class="delta-value">{{file.maintainability_delta}}</span>
|
|
372
|
+
</span>
|
|
373
|
+
</div>
|
|
374
|
+
<div class="trend-item-details">
|
|
375
|
+
<span class="prev-value">{{file.maintainability_prev}}</span>
|
|
376
|
+
<i class="fas fa-arrow-right"></i>
|
|
377
|
+
<span class="curr-value">{{file.maintainability_current}}</span>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
{{/EACH}}
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
</section>
|
|
385
|
+
|
|
386
|
+
<!-- Top Worsened Files -->
|
|
387
|
+
<section class="trends-section">
|
|
388
|
+
<div class="section-header">
|
|
389
|
+
<h2><i class="fas fa-arrow-down"></i> Files Needing Attention</h2>
|
|
390
|
+
<p>Files that have regressed and need improvement</p>
|
|
391
|
+
</div>
|
|
392
|
+
|
|
393
|
+
<div class="improvement-grid">
|
|
394
|
+
<!-- Worsened Complexity -->
|
|
395
|
+
<div class="trend-card">
|
|
396
|
+
<div class="trend-card-header worsened">
|
|
397
|
+
<i class="fas fa-exclamation-triangle"></i>
|
|
398
|
+
<h3>Complexity Increased</h3>
|
|
399
|
+
</div>
|
|
400
|
+
<div class="trend-list">
|
|
401
|
+
{{#EACH trend_data.top_worsened_complexity AS file}}
|
|
402
|
+
<div class="trend-item">
|
|
403
|
+
<div class="trend-item-header">
|
|
404
|
+
<span class="file-name">{{file.name}}</span>
|
|
405
|
+
<span class="trend-delta negative">
|
|
406
|
+
<i class="fas fa-arrow-up"></i>
|
|
407
|
+
<span class="delta-value">{{file.complexity_delta}}</span>
|
|
408
|
+
</span>
|
|
409
|
+
</div>
|
|
410
|
+
<div class="trend-item-details">
|
|
411
|
+
<span class="prev-value">{{file.complexity_prev}}</span>
|
|
412
|
+
<i class="fas fa-arrow-right"></i>
|
|
413
|
+
<span class="curr-value">{{file.complexity_current}}</span>
|
|
414
|
+
</div>
|
|
415
|
+
</div>
|
|
416
|
+
{{/EACH}}
|
|
417
|
+
</div>
|
|
418
|
+
</div>
|
|
419
|
+
|
|
420
|
+
<!-- Worsened Maintainability -->
|
|
421
|
+
<div class="trend-card">
|
|
422
|
+
<div class="trend-card-header worsened">
|
|
423
|
+
<i class="fas fa-warning"></i>
|
|
424
|
+
<h3>Maintainability Decreased</h3>
|
|
425
|
+
</div>
|
|
426
|
+
<div class="trend-list">
|
|
427
|
+
{{#EACH trend_data.top_worsened_maintainability AS file}}
|
|
428
|
+
<div class="trend-item">
|
|
429
|
+
<div class="trend-item-header">
|
|
430
|
+
<span class="file-name">{{file.name}}</span>
|
|
431
|
+
<span class="trend-delta negative">
|
|
432
|
+
<i class="fas fa-arrow-down"></i>
|
|
433
|
+
<span class="delta-value">{{file.maintainability_delta}}</span>
|
|
434
|
+
</span>
|
|
435
|
+
</div>
|
|
436
|
+
<div class="trend-item-details">
|
|
437
|
+
<span class="prev-value">{{file.maintainability_prev}}</span>
|
|
438
|
+
<i class="fas fa-arrow-right"></i>
|
|
439
|
+
<span class="curr-value">{{file.maintainability_current}}</span>
|
|
440
|
+
</div>
|
|
441
|
+
</div>
|
|
442
|
+
{{/EACH}}
|
|
443
|
+
</div>
|
|
444
|
+
</div>
|
|
445
|
+
</div>
|
|
446
|
+
</section>
|
|
447
|
+
|
|
448
|
+
<!-- No Trend Data State -->
|
|
449
|
+
{{#ELSE}}
|
|
450
|
+
<div class="empty-state">
|
|
451
|
+
<i class="fas fa-chart-line"></i>
|
|
452
|
+
<h3>No Trend Data Available</h3>
|
|
453
|
+
<p>Run analysis at least twice to see trends and compare changes over time.</p>
|
|
454
|
+
</div>
|
|
455
|
+
{{/IF}}
|
|
456
|
+
|
|
457
|
+
</main>
|
|
458
|
+
</div>
|
|
459
|
+
|
|
460
|
+
<!-- Scripts -->
|
|
461
|
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
462
|
+
<script>
|
|
463
|
+
// Embed data directly from template engine
|
|
464
|
+
window.TREND_DATA = {{trend_data_json}};
|
|
465
|
+
</script>
|
|
466
|
+
</body>
|
|
467
|
+
</html>
|
|
468
|
+
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metripy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: A Python tool to generate multi project, multi language code metric reports
|
|
5
5
|
Author-email: Yannick Zimmermann <yannick.zimmermann@proton.me>
|
|
6
6
|
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://
|
|
8
|
-
Project-URL: Repository, https://github.com/zimmer-yan/
|
|
9
|
-
Project-URL: Documentation, https://
|
|
10
|
-
Project-URL: Bug Tracker, https://github.com/zimmer-yan/
|
|
7
|
+
Project-URL: Homepage, https://zimmer-yan.github.io/metripy/
|
|
8
|
+
Project-URL: Repository, https://github.com/zimmer-yan/metripy
|
|
9
|
+
Project-URL: Documentation, https://zimmer-yan.github.io/metripy/
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/zimmer-yan/metripy/issues
|
|
11
11
|
Keywords: code metrics,multi-language,code analysis,git metrics,code visualization,software quality,static analysis,repository insights,developer productivity,codebase health,technical debt,language-agnostic
|
|
12
12
|
Classifier: Development Status :: 3 - Alpha
|
|
13
13
|
Classifier: Intended Audience :: Developers
|
|
@@ -19,13 +19,14 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: lizard==1.18.0
|
|
21
21
|
Requires-Dist: GitPython==3.1.45
|
|
22
|
-
Requires-Dist: py-template-engine>=0.
|
|
22
|
+
Requires-Dist: py-template-engine>=0.2.6
|
|
23
23
|
Requires-Dist: radon==6.0.1
|
|
24
24
|
Requires-Dist: requests==2.32.5
|
|
25
25
|
Requires-Dist: packaging==25.0
|
|
26
26
|
Requires-Dist: toml==0.10.2
|
|
27
27
|
Requires-Dist: tree-sitter==0.21.3
|
|
28
28
|
Requires-Dist: tree-sitter-languages==1.10.2
|
|
29
|
+
Requires-Dist: PyYAML==6.0.3
|
|
29
30
|
Provides-Extra: dev
|
|
30
31
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
31
32
|
Requires-Dist: pytest-cov==7.0.0; extra == "dev"
|
|
@@ -37,7 +38,7 @@ Requires-Dist: poethepoet==0.37.0; extra == "dev"
|
|
|
37
38
|
Requires-Dist: isort==7.0.0; extra == "dev"
|
|
38
39
|
Dynamic: license-file
|
|
39
40
|
|
|
40
|
-
#
|
|
41
|
+
# Metripy
|
|
41
42
|
A multilanguage, multi project code metrics analysis tool.
|
|
42
43
|
|
|
43
44
|
# Languages
|
|
@@ -102,8 +103,8 @@ Sample configuraiton:
|
|
|
102
103
|
"pip": true,
|
|
103
104
|
// looks for base_path/requirements.txt or base_path/pyproject.toml and analyzes dependencies - for python projects
|
|
104
105
|
"reports": {
|
|
105
|
-
"html": "./build/report/
|
|
106
|
-
"json-git": "./build/json-report/
|
|
106
|
+
"html": "./build/report/metripy", // report should be put into this directory
|
|
107
|
+
"json-git": "./build/json-report/metripy-git.json" // file where to put git json report
|
|
107
108
|
// more types of reports TBA
|
|
108
109
|
}
|
|
109
110
|
},
|
|
@@ -111,3 +112,20 @@ Sample configuraiton:
|
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
```
|
|
115
|
+
|
|
116
|
+
## Configuration for only git stats
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"configs": {
|
|
120
|
+
"metripy-git": {
|
|
121
|
+
"base_path": "./",
|
|
122
|
+
"git": {
|
|
123
|
+
"branch": "main"
|
|
124
|
+
},
|
|
125
|
+
"reports": {
|
|
126
|
+
"json-git": "./build/json-report/metripy-git.json"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|