Skip to content

Commit 28af919

Browse files
Merge pull request #109 from SoftwareUnderstanding/dev
Restructure docs test: landing page as index, catalog moved, ground truth nav fix
2 parents f856539 + 4d525fb commit 28af919

9 files changed

Lines changed: 299 additions & 273 deletions

File tree

‎.gitignore‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,7 @@ uv.lock
136136
.python-version
137137

138138
# Testing directory thats named results_XXX, for example results_widoco since this is for testing purposes
139-
results_*/
139+
results_*/
140+
141+
# Backup directory
142+
BACKUP/

‎docs/catalog.html‎

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>RsMetaCheck Catalog</title>
6+
7+
<!-- DataTables CSS -->
8+
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
9+
10+
<!-- jQuery -->
11+
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
12+
13+
<!-- DataTables JS -->
14+
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
15+
16+
<style>
17+
body {
18+
font-family: Arial, sans-serif;
19+
padding: 2em;
20+
background: #f9f9f9;
21+
}
22+
h1 {
23+
color: #333;
24+
text-align: center;
25+
margin-bottom: 1em;
26+
}
27+
.intro {
28+
text-align: center;
29+
margin-bottom: 2em;
30+
color: #555;
31+
font-size: 1.3em;
32+
line-height: 1.2;
33+
max-width: 1400px;
34+
margin-left: auto;
35+
margin-right: auto;
36+
}
37+
.table-container {
38+
background: white;
39+
padding: 20px;
40+
border-radius: 8px;
41+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
42+
}
43+
#myTable {
44+
width: 100%;
45+
}
46+
.dataTables_wrapper {
47+
margin-top: 20px;
48+
}
49+
</style>
50+
</head>
51+
<body>
52+
53+
<h1>Metadata Pitfalls & Warnings Catalog</h1>
54+
55+
<div class="intro">
56+
<p>
57+
This is a catalog of the pitfalls and warnings we have come across during our research on software metadata quality.
58+
Based on these findings, we at <a href="https://oeg.fi.upm.es/" target="_blank">Ontology Engineering Group (OEG)</a>
59+
have developed our tool <strong><a href="https://github.com/SoftwareUnderstanding/RsMetaCheck" target="_blank">RSMetaCheck</a></strong> to automatically diagnose and identify these common issues in software metadata files.
60+
Warnings do not have a severity level because originally they were opted due to their low severity and classified as "Warnings" instead of "Pitfalls"
61+
</p>
62+
</div>
63+
64+
<!-- TABLE -->
65+
<div class="table-container">
66+
<table id="myTable" class="display">
67+
<thead>
68+
<tr>
69+
<th>Identifier</th>
70+
<th>Source</th>
71+
<th>Pitfall</th>
72+
<th>Description</th>
73+
<th>Suggestion</th>
74+
<th>Examples</th>
75+
<th>Importance</th>
76+
</tr>
77+
</thead>
78+
<tbody>
79+
80+
</tbody>
81+
</table>
82+
</div>
83+
84+
<script>
85+
function loadTableData() {
86+
const timestamp = new Date().getTime();
87+
fetch(`catalog.md?v=${timestamp}`)
88+
.then(response => response.text())
89+
.then(markdown => {
90+
const lines = markdown.trim().split('\n');
91+
const tableBody = $('#myTable tbody');
92+
93+
for (let i = 2; i < lines.length; i++) {
94+
const line = lines[i].trim();
95+
if (line.startsWith('|') && line.endsWith('|')) {
96+
const cells = line.split('|').slice(1, -1).map(cell => cell.trim());
97+
if (cells.length >= 7) {
98+
const [identifier, source, pitfall, description, suggestion, examples, importance] = cells;
99+
100+
let exampleCell = examples;
101+
if (examples.startsWith('http')) {
102+
exampleCell = `<a href="${examples}" target="_blank">${examples}</a>`;
103+
}
104+
105+
const row = `<tr id="${identifier}">
106+
<td><a href="https://w3id.org/rsmetacheck/catalog/#${identifier}" target="_blank">${identifier}</a></td>
107+
<td>${source}</td>
108+
<td>${pitfall}</td>
109+
<td>${description}</td>
110+
<td>${suggestion}</td>
111+
<td>${exampleCell}</td>
112+
<td>${importance}</td>
113+
</tr>`;
114+
tableBody.append(row);
115+
}
116+
}
117+
}
118+
119+
const table = $('#myTable').DataTable({
120+
pageLength: 25,
121+
order: [[0, 'asc']],
122+
initComplete: function(settings, json) {
123+
if (window.location.hash) {
124+
const targetId = window.location.hash;
125+
const api = this.api();
126+
127+
const rowIndex = api.row(targetId).index();
128+
129+
if (rowIndex !== undefined) {
130+
const pageInfo = api.page.info();
131+
const targetPage = Math.floor(rowIndex / pageInfo.length);
132+
api.page(targetPage).draw(false);
133+
134+
setTimeout(() => {
135+
$('html, body').animate({
136+
scrollTop: $(targetId).offset().top - 20
137+
}, 500);
138+
139+
$(targetId).css('background-color', '#ffff99');
140+
setTimeout(() => $(targetId).css('background-color', ''), 2000);
141+
}, 100);
142+
}
143+
}
144+
}
145+
});
146+
})
147+
.catch(error => console.error('Error loading table data:', error));
148+
}
149+
150+
$(document).ready(function () {
151+
loadTableData();
152+
});
153+
</script>
154+
</body>
155+
</html>

‎docs/ground_truth/charts.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<body>
7171

7272
<div class="nav">
73-
<a href="home.html">&larr; Home</a>
73+
<a href="../index.html">&larr; Home</a>
7474
<a href="index.html">Ground Truth Report</a>
7575
<a href="comparison.html">Version Comparison</a>
7676
</div>

‎docs/ground_truth/comparison.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<body>
117117

118118
<div class="nav">
119-
<a href="home.html">&larr; Home</a>
119+
<a href="../index.html">&larr; Home</a>
120120
<a href="index.html">Ground Truth Report</a>
121121
<a href="charts.html">Charts</a>
122122
</div>

‎docs/ground_truth/home.html‎

Lines changed: 0 additions & 118 deletions
This file was deleted.

‎docs/ground_truth/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<body>
123123

124124
<div class="nav">
125-
<a href="home.html">&larr; Home</a>
125+
<a href="../index.html">&larr; Home</a>
126126
<a href="comparison.html">0.3.0 vs 0.3.3 Comparison &rarr;</a>
127127
<a href="charts.html">Charts</a>
128128
</div>

0 commit comments

Comments
 (0)