https://github.com/kevinyang372/code-eval
Flask based autograder project
https://github.com/kevinyang372/code-eval
autograder flask
Last synced: 3 months ago
JSON representation
Flask based autograder project
- Host: GitHub
- URL: https://github.com/kevinyang372/code-eval
- Owner: kevinyang372
- Created: 2019-12-15T15:22:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T07:37:21.000Z (over 2 years ago)
- Last Synced: 2025-01-30T02:28:41.839Z (5 months ago)
- Topics: autograder, flask
- Language: Python
- Homepage:
- Size: 312 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CodeEval
## Build
The application could be build with DockerFirst navigate to the project root directory and build the image:
$ docker build -t code_eval:latest .
After build completes, we can run the container:$ docker run -d -p 5000:5000 code_eval
## Sample Login Credentials
Default Admin
> Email: [email protected]
> Password: 111Default User
> Email: [email protected]
> Password: 111## Functionality (Student)
### Join Course
To join a course, students need to first visit the link `localhost:5000/register/` to gain access for code submissions.(By default visit `localhost:5000/register/join156` to add CS156.)
### Submit Code
To submit a valid code, students need to create an entry function for tester to run (by default the entry function is named 'entry') and return the correct result according to instructions.(You could refer to [this](https://github.com/kevinyang372/codeEval/blob/master/sample.py) sample file which does a simple add function.)
## Functionality (Professor)
### Submit Code
< Same as Above >### Summary
Professors can view a summary of student submissions to each course and session.The summary is structured as `Index >> Course >> Session >> Student >> Submissions >> Result` .
### Upload Session
Upload a new session to a specific course.**Required parameters:**
* Filename: A file consisting of all test cases.Example:
```python
# import BaseTest is necessary for integration
from base import BaseTestclass TestCases(BaseTest):
def __init__(self, func):
super().__init__(func)
# each key represent a separate question
self.parameters = {
'add': [(1, 2), (3, 4), (7, 10), (5, 6)],
'subtract': [(1, 2), (3, 4), (7, 10), (5, 6)],
'multiply': [(1, 2), (3, 4), (7, 10), (5, 6)]
}
self.answers = {
'add': [3, 7, 17, 11],
'subtract': [-1, -1, -3, -1],
'multiply': [2, 12, 70, 30]
}
```
* Session Number: Should be a positive decimal (e.g. 1.1).
* Course: Choose from available courses.
* Blacklist: Libraries that students should not use in submissions.### Add Course
Add a new course and create a registration link for that course.### All Settings
View / Modify / Delete courses and sessions.## Unit Test
$ python3 -m unittest## Plagiarism Detection
The Autograder comes with a source code plagiarism detection module that applies the following algorithms:
* Exact Match
* Unifying AST
* Unifying AST (Ignore Variables)
* Winnowing
* Tree Edit Distance (RTED)
* Comment Edit Distance (Levenshtein)A CLI tool is included in the repo for experimenting with the above algorithms on different attack cases. To use the tool, navigate to the `plagiarism`
directory and run the following command:
```
python3 -m plagiarism.py
```