-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report on repo #56
report on repo #56
Changes from 1 commit
8bd36ed
6d210a0
58a423e
6c1b907
321fa55
cf05312
baf5d4a
d7df0ca
992147d
6ab39b5
06167e7
4a148b8
e17a3e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ bvals.txt | |
nosetests.xml | ||
coverage.xml | ||
*.pyc | ||
local.env |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<table border="1" class="dataframe"> | ||
<thead> | ||
<tr style="text-align: right;"> | ||
<th>Technique</th> | ||
<th>Subfolder</th> | ||
<th>Contributors</th> | ||
<th>Tested</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>OGC_AmsterdamUMC</td> | ||
<td>Oliver Gurney-Champion</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>OGC_AmsterdamUMC</td> | ||
<td>Oliver Gurney-Champion</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>Tri-exponential</td> | ||
<td>OGC_AmsterdamUMC</td> | ||
<td>Oliver Gurney-Champion</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>Tri-exponential</td> | ||
<td>OGC_AmsterdamUMC</td> | ||
<td>Oliver Gurney-Champion</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>OGC_AmsterdamUMC</td> | ||
<td>Oliver Gurney-Champion/Sebastiano Barbieri</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>PvH_KB_NKI</td> | ||
<td>Petra van Houdt/Stefan Zijlema/Koen Baas</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>PV_MUMC</td> | ||
<td>Paulien Voorter</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>IAR_LundUniversity</td> | ||
<td>Ivan A. Rashid</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>IAR_LundUniversity</td> | ||
<td>Ivan A. Rashid</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>IAR_LundUniversity</td> | ||
<td>Ivan A. Rashid</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>IAR_LundUniversity</td> | ||
<td>Ivan A. Rashid</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>IAR_LundUniversity</td> | ||
<td>Farooq et al. Modified by Ivan A. Rashid</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>IAR_LundUniversity</td> | ||
<td>Fadnavis et al. Modified by Ivan A. Rashid</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>IAR_LundUniversity</td> | ||
<td>Modified by Ivan A. Rashid</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>IAR_LundUniversity</td> | ||
<td>Modified by Ivan A. Rashid</td> | ||
<td>Yes</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>OJ_GU</td> | ||
<td>Oscar Jalnefjord</td> | ||
<td>No</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>OJ_GU</td> | ||
<td>Oscar Jalnefjord</td> | ||
<td>No</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>OJ_GU</td> | ||
<td>Oscar Jalnefjord</td> | ||
<td>No</td> | ||
</tr> | ||
<tr> | ||
<td>IVIM</td> | ||
<td>ETP_SRI</td> | ||
<td>Eric Peterson</td> | ||
<td>Yes</td> | ||
</tr> | ||
</tbody> | ||
</table> |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the idea behind setting these variables? You should be able to get the repository location from the location of the file, e.g. using the |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
REPO_DIR=/path/to/your/repo | ||
CODE_CONTRIBUTIONS_FILE=/path/to/your/code_contributions_record.csv | ||
ALGORITHMS_FILE=/path/to/your/algorithms.json |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should move somewhere else. Probably |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import os | ||
import pandas as pd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pandas caused the test failure. It should be in the requirements. |
||
from dotenv import load_dotenv | ||
import json | ||
|
||
# Load environment variables | ||
load_dotenv(r'C:\Users\home\tf2.4\TF2.4_IVIM-MRI_CodeCollection\local.env') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should be able to get around hard coding paths. This won't work for me, for example. |
||
|
||
# Read the CSV file | ||
csv_file_path = os.getenv('CODE_CONTRIBUTIONS_FILE') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking through the code I realize that your table is missing a column, And there I also mentioned double checking the code contributions against what is in the source folder. So the source code folder and code contribution file should match. If not it would be nice to note that. That should be a superset of the wrapped code list. And that should be a superset of the tested code list. If anything doesn't match that logic then we should note it in the html or printing a message. |
||
df = pd.read_csv(csv_file_path) | ||
|
||
unique_subfolders = df['subfolder'].unique().tolist() | ||
|
||
# Read the JSON file | ||
algorithms_file_path = os.getenv('ALGORITHMS_FILE') | ||
with open(algorithms_file_path, 'r') as f: | ||
algorithms_data = json.load(f) | ||
|
||
# Get a list of all algorithms from the JSON file | ||
all_algorithms = algorithms_data['algorithms'] | ||
|
||
# Add a new column 'Tested' to the DataFrame if it starts with that of subfolder | ||
df['Tested'] = df.apply(lambda row: 'Yes' if any(algorithm.startswith(row['subfolder'].split('_')[0]) for algorithm in all_algorithms) else 'No', axis=1) | ||
|
||
# Select the desired columns | ||
df_selected = df[['Technique', 'subfolder', 'Authors', 'Tested']] | ||
df_selected.columns = ['Technique', 'Subfolder', 'Contributors', 'Tested'] | ||
|
||
# Convert the DataFrame to HTML | ||
html_string = df_selected.to_html(index=False) | ||
|
||
# Save the HTML to a file | ||
with open('combined_report.html', 'w') as f: | ||
f.write(html_string) | ||
# printing message that report have been succesfully generated | ||
print("Combined HTML report generated successfully.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go into the
website
folder. Another PR is also creating files there.