Skip to content
Snippets Groups Projects
Commit c7c920f5 authored by Tobias Hamann's avatar Tobias Hamann
Browse files

Add 03 and 04

parent 6a6b853a
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
## Versenden von Mails an die akzeptieren Contributors und Nominees
Arbeitsanweisungen:
1. Stelle sicher, dass eine Excel-Datei mit dem Dateinamen `Review_Results_v2.0.0_FINALE_LISTE.xlsx` existiert. Du solltest sie in Schritt 6 genutzt haben.
2. Stelle sicher, dass die Excel folgende Spalten mit genau diesen Namen enthält:
1. `'Submission ID'`
2. `'Status'`
3. `'E-Mail'`
4. `'First name'`
5. `'Last Name'`
4. `'Title of the contribution:'`
3. Open Excel
4. Open file --> Exported csv
5. On the first question that appears, choose "Getrennt"
6. On the second question that appears, choose "Komma" and nothing else!
7. On the third question that appears, choose "Standard"
8. Klick "Fertigstellen"
9. Save the file as "Reviews_Export.xlsx"
10. Führe das untenstehende Script aus
%% Cell type:code id: tags:
``` python
import random
import pandas as pd
import numpy as np
import math
import os
# Attention: Do the following steps!
# 1. Open Excel
# 2. Open file --> Exported csv
# 3. On the first question that appears, choose "Getrennt"
# 4. On the second question that appears, choose "Komma" and nothing else!
# 5. On the third question that appears, choose "Standard"
# 6. Klick "Fertigstellen"
# 7. Save the file as "Reviews_Export.xlsx"
#
# Load Excel as Input
Input= pd.read_excel('txt_Outputs\Output_FINAL.xlsx')
Reviews= pd.read_excel('Reviews_Export.xlsx')
# Set Submission ID as index
Input.set_index('Submission ID', inplace=True, drop=False)
Reviews.set_index('Submission ID', inplace=True, drop=False)
# print(Reviews.columns[39]) what remains from the pain of having \" in a string
# Give ID of first real review
# You can set this to 0 and delete Test reviews from the Reviews-Excel
First_review_ID=858
# Number of reviews
num_revs=3
# Zero-Column for number of reviews given and given and score 1, score 2, score 3 and score total recieved
Input.insert(3, "Reviews given", 0, allow_duplicates = False)
Input.insert(4, "Reviews recived", 0, allow_duplicates = False)
Input.insert(5, "Score 1 recieved", 0, allow_duplicates = False)
Input.insert(6, "Score 2 recieved", 0, allow_duplicates = False)
Input.insert(7, "Score 3 recieved", 0, allow_duplicates = False)
Input.insert(8, "Overall_Score", 0, allow_duplicates = False)
Input.insert(10, "Review 1 performed", False, allow_duplicates = False)
Input.insert(12, "Review 2 performed", False, allow_duplicates = False)
# Declare some column names that are quite long
reviewed_ID_Name=r'Identifier of the contribution: (Please copy the number behind \ID:\" from the abstract website)"'
question_01="""The abstract's main topic is clear and unambiguous."""
question_02="""The structure of the abstract is clear."""
question_03="""Sources are cited, where necessary."""
question_04="""The language is appropriate and formally correct."""
question_05="""The abstract is clearly written and easy to understand."""
question_06="""The content of the abstract is technically correct."""
question_07="""The topic of the abstract is well motivated."""
question_08="""The state of the art is adequately covered."""
question_09="""The authors adequately summarized and discussed the topic."""
question_10="""The authors contributed to the state of the art."""
question_11="""The contribution fits thematically to the NFDI4Ing Conference."""
question_12="""The contribution focuses on engineering or related topics."""
question_13="""The participants of the conference will benefit from this contribution."""
question_14="""I will be looking forward to this contribution, if it receives a slot on the conference."""
question_15="""I might personally profit from this contribution."""
# write question names in array
questions=[question_01,question_02,question_03,question_04,question_05,question_06,question_07,question_08,question_09,question_10,question_11,question_12,question_13,question_14,question_15]
"""
TODO:
- Durschschnittsreview der Einreichung berechnen
- Anzahl durchgeführter Reviews berechnen
"""
for Abstract_index, Abstract_row in Input.iterrows():
# Für jede Einreichung...
# Fetch ID und Mail des Abstracts
Abstract_ID=Abstract_row['Submission ID']
Abstract_Email=str(Abstract_row['E-Mail'])
Abstract_Email=Abstract_Email.lower()
for Review_index, Review_row in Reviews.iterrows():
# ... jeweils alle Zeilen der Reviews durchgehen und ...
# Fetch ID, Mail des Reviews und gereviewte ID
Review_ID=Review_row['Submission ID']
Review_Email=str(Review_row['Reviewer: E-Mail'])
Review_Email=Review_Email.lower()
Reviewed_ID=Review_row[reviewed_ID_Name]
if Review_ID<First_review_ID:
# Does not process with IDs < ID of the first review
continue
else:
Reviewed_ID=int(Reviewed_ID)
if Abstract_ID==Reviewed_ID:
# Wenn die Abstract_ID gereviewt wurde...
# print(str(Abstract_ID)+ " reviewd by " + str(Review_ID))
# Wird der Review recieved counter hochgesetzt
Input.loc[Abstract_ID, 'Reviews recived']=Input.loc[Abstract_ID, 'Reviews recived']+1
# Wird der Score für das jeweilige Review berechnet
Total_Score=0
for question in questions:
Total_Score=Total_Score+Reviews.loc[Review_ID, question]
# When zu viele Reviews durchgeführt wurden
if Input.loc[Abstract_ID, 'Reviews recived']>num_revs:
print('Attention! To many reviews for ID '+ str(Abstract_ID))
continue
# Write Score so corresponding review column
Score_Column='Score '+ str(Input.loc[Abstract_ID, 'Reviews recived']) + ' recieved'
Input.loc[Abstract_ID,Score_Column]=Total_Score
# Wenn der Reviewer ein Abstract eingereicht hat,
# wird dokumentiert, dass gereviewt wurde, indem...
if Abstract_Email==Review_Email:
# ... der reviews given counter hochgesetzt wird
Input.loc[Abstract_ID, 'Reviews given']=Input.loc[Abstract_ID, 'Reviews given']+1
# ... dokumentiert wird, welches Review durchgeführt wurde
if Reviewed_ID==Input.loc[Abstract_ID, 'Review 1:']:
Input.loc[Abstract_ID, 'Review 1 performed']=True
elif Reviewed_ID==Input.loc[Abstract_ID, 'Review 2:']:
Input.loc[Abstract_ID, 'Review 2 performed']=True
# Calculate Overall score
Reviews_recieved=Input.loc[Abstract_ID, 'Reviews recived']
Sum_of_Scores=0
for score in range(1,(Reviews_recieved+1)):
Score_Column='Score '+ str(score) + ' recieved'
Sum_of_Scores=Sum_of_Scores+Input.loc[Abstract_ID,Score_Column]
if Reviews_recieved>0:
Overall_Score=Sum_of_Scores/Reviews_recieved
else:
Overall_Score=0
Input.loc[Abstract_ID, 'Overall_Score']=Overall_Score
Input.to_excel("Review_Results.xlsx")
```
%% Cell type:markdown id: tags:
## Erstellung automatisch generierter HTML Blöcke für die Abstract Website
Arbeitsanweisungen:
1. Stelle sicher, dass eine Excel-Datei mit dem Dateinamen `Review_Results_v2.0.0_FINALE_LISTE.xlsx` existiert. Du solltest sie in Schritt 6 genutzt haben.
2. Stelle sicher, dass die Excel folgende Spalten mit genau diesen Namen enthält:
1. `'Submission ID'`
2. `'Status'`
3. `'E-Mail'`
4. `'First name'`
5. `'Last Name'`
4. `'Title of the contribution:'`
3. Führe das untenstehende Script aus
%% Cell type:code id: tags:
``` python
import pandas as pd
import numpy as np
from os.path import exists
import os
# Load excel
Contributor_Liste = pd.read_excel('Review_Results_v2.0.0_FINALE_LISTE.xlsx')
t01 = '<a class="hmt_anchor" id="'
# ID
t02 = '" style="color:#FFFFFF;text-decoration:none;"></a> \n <div style="color:#FFFFFF;line-height:1"> \n <span style="color:#9F9F9F;float:right;"> \n ID: '
# ID
t03 = '\n</span> \n <details> \n <summary> \n <span style="color:#FFFFFF;text-decoration:none;">\n <b>'
# Title of contribution
t04 = '</b>\n - Workshop\n </span>\n</summary>\n<br>\n\n <!--ADD ABSTRACT TEXT HERE. Format it by yourself. To much variation for automation.-->\n\n '
# Abstract Text has to be added and formatted manually
t05 = '</details>\n<br>\n<br>\n<span style="color:#FFFFFF;float:right;">License: \n<a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noopener">\n <span style="color: #FFFFFF"><u>CC-BY 4.0 &#8599;</u></span>\n</a>\n</span>\n\n</div>'
# Make folder
Ordnername="HTMLs"
if not os.path.exists(Ordnername):
os.mkdir(Ordnername)
# For everyone in the list
for index, row in Contributor_Liste.iterrows():
# Teste if Termin bestätigt (raus wird nicht angeschrieben)
if row['Status'] == 'Termin bestätigt':
# Get ID aus string
ID = str(int(row['Submission ID']))
# Compile Text
tex_full = t01+ID+t02+ID+t03 + row['Title of the contribution:']+t04 + t05
# Set new status
Contributor_Liste.at[index, 'Status'] = 'HTML erstellt'
# Write txt file
txt_filename=Ordnername+"/"+ID+"_Abstract_HTML.txt"
with open(txt_filename, "w") as text_file:
text_file.write(tex_full)
# Debug
if index > 0:
break
# Write Excel file
Contributor_Liste.to_excel('04_Erzeuge_Abstract_HTMLs.xlsx')
```
%% Cell type:code id: tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment