Skip to content

Commit 220b360

Browse files
Merge pull request #1 from Anas-Elhounsri/main
Initial draft of the landing page
2 parents 588bda6 + 73b9af6 commit 220b360

5 files changed

Lines changed: 1134 additions & 0 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
# sw-metadata-bot-monitor-web
2+
23
A website to display the results of running the sw metadata bot on different organizations
4+
5+
## Generating the Dashboard
6+
7+
The landing page (`index.html`) is generated dynamically from the JSON data report using a Python script and a Mustache template.
8+
9+
### Requirements
10+
11+
You need Python 3 and the `pystache` library to generate the HTML file:
12+
13+
```bash
14+
pip install pystache
15+
```
16+
17+
### How to Generate
18+
19+
1. Ensure that the latest JSON report is saved as `created_issues_report.json` in this directory.
20+
2. Run the generation script:
21+
22+
```bash
23+
python generate.py
24+
```
25+
26+
This script will read the JSON data, parse it, and render it through `template.mustache` to output a the `index.html` file in the same directory.

created_issues_report.json

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
[
2+
{
3+
"repo_url": "https://github.com/SoftwareUnderstanding/arxiv_category_pull",
4+
"platform": "github",
5+
"pitfalls_count": 1,
6+
"warnings_count": 0,
7+
"analysis_date": "2026-03-05T17:25:08Z",
8+
"sw_metadata_bot_version": "0.1.4",
9+
"rsmetacheck_version": "0.2.0",
10+
"pitfalls_ids": [
11+
"P002"
12+
],
13+
"warnings_ids": [],
14+
"issue_url": "https://github.com/SoftwareUnderstanding/arxiv_category_pull/issues/2"
15+
},
16+
{
17+
"repo_url": "https://github.com/SoftwareUnderstanding/CodeMetaSoft_website",
18+
"platform": "github",
19+
"pitfalls_count": 1,
20+
"warnings_count": 0,
21+
"analysis_date": "2026-03-05T17:25:09Z",
22+
"sw_metadata_bot_version": "0.1.4",
23+
"rsmetacheck_version": "0.2.0",
24+
"pitfalls_ids": [
25+
"P002"
26+
],
27+
"warnings_ids": [],
28+
"issue_url": "https://github.com/SoftwareUnderstanding/CodeMetaSoft_website/issues/16"
29+
},
30+
{
31+
"repo_url": "https://github.com/SoftwareUnderstanding/Metadata-Adoption-Quantify",
32+
"platform": "github",
33+
"pitfalls_count": 4,
34+
"warnings_count": 1,
35+
"analysis_date": "2026-03-05T17:25:09Z",
36+
"sw_metadata_bot_version": "0.1.4",
37+
"rsmetacheck_version": "0.2.0",
38+
"pitfalls_ids": [
39+
"P001",
40+
"P002",
41+
"P014",
42+
"P016"
43+
],
44+
"warnings_ids": [
45+
"W004"
46+
],
47+
"issue_url": "https://github.com/SoftwareUnderstanding/Metadata-Adoption-Quantify/issues/4"
48+
},
49+
{
50+
"repo_url": "https://github.com/SoftwareUnderstanding/ScientificSoftwareKG",
51+
"platform": "github",
52+
"pitfalls_count": 0,
53+
"warnings_count": 2,
54+
"analysis_date": "2026-03-05T17:24:54Z",
55+
"sw_metadata_bot_version": "0.1.4",
56+
"rsmetacheck_version": "0.2.0",
57+
"pitfalls_ids": [],
58+
"warnings_ids": [
59+
"W002",
60+
"W004"
61+
],
62+
"issue_url": "https://github.com/SoftwareUnderstanding/ScientificSoftwareKG/issues/2"
63+
},
64+
{
65+
"repo_url": "https://github.com/SoftwareUnderstanding/auto-papers-with-artifacts",
66+
"platform": "github",
67+
"pitfalls_count": 1,
68+
"warnings_count": 5,
69+
"analysis_date": "2026-03-05T17:25:10Z",
70+
"sw_metadata_bot_version": "0.1.4",
71+
"rsmetacheck_version": "0.2.0",
72+
"pitfalls_ids": [
73+
"P002"
74+
],
75+
"warnings_ids": [
76+
"W001",
77+
"W002",
78+
"W003",
79+
"W004",
80+
"W005"
81+
],
82+
"issue_url": "https://github.com/SoftwareUnderstanding/auto-papers-with-artifacts/issues/4"
83+
},
84+
{
85+
"repo_url": "https://github.com/SoftwareUnderstanding/somef_server",
86+
"platform": "github",
87+
"pitfalls_count": 1,
88+
"warnings_count": 1,
89+
"analysis_date": "2026-03-05T17:25:12Z",
90+
"sw_metadata_bot_version": "0.1.4",
91+
"rsmetacheck_version": "0.2.0",
92+
"pitfalls_ids": [
93+
"P002"
94+
],
95+
"warnings_ids": [
96+
"W002"
97+
],
98+
"issue_url": "https://github.com/SoftwareUnderstanding/somef_server/issues/2"
99+
},
100+
{
101+
"repo_url": "https://github.com/SoftwareUnderstanding/inspect4py",
102+
"platform": "github",
103+
"pitfalls_count": 0,
104+
"warnings_count": 1,
105+
"analysis_date": "2026-03-05T17:24:55Z",
106+
"sw_metadata_bot_version": "0.1.4",
107+
"rsmetacheck_version": "0.2.0",
108+
"pitfalls_ids": [],
109+
"warnings_ids": [
110+
"W001"
111+
],
112+
"issue_url": "https://github.com/SoftwareUnderstanding/inspect4py/issues/428"
113+
},
114+
{
115+
"repo_url": "https://github.com/SoftwareUnderstanding/SOMEF-Vider",
116+
"platform": "github",
117+
"pitfalls_count": 2,
118+
"warnings_count": 2,
119+
"analysis_date": "2026-03-05T17:24:56Z",
120+
"sw_metadata_bot_version": "0.1.4",
121+
"rsmetacheck_version": "0.2.0",
122+
"pitfalls_ids": [
123+
"P002",
124+
"P017"
125+
],
126+
"warnings_ids": [
127+
"W002",
128+
"W004"
129+
],
130+
"issue_url": "https://github.com/SoftwareUnderstanding/SOMEF-Vider/issues/73"
131+
},
132+
{
133+
"repo_url": "https://github.com/SoftwareUnderstanding/completeR",
134+
"platform": "github",
135+
"pitfalls_count": 0,
136+
"warnings_count": 1,
137+
"analysis_date": "2026-03-05T17:24:57Z",
138+
"sw_metadata_bot_version": "0.1.4",
139+
"rsmetacheck_version": "0.2.0",
140+
"pitfalls_ids": [],
141+
"warnings_ids": [
142+
"W001"
143+
],
144+
"issue_url": "https://github.com/SoftwareUnderstanding/completeR/issues/10"
145+
},
146+
{
147+
"repo_url": "https://github.com/SoftwareUnderstanding/rolf",
148+
"platform": "github",
149+
"pitfalls_count": 2,
150+
"warnings_count": 1,
151+
"analysis_date": "2026-03-05T17:24:58Z",
152+
"sw_metadata_bot_version": "0.1.4",
153+
"rsmetacheck_version": "0.2.0",
154+
"pitfalls_ids": [
155+
"P001",
156+
"P002"
157+
],
158+
"warnings_ids": [
159+
"W001"
160+
],
161+
"issue_url": "https://github.com/SoftwareUnderstanding/rolf/issues/25"
162+
},
163+
{
164+
"repo_url": "https://github.com/SoftwareUnderstanding/software_types",
165+
"platform": "github",
166+
"pitfalls_count": 1,
167+
"warnings_count": 0,
168+
"analysis_date": "2026-03-05T17:24:58Z",
169+
"sw_metadata_bot_version": "0.1.4",
170+
"rsmetacheck_version": "0.2.0",
171+
"pitfalls_ids": [
172+
"P002"
173+
],
174+
"warnings_ids": [],
175+
"issue_url": "https://github.com/SoftwareUnderstanding/software_types/issues/25"
176+
},
177+
{
178+
"repo_url": "https://github.com/SoftwareUnderstanding/c2t",
179+
"platform": "github",
180+
"pitfalls_count": 1,
181+
"warnings_count": 2,
182+
"analysis_date": "2026-03-05T17:25:00Z",
183+
"sw_metadata_bot_version": "0.1.4",
184+
"rsmetacheck_version": "0.2.0",
185+
"pitfalls_ids": [
186+
"P002"
187+
],
188+
"warnings_ids": [
189+
"W002",
190+
"W004"
191+
],
192+
"issue_url": "https://github.com/SoftwareUnderstanding/c2t/issues/2"
193+
}
194+
]

generate.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import json
2+
import pystache
3+
import datetime
4+
from datetime import timezone
5+
6+
def main():
7+
with open("created_issues_report.json", "r") as f:
8+
data = json.load(f)
9+
10+
repos = []
11+
for repo in data:
12+
name = repo["repo_url"].rstrip("/").split("/")[-1]
13+
14+
try:
15+
analysis_date = datetime.datetime.fromisoformat(repo["analysis_date"].replace("Z", "+00:00"))
16+
analysis_date_formatted = analysis_date.strftime("%b %d, %Y")
17+
except:
18+
analysis_date_formatted = repo["analysis_date"]
19+
20+
has_issues = False
21+
has_pitfalls = False
22+
has_warnings = False
23+
24+
if repo.get("pitfalls_ids"):
25+
has_issues = True
26+
has_pitfalls = True
27+
28+
if repo.get("warnings_ids"):
29+
has_issues = True
30+
has_warnings = True
31+
32+
repo_enhanced = repo.copy()
33+
repo_enhanced["repo_name"] = name
34+
repo_enhanced["analysis_date_formatted"] = analysis_date_formatted
35+
repo_enhanced["has_issues"] = has_issues
36+
repo_enhanced["has_pitfalls"] = has_pitfalls
37+
repo_enhanced["has_warnings"] = has_warnings
38+
39+
repos.append(repo_enhanced)
40+
41+
now = datetime.datetime.now(timezone.utc)
42+
date_stamp = now.strftime("%B %d, %Y at %H:%M UTC")
43+
44+
template_data = {
45+
"date_stamp": date_stamp,
46+
"total_repos": len(repos),
47+
"repos": repos
48+
}
49+
50+
with open("template.mustache", "r") as f:
51+
template = f.read()
52+
53+
html = pystache.render(template, template_data)
54+
55+
with open("index.html", "w") as f:
56+
f.write(html)
57+
58+
print("#### index.html was generated successfully ####")
59+
60+
if __name__ == "__main__":
61+
main()

0 commit comments

Comments
 (0)