Skip to content

Commit 8bd36ed

Browse files
committed
report on repo
1 parent 1f4cbf4 commit 8bd36ed

File tree

4 files changed

+167
-0
lines changed

4 files changed

+167
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ bvals.txt
1616
nosetests.xml
1717
coverage.xml
1818
*.pyc
19+
local.env

combined_report.html

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<table border="1" class="dataframe">
2+
<thead>
3+
<tr style="text-align: right;">
4+
<th>Technique</th>
5+
<th>Subfolder</th>
6+
<th>Contributors</th>
7+
<th>Tested</th>
8+
</tr>
9+
</thead>
10+
<tbody>
11+
<tr>
12+
<td>IVIM</td>
13+
<td>OGC_AmsterdamUMC</td>
14+
<td>Oliver Gurney-Champion</td>
15+
<td>Yes</td>
16+
</tr>
17+
<tr>
18+
<td>IVIM</td>
19+
<td>OGC_AmsterdamUMC</td>
20+
<td>Oliver Gurney-Champion</td>
21+
<td>Yes</td>
22+
</tr>
23+
<tr>
24+
<td>Tri-exponential</td>
25+
<td>OGC_AmsterdamUMC</td>
26+
<td>Oliver Gurney-Champion</td>
27+
<td>Yes</td>
28+
</tr>
29+
<tr>
30+
<td>Tri-exponential</td>
31+
<td>OGC_AmsterdamUMC</td>
32+
<td>Oliver Gurney-Champion</td>
33+
<td>Yes</td>
34+
</tr>
35+
<tr>
36+
<td>IVIM</td>
37+
<td>OGC_AmsterdamUMC</td>
38+
<td>Oliver Gurney-Champion/Sebastiano Barbieri</td>
39+
<td>Yes</td>
40+
</tr>
41+
<tr>
42+
<td>IVIM</td>
43+
<td>PvH_KB_NKI</td>
44+
<td>Petra van Houdt/Stefan Zijlema/Koen Baas</td>
45+
<td>Yes</td>
46+
</tr>
47+
<tr>
48+
<td>IVIM</td>
49+
<td>PV_MUMC</td>
50+
<td>Paulien Voorter</td>
51+
<td>Yes</td>
52+
</tr>
53+
<tr>
54+
<td>IVIM</td>
55+
<td>IAR_LundUniversity</td>
56+
<td>Ivan A. Rashid</td>
57+
<td>Yes</td>
58+
</tr>
59+
<tr>
60+
<td>IVIM</td>
61+
<td>IAR_LundUniversity</td>
62+
<td>Ivan A. Rashid</td>
63+
<td>Yes</td>
64+
</tr>
65+
<tr>
66+
<td>IVIM</td>
67+
<td>IAR_LundUniversity</td>
68+
<td>Ivan A. Rashid</td>
69+
<td>Yes</td>
70+
</tr>
71+
<tr>
72+
<td>IVIM</td>
73+
<td>IAR_LundUniversity</td>
74+
<td>Ivan A. Rashid</td>
75+
<td>Yes</td>
76+
</tr>
77+
<tr>
78+
<td>IVIM</td>
79+
<td>IAR_LundUniversity</td>
80+
<td>Farooq et al. Modified by Ivan A. Rashid</td>
81+
<td>Yes</td>
82+
</tr>
83+
<tr>
84+
<td>IVIM</td>
85+
<td>IAR_LundUniversity</td>
86+
<td>Fadnavis et al. Modified by Ivan A. Rashid</td>
87+
<td>Yes</td>
88+
</tr>
89+
<tr>
90+
<td>IVIM</td>
91+
<td>IAR_LundUniversity</td>
92+
<td>Modified by Ivan A. Rashid</td>
93+
<td>Yes</td>
94+
</tr>
95+
<tr>
96+
<td>IVIM</td>
97+
<td>IAR_LundUniversity</td>
98+
<td>Modified by Ivan A. Rashid</td>
99+
<td>Yes</td>
100+
</tr>
101+
<tr>
102+
<td>IVIM</td>
103+
<td>OJ_GU</td>
104+
<td>Oscar Jalnefjord</td>
105+
<td>No</td>
106+
</tr>
107+
<tr>
108+
<td>IVIM</td>
109+
<td>OJ_GU</td>
110+
<td>Oscar Jalnefjord</td>
111+
<td>No</td>
112+
</tr>
113+
<tr>
114+
<td>IVIM</td>
115+
<td>OJ_GU</td>
116+
<td>Oscar Jalnefjord</td>
117+
<td>No</td>
118+
</tr>
119+
<tr>
120+
<td>IVIM</td>
121+
<td>ETP_SRI</td>
122+
<td>Eric Peterson</td>
123+
<td>Yes</td>
124+
</tr>
125+
</tbody>
126+
</table>

local.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
REPO_DIR=/path/to/your/repo
2+
CODE_CONTRIBUTIONS_FILE=/path/to/your/code_contributions_record.csv
3+
ALGORITHMS_FILE=/path/to/your/algorithms.json

repostatus.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import os
2+
import pandas as pd
3+
from dotenv import load_dotenv
4+
import json
5+
6+
# Load environment variables
7+
load_dotenv(r'C:\Users\home\tf2.4\TF2.4_IVIM-MRI_CodeCollection\local.env')
8+
9+
# Read the CSV file
10+
csv_file_path = os.getenv('CODE_CONTRIBUTIONS_FILE')
11+
df = pd.read_csv(csv_file_path)
12+
13+
unique_subfolders = df['subfolder'].unique().tolist()
14+
15+
# Read the JSON file
16+
algorithms_file_path = os.getenv('ALGORITHMS_FILE')
17+
with open(algorithms_file_path, 'r') as f:
18+
algorithms_data = json.load(f)
19+
20+
# Get a list of all algorithms from the JSON file
21+
all_algorithms = algorithms_data['algorithms']
22+
23+
# Add a new column 'Tested' to the DataFrame if it starts with that of subfolder
24+
df['Tested'] = df.apply(lambda row: 'Yes' if any(algorithm.startswith(row['subfolder'].split('_')[0]) for algorithm in all_algorithms) else 'No', axis=1)
25+
26+
# Select the desired columns
27+
df_selected = df[['Technique', 'subfolder', 'Authors', 'Tested']]
28+
df_selected.columns = ['Technique', 'Subfolder', 'Contributors', 'Tested']
29+
30+
# Convert the DataFrame to HTML
31+
html_string = df_selected.to_html(index=False)
32+
33+
# Save the HTML to a file
34+
with open('combined_report.html', 'w') as f:
35+
f.write(html_string)
36+
# printing message that report have been succesfully generated
37+
print("Combined HTML report generated successfully.")

0 commit comments

Comments
 (0)