Skip to content

Commit a714c81

Browse files
Fixed description for both pages
1 parent c5b186e commit a714c81

3 files changed

Lines changed: 66 additions & 56 deletions

File tree

docs/ground_truth/comparison.html

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>RsMetaCheck &mdash; 0.3.0 vs 0.3.2 Comparison</title>
6+
<title>RsMetaCheck &mdash; 0.3.0 vs 0.3.1 Comparison</title>
77
<style>
88
body {
99
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
@@ -94,7 +94,7 @@
9494
.cell-only-030 {
9595
background-color: #ffebee !important;
9696
}
97-
.cell-only-032 {
97+
.cell-only-031 {
9898
background-color: #e8f5e9 !important;
9999
}
100100
.cell-missing {
@@ -140,7 +140,14 @@
140140
<a href="index.html">&larr; Ground Truth Report</a>
141141
</div>
142142

143-
<h1>0.3.0 vs 0.3.2 &mdash; Comparison</h1>
143+
<h1>0.3.0 vs 0.3.1 &mdash; Comparison</h1>
144+
145+
<p style="text-align: center; color: #555; font-size: 0.95em; line-height: 1.5; max-width: 800px; margin: 0 auto 20px auto;">
146+
This page compares the detection results of RsMetaCheck version 0.3.0 and
147+
version 0.3.1 on the ground truth dataset, highlighting improvements and
148+
corrections in pitfall and warning detection across the 85 openAIRE
149+
repositories.
150+
</p>
144151

145152
<p id="summary-text" style="text-align: center; color: #444; font-size: 1.05em; line-height: 1.4;"></p>
146153

@@ -159,16 +166,16 @@ <h3>Warnings (W001&ndash;W010)</h3>
159166
</div>
160167

161168
<hr class="section-divider">
162-
<h2>0.3.2 Pitfall &amp; Warning Distribution</h2>
169+
<h2>0.3.1 Pitfall &amp; Warning Distribution</h2>
163170

164171
<div class="charts-row">
165172
<div class="chart-box">
166173
<h3>Pitfalls (P001&ndash;P019)</h3>
167-
<canvas id="pitfallsChart032"></canvas>
174+
<canvas id="pitfallsChart031"></canvas>
168175
</div>
169176
<div class="chart-box">
170177
<h3>Warnings (W001&ndash;W010)</h3>
171-
<canvas id="warningsChart032"></canvas>
178+
<canvas id="warningsChart031"></canvas>
172179
</div>
173180
</div>
174181

@@ -197,8 +204,8 @@ <h2>Repository-Level Comparison</h2>
197204
<th>Code</th>
198205
<th>0.3.0 Source</th>
199206
<th>0.3.0 Description</th>
200-
<th>0.3.2 Source</th>
201-
<th>0.3.2 Description</th>
207+
<th>0.3.1 Source</th>
208+
<th>0.3.1 Description</th>
202209
</tr>
203210
</thead>
204211
</table>
@@ -212,25 +219,22 @@ <h2>Repository-Level Comparison</h2>
212219
Promise.all([
213220
fetch('summary_pitfalls_warnings.json').then(r => r.json()),
214221
fetch('summary_0_3_0.json').then(r => r.json()),
215-
fetch('summary_0_3_2.json').then(r => r.json())
222+
fetch('summary_0_3_1.json').then(r => r.json())
216223
])
217-
.then(([gtData, data030, data032]) => {
224+
.then(([gtData, data030, data031]) => {
218225
const gtNames = new Set();
219226
for (const entry of Object.values(gtData)) {
220227
const url = (entry.url || '').replace(/\/$/, "").split("/");
221228
if (url.length >= 2) gtNames.add(url.slice(-2).join("/"));
222229
}
223230
const allThree = new Set(
224-
[...gtNames].filter(r => data030[r] && data032[r])
231+
[...gtNames].filter(r => data030[r] && data031[r])
225232
);
226233

227-
document.getElementById('summary-text').textContent =
228-
`${allThree.size} repositories present across all three datasets (ground truth, 0.3.0, 0.3.2)`;
229-
230234
buildCharts(data030, '030');
231-
buildCharts(data032, '032');
232-
buildGroupedCharts(data030, data032);
233-
buildComparisonTable(cmpTable, data030, data032, allThree);
235+
buildCharts(data031, '031');
236+
buildGroupedCharts(data030, data031);
237+
buildComparisonTable(cmpTable, data030, data031, allThree);
234238
})
235239
.catch(err => {
236240
console.error('Failed to load data:', err);
@@ -323,10 +327,10 @@ <h2>Repository-Level Comparison</h2>
323327
});
324328
}
325329

326-
function buildGroupedCharts(data030, data032) {
330+
function buildGroupedCharts(data030, data031) {
327331
const allPitfallCodes = new Set();
328332
const allWarningCodes = new Set();
329-
const p030 = {}, p032 = {}, w030 = {}, w032 = {};
333+
const p030 = {}, p031 = {}, w030 = {}, w031 = {};
330334

331335
for (const repoName of Object.keys(data030)) {
332336
const repo = data030[repoName];
@@ -339,15 +343,15 @@ <h2>Repository-Level Comparison</h2>
339343
w030[code] = (w030[code] || 0) + 1;
340344
}
341345
}
342-
for (const repoName of Object.keys(data032)) {
343-
const repo = data032[repoName];
346+
for (const repoName of Object.keys(data031)) {
347+
const repo = data031[repoName];
344348
for (const code of Object.keys(repo.pitfalls || {})) {
345349
allPitfallCodes.add(code);
346-
p032[code] = (p032[code] || 0) + 1;
350+
p031[code] = (p031[code] || 0) + 1;
347351
}
348352
for (const code of Object.keys(repo.warnings || {})) {
349353
allWarningCodes.add(code);
350-
w032[code] = (w032[code] || 0) + 1;
354+
w031[code] = (w031[code] || 0) + 1;
351355
}
352356
}
353357

@@ -367,8 +371,8 @@ <h2>Repository-Level Comparison</h2>
367371
borderWidth: 1
368372
},
369373
{
370-
label: '0.3.2',
371-
data: sortedPitfalls.map(c => p032[c] || 0),
374+
label: '0.3.1',
375+
data: sortedPitfalls.map(c => p031[c] || 0),
372376
backgroundColor: 'rgba(46, 134, 193, 0.75)',
373377
borderColor: '#2980b9',
374378
borderWidth: 1
@@ -409,8 +413,8 @@ <h2>Repository-Level Comparison</h2>
409413
borderWidth: 1
410414
},
411415
{
412-
label: '0.3.2',
413-
data: sortedWarnings.map(c => w032[c] || 0),
416+
label: '0.3.1',
417+
data: sortedWarnings.map(c => w031[c] || 0),
414418
backgroundColor: 'rgba(39, 174, 96, 0.75)',
415419
borderColor: '#27ae60',
416420
borderWidth: 1
@@ -439,21 +443,21 @@ <h2>Repository-Level Comparison</h2>
439443
});
440444
}
441445

442-
function buildComparisonTable(table, data030, data032, allThree) {
446+
function buildComparisonTable(table, data030, data031, allThree) {
443447
for (const repoName of Object.keys(data030).sort()) {
444448
const r030 = data030[repoName];
445-
const r032 = data032[repoName];
446-
if (!r032) continue;
449+
const r031 = data031[repoName];
450+
if (!r031) continue;
447451
if (!allThree.has(repoName)) continue;
448452

449453
const codes030 = Object.assign(
450454
{}, r030.pitfalls || {}, r030.warnings || {}
451455
);
452-
const codes032 = Object.assign(
453-
{}, r032.pitfalls || {}, r032.warnings || {}
456+
const codes031 = Object.assign(
457+
{}, r031.pitfalls || {}, r031.warnings || {}
454458
);
455459
const allCodes = Array.from(
456-
new Set([...Object.keys(codes030), ...Object.keys(codes032)])
460+
new Set([...Object.keys(codes030), ...Object.keys(codes031)])
457461
).sort((a, b) => {
458462
const ta = a.startsWith('P') ? 0 : 1;
459463
const tb = b.startsWith('P') ? 0 : 1;
@@ -464,13 +468,13 @@ <h2>Repository-Level Comparison</h2>
464468
if (allCodes.length === 0) continue;
465469

466470
const tbody = document.createElement('tbody');
467-
const url = r030.url || r032.url;
471+
const url = r030.url || r031.url;
468472

469473
allCodes.forEach((code, i) => {
470474
const entry030 = codes030[code];
471-
const entry032 = codes032[code];
472-
const only030 = entry030 && !entry032;
473-
const only032 = entry032 && !entry030;
475+
const entry031 = codes031[code];
476+
const only030 = entry030 && !entry031;
477+
const only031 = entry031 && !entry030;
474478
const type = code.startsWith('P') ? 'p' : 'w';
475479

476480
const tr = document.createElement('tr');
@@ -497,8 +501,8 @@ <h2>Repository-Level Comparison</h2>
497501
const cellDefs = [
498502
{ data: entry030, key: 'source_file', ver: only030 ? '030' : '' },
499503
{ data: entry030, key: 'description', ver: only030 ? '030' : '' },
500-
{ data: entry032, key: 'source_file', ver: only032 ? '032' : '' },
501-
{ data: entry032, key: 'description', ver: only032 ? '032' : '' }
504+
{ data: entry031, key: 'source_file', ver: only031 ? '031' : '' },
505+
{ data: entry031, key: 'description', ver: only031 ? '031' : '' }
502506
];
503507

504508
for (const { data, key, ver } of cellDefs) {
@@ -510,7 +514,7 @@ <h2>Repository-Level Comparison</h2>
510514
td.classList.add('cell-missing');
511515
}
512516
if (ver === '030') td.classList.add('cell-only-030');
513-
if (ver === '032') td.classList.add('cell-only-032');
517+
if (ver === '031') td.classList.add('cell-only-031');
514518
tr.appendChild(td);
515519
}
516520

docs/ground_truth/index.html

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,20 @@
121121
<body>
122122

123123
<div class="nav">
124-
<a href="comparison.html">0.3.0 vs 0.3.2 Comparison &rarr;</a>
124+
<a href="comparison.html">0.3.0 vs 0.3.1 Comparison &rarr;</a>
125125
</div>
126126

127127
<h1>Ground Truth Report</h1>
128128

129+
<p style="text-align: center; color: #555; font-size: 0.95em; line-height: 1.5; max-width: 800px; margin: 0 auto 20px auto;">
130+
This ground truth study evaluated 84 software repositories from the openAIRE graph.
131+
All repositories contain a <code>codemeta.json</code> file and were examined across
132+
multiple metadata sources including package manifests (e.g., <code>setup.py</code>,
133+
<code>package.json</code>, <code>DESCRIPTION</code>), citation files
134+
(<code>CITATION.cff</code>), licensing files, README documentation, and other
135+
structured or semi-structured metadata artifacts.
136+
</p>
137+
129138
<p id="summary-text" style="text-align: center; color: #444; font-size: 1.05em; line-height: 1.4;"></p>
130139

131140
<div class="table-container">
@@ -149,47 +158,44 @@ <h1>Ground Truth Report</h1>
149158
Promise.all([
150159
fetch('summary_pitfalls_warnings.json').then(r => r.json()),
151160
fetch('summary_0_3_0.json').then(r => r.json()),
152-
fetch('summary_0_3_2.json').then(r => r.json())
161+
fetch('summary_0_3_1.json').then(r => r.json())
153162
])
154-
.then(([gtData, data030, data032]) => {
163+
.then(([gtData, data030, data031]) => {
155164
const gtNames = new Set();
156165
for (const entry of Object.values(gtData)) {
157166
const url = (entry.url || '').replace(/\/$/, "").split("/");
158167
if (url.length >= 2) gtNames.add(url.slice(-2).join("/"));
159168
}
160169
const allThree = new Set(
161-
[...gtNames].filter(r => data030[r] && data032[r])
170+
[...gtNames].filter(r => data030[r] && data031[r])
162171
);
163172

164-
document.getElementById('summary-text').textContent =
165-
`${allThree.size} repositories present across all three datasets (ground truth, 0.3.0, 0.3.2)`;
166-
167-
buildGroundTruthTable(gtTable, gtData, data030, data032, allThree);
173+
buildGroundTruthTable(gtTable, gtData, data030, data031, allThree);
168174
})
169175
.catch(err => {
170176
console.error('Failed to load data:', err);
171177
gtTable.innerHTML += '<tbody><tr><td colspan="5" style="text-align:center;color:red;">Error loading data.</td></tr></tbody>';
172178
});
173179
});
174180

175-
function buildGroundTruthTable(table, gtData, data030, data032, allThree) {
181+
function buildGroundTruthTable(table, gtData, data030, data031, allThree) {
176182
for (const [repoId, repoData] of Object.entries(gtData)) {
177183
const url = repoData.url || 'Unknown URL';
178184
const repoName = url.replace(/\/$/, "").split("/").slice(-2).join("/");
179185

180186
if (!allThree.has(repoName)) continue;
181187

182188
const r030 = data030[repoName] || {};
183-
const r032 = data032[repoName] || {};
189+
const r031 = data031[repoName] || {};
184190

185191
const matchedPitfalls = {};
186192
for (const [code, info] of Object.entries(repoData.pitfalls || {})) {
187-
const r032Code = r032.pitfalls && r032.pitfalls[code];
193+
const r031Code = r031.pitfalls && r031.pitfalls[code];
188194
const r030Code = r030.pitfalls && r030.pitfalls[code];
189-
if (r032Code || r030Code) {
195+
if (r031Code || r030Code) {
190196
const gtInfo = { source_file: info.source_file, description: info.description };
191197
if (gtInfo.source_file === 'Metadata files (codemeta.json, setup.py, pom.xml etc...)') {
192-
const resCode = r032Code || r030Code;
198+
const resCode = r031Code || r030Code;
193199
if (resCode && resCode.source_file) {
194200
gtInfo.source_file = resCode.source_file;
195201
}
@@ -201,12 +207,12 @@ <h1>Ground Truth Report</h1>
201207
const matchedWarnings = {};
202208
for (const [code, info] of Object.entries(repoData.warnings || {})) {
203209
if (code === 'W003') continue;
204-
const r032Code = r032.warnings && r032.warnings[code];
210+
const r031Code = r031.warnings && r031.warnings[code];
205211
const r030Code = r030.warnings && r030.warnings[code];
206-
if (r032Code || r030Code) {
212+
if (r031Code || r030Code) {
207213
const gtInfo = { source_file: info.source_file, description: info.description };
208214
if (gtInfo.source_file === 'Metadata files (codemeta.json, setup.py, pom.xml etc...)') {
209-
const resCode = r032Code || r030Code;
215+
const resCode = r031Code || r030Code;
210216
if (resCode && resCode.source_file) {
211217
gtInfo.source_file = resCode.source_file;
212218
}

0 commit comments

Comments
 (0)