GradeIt is a Python-based automation tool designed for consistent evaluation of student submissions, generating timely feedback for networking courses. It allows instructors to grade student submissions in a consistent and automated manner, supporting grading across multiple files and task types. The script leverages YAML for configuration, providing flexibility and clear instructions for grading criteria. This tool is built to handle various types of assignments and provide detailed feedback for students.
grades.csv
file for easy import into learning management systems (LMS).config.yaml
) which defines various paths and parameters required for grading.grades.csv
file, containing each student's total earned points.Make sure Python 3 is installed along with the required libraries (PyYAML
and others). To install dependencies, run:
pip install -r requirements.txt
To use GradeIt, you need to at least specify where the submission files are, where is the list of students to evaluate and where is the answer_key to be used to do the grading.
This information can be given at the command line:
ayalac@huitaca:/24F-NET3008/Labs/RDIST$ grade_it.py
Provide the full path to CSV file with your student list:
/24F-NET3008/students.csv
Provide the full path to the directory containing files that you wish to grade: /24F-NET3008/submissions
Provide the full path to your answer file: /24F-NET3008/RDIST_answer_key.txt
As an alternative, you can use a config.yaml
file with all the paths and filenames for grading. Below is an example structure:
submissions_dir: /path/to/submissions
feedback_dir: /path/to/feedback
general_feedback_file: /path/to/general_feedback.yaml
answer_key_file: /path/to/answer_key.txt
grading_scheme_file: /path/to/grading_scheme.yaml
students_file: /path/to/students.csv
grades_csv_file: /path/to/grades.csv`
Or you can use the --config
option to use a different name for your config file.
You can run the script with the following command:
python grade_it.py
Alternatively, you can run the script without a config file and answer the questions on where the main files are located.
Assuming the following OSPF_config.yaml
:
submissions_dir: ./OSPF/submissions
feedback_dir: ./OSPF/feedback
general_feedback_file: ./OSPF/general_feedback.yaml
answer_key_file: ./OSPF/OSPF_answer_key.txt
grading_scheme_file: ./OSPF/OSPF_grading_scheme.yaml
students_file: ./NET3008/students.csv
grades_csv_file: ./OSPF/OSPF_grades.csv
Run the script as follows:
python grade_it.py --config ./OSPF_config.yaml
This will:
students.csv
.answer_key.txt
.submissions_dir
.feedback_dir
.general_feedback_file
.grades_csv_file
.The script will generate individual feedback files for each student in the designated directory, and the overall grades will be written to grades.csv
.
course:
- course_name: 24F-NET3008
- professor: Carolina Ayala
lab:
- lab_name: RDIST
- graded_on: 'Thu 24 Oct 2024 09:09:31 '
- earned_points: 7.0
- total_points: 10.0
- lab_grade: 70.0%
student:
u: '156'
username: std0001
feedback:
- task: (1.5 Points ) Filter Redistributed Routes Using a Distribute List and ACL
results:
- (0.5) R2 - Configured an ACL OSPF20-FILTER
- (0.5) R2 - Filtered out 192.168.20.0/22 from Redistribution
- (0) INCORRECT Ensure R2 - Red. OSPF 156 into EIGRP 156 filtered by OSPF2-FILTER
- task: ( 4.5 Points ) Filter Red. Routes Using a Distribute List and Prefix List
results:
- (0.5) R2 - Configured the prefix list EIGRP-FILTER
- (0) INCORRECT Ensure R2 - Permits 172.16.0.0/16 eq 28 from Redistribution
- (0.5) R2 - Red. EIGRP 156 into OSPF 156 filtered by EIGRP-FILTER
- (1) R2 - Learned 172.16.1.0/24 via OSPF as a E2 route
- (1) R2 - Learned 172.16.12.0/26 via OSPF as a E2 route
- (0) INCORRECT Ensure R2 - Learns 172.16.14.0/28 via OSPF as a E2 route
- task: (2 Points ) Filter Redistributed Routes Using a Route Map
results:
- (0.5) R2 - Configured an ACL R3-ACL
- (0.5) R2 - Filtered out 192.168.34.0/28 from Redistribution
- (0.5) R2 - Filtered out 192.168.35.0/29 from Redistribution
- (0.5) R2 - Created route-map R3-FILTER
- task: (2 Points ) Filter Red. Routes Using a Route Map to set metric
results:
- (0.5) R2 - Configured a prefix list R1-PL
- (0.5) R2 - Selected 172.16.13.0/27 for metric modification
- (0) INCORRECT Ensure R3 - Learns 172.16.13.0/27 as a E1
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, please contact Carolina Ayala.