-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
49 lines (43 loc) · 1.95 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from pathlib import Path
# Input files configuration
ZIPPED_FILES_FOLDER = Path('zipped') # Contents should match Moodle batch download format
MASTER_FILES_FOLDER = Path('master_files') # Include Makefile, *.cpp, *.h, and *.txt
TEAMS_INFO_PATH = Path('teams_info.csv') # See calculate_grades.py for format
# Output files configuration
UNZIPPED_FILES_FOLDER = Path('unzipped')
GRADING_OUTPUT_FOLDER = Path('grading')
GRADING_WORKING_SUBFOLDER = GRADING_OUTPUT_FOLDER / 'working'
GRADING_COMPILATION_FAILED_SUBFOLDER = GRADING_OUTPUT_FOLDER / 'compilation_failed'
GRADING_CRASHED_SUBFOLDER = GRADING_OUTPUT_FOLDER / 'crashed'
MOSS_REPORT_FOLDER = Path('moss_report')
GRADES_OUTPUT_FOLDER = Path('grades')
INDIVIDUAL_GRADES_PATH = GRADES_OUTPUT_FOLDER / 'individual_grades.csv'
TEAM_GRADES_PATH = GRADES_OUTPUT_FOLDER / 'team_grades.csv'
# Grading settings
POINTS_TO_REMOVE_FILENAME = 'points_to_rm.txt'
POINTS_TOTAL = 20
POINTS_FOR_TESTS = 6
TESTS_RESULT_REGEX = r'Total pour tous les tests: (.*)\/6'
PENALTY_FOR_WARNINGS = -1.5
PENALTY_FOR_COMPILATION_FAILURE = -3
PENALTY_FOR_CRASH = -2
PENALTY_FOR_LEAKS = -2
# Moss configuration
MOSS_USER_ID = 123456789
# Email report configuration
SMTP_SERVER = 'smtp.polymtl.ca'
SMTP_PORT = 587
SENDER_EMAIL = '[email protected]'
EMAIL_SUBJECT = 'INF1010 - Correction TP#'
EMAIL_CONTENT = ('Bonjour {first_name},\n\n'
'Voici le détail de la correction pour le TP#. '
'Si vous avez des questions, vous pouvez répondre à ce courriel '
'et il me fera plaisir de vous expliquer.\n\n'
'Veuillez svp vérifier que les informations suivantes sont correctes:\n'
' - Matricule: {id}\n'
' - Binôme: {team}\n\n'
'Note: {grade}/{points_total}\n\n'
'Détail de la correction:\n{feedback}\n'
'Passez une bonne journée,\n\n'
'Autograder')
# Made by Misha Krieger-Raynauld and Simon Gauvin