Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/coverage/coverage.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ th {

td {
min-width: 6rem;
}
}
2 changes: 1 addition & 1 deletion scripts/coverage/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def calculate_stats(instance_data):
"description",
"interlexIdentifier",
"knowledgeSpaceLink",
"preferredCrossReference",
"preferredOntologyIdentifier",
"synonym",
):
Expand Down Expand Up @@ -92,7 +93,6 @@ def main(build_dir="_coverage"):
context = {
"terminologies": stats
}

with open(build_dir / "index.html", "w") as fp:
fp.write(template_home.render(**context))
shutil.copy(this_dir / "coverage.css", build_dir)
Expand Down
10 changes: 4 additions & 6 deletions scripts/coverage/index.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ <h2>Terminologies</h2>
<th>Name</th>
<th>Definition</th>
<th>Description</th>
<th>Interlex id</th>
<th>KS link</th>
<th>Ontology id</th>
<th>XRef ID</th>
<th>Ontology ID</th>
<th>Synonyms</th>
</tr>
</thead>
Expand All @@ -26,8 +25,7 @@ <h2>Terminologies</h2>
<td><a href="terminologies/{{term_name}}.html">{{term_name}}</a></td>
<td class="{{stats.definition|colourcode}}" style="text-align: center;">{{stats.definition|int}}%</td>
<td class="{{stats.description|colourcode}}" style="text-align: center;">{{stats.description|int}}%</td>
<td class="{{stats.interlexIdentifier|colourcode}}" style="text-align: center;">{{stats.interlexIdentifier|int}}%</td>
<td class="{{stats.knowledgeSpaceLink|colourcode}}" style="text-align: center;">{{stats.knowledgeSpaceLink|int}}%</td>
<td class="{{stats.preferredCrossReference|colourcode}}" style="text-align: center;">{{stats.preferredCrossReference|int}}%</td>
<td class="{{stats.preferredOntologyIdentifier|colourcode}}" style="text-align: center;">{{stats.preferredOntologyIdentifier|int}}%</td>
<td class="{{stats.synonym|colourcode}}" style="text-align: center;">{{stats.synonym|int}}%</td>
</tr>
Expand All @@ -37,4 +35,4 @@ <h2>Terminologies</h2>

</body>

</html>
</html>
40 changes: 40 additions & 0 deletions scripts/coverage/index_old.tpl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<html>

<head>
<title>openMINDS instance library status</title>
<link rel="stylesheet" href="./coverage.css">
</head>

<body>
<h1>openMINDS instance library status</h1>
<h2>Terminologies</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Definition</th>
<th>Description</th>
<th>Interlex id</th>
<th>KS link</th>
<th>Ontology id</th>
<th>Synonyms</th>
</tr>
</thead>
<tbody>
{% for term_name, stats in terminologies.items() %}
<tr>
<td><a href="terminologies/{{term_name}}.html">{{term_name}}</a></td>
<td class="{{stats.definition|colourcode}}" style="text-align: center;">{{stats.definition|int}}%</td>
<td class="{{stats.description|colourcode}}" style="text-align: center;">{{stats.description|int}}%</td>
<td class="{{stats.interlexIdentifier|colourcode}}" style="text-align: center;">{{stats.interlexIdentifier|int}}%</td>
<td class="{{stats.knowledgeSpaceLink|colourcode}}" style="text-align: center;">{{stats.knowledgeSpaceLink|int}}%</td>
<td class="{{stats.preferredOntologyIdentifier|colourcode}}" style="text-align: center;">{{stats.preferredOntologyIdentifier|int}}%</td>
<td class="{{stats.synonym|colourcode}}" style="text-align: center;">{{stats.synonym|int}}%</td>
</tr>
{% endfor %}
</tbody>
</table>

</body>

</html>
13 changes: 5 additions & 8 deletions scripts/coverage/terminology.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ <h2><a href="../index.html">Terminologies</a>: {{term_name}}</h2>
<th>Name</th>
<th>Definition</th>
<th>Description</th>
<th>Interlex id</th>
<th>KS link</th>
<th>Ontology id</th>
<th>XRef ID</th>
<th>Ontology ID</th>
<th>Synonyms</th>
</tr>
<tr>
<th></th>
<th>{{stats.definition|int}}%</th>
<th>{{stats.description|int}}%</th>
<th>{{stats.interlexIdentifier|int}}%</th>
<th>{{stats.knowledgeSpaceLink|int}}%</th>
<th>{{stats.preferredCrossReference|int}}%</th>
<th>{{stats.preferredOntologyIdentifier|int}}%</th>
<th>{{stats.synonym|int}}%</th>
</tr>
Expand All @@ -35,8 +33,7 @@ <h2><a href="../index.html">Terminologies</a>: {{term_name}}</h2>
<td>{{instance.name}}</td>
<td class={{ "good" if instance.definition else "bad" }}></td>
<td class={{ "good" if instance.description else "bad" }}></td>
<td class={{ "good" if instance.interlexIdentifier else "bad" }}></td>
<td class={{ "good" if instance.knowledgeSpaceLink else "bad" }}></td>
<td class={{ "good" if instance.preferredCrossReference else "bad" }}></td>
<td class={{ "good" if instance.preferredOntologyIdentifier else "bad" }}></td>
<td class={{ "good" if instance.synonym else "bad" }}></td>
</tr>
Expand All @@ -45,4 +42,4 @@ <h2><a href="../index.html">Terminologies</a>: {{term_name}}</h2>
</table>
</body>

</html>
</html>
48 changes: 48 additions & 0 deletions scripts/coverage/terminology_old.tpl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<html>

<head>
<title>openMINDS instance library status</title>
<link rel="stylesheet" href="../coverage.css">
</head>

<body>
<h1>openMINDS instance library status</h1>
<h2><a href="../index.html">Terminologies</a>: {{term_name}}</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Definition</th>
<th>Description</th>
<th>Interlex id</th>
<th>KS link</th>
<th>Ontology id</th>
<th>Synonyms</th>
</tr>
<tr>
<th></th>
<th>{{stats.definition|int}}%</th>
<th>{{stats.description|int}}%</th>
<th>{{stats.interlexIdentifier|int}}%</th>
<th>{{stats.knowledgeSpaceLink|int}}%</th>
<th>{{stats.preferredOntologyIdentifier|int}}%</th>
<th>{{stats.synonym|int}}%</th>
</tr>
</thead>
<tbody>
{% for instance in instances.values()|sort(attribute="name") %}
<tr>
<td>{{instance.name}}</td>
<td class={{ "good" if instance.definition else "bad" }}></td>
<td class={{ "good" if instance.description else "bad" }}></td>
<td class={{ "good" if instance.interlexIdentifier else "bad" }}></td>
<td class={{ "good" if instance.knowledgeSpaceLink else "bad" }}></td>
<td class={{ "good" if instance.preferredOntologyIdentifier else "bad" }}></td>
<td class={{ "good" if instance.synonym else "bad" }}></td>
</tr>
{% endfor %}
</tbody>
</table>
</body>

</html>
Loading