A grader for Python projects, used in the "Programming with Python" course at Sofia University "St. Kliment Ohridski", Faculty of Mathematics and Informatics.
Automatically grader Python projects based on a set of checks. Current supported set of checks are:
- If the project has a requirements.txt file
- Pylint
- Type hints (via mypy)
- Code coverage (via pytest & coverage)
The tool supports configuration files, where you can specify the score for each check.
-
If you don't have Docker (or Docker Desktop) already, install it from here.
-
Download or clone this repository, if you haven't already.
-
Navigate to the project repository in a terminal and execute the following command:
./run <path_to_Python_project>
Replace <path_to_Python_project>
with the path to your project directory. This command should work on all operating systems.
<path_to_Python_project>
should be a full path, not a relative one. For example, write C:\Users\YourName\Documents\Project
instead of just ..\Project
.
- Clone the repository and create a virtual environment:
git clone https://github.com/fmipython/PythonProjectGrader
cd PythonProjectGrader
python3 -m venv .venv
-
Activate the virtual environment:
- On Linux/MacOS:
source .venv/bin/activate
- On Windows:
.venv\Scripts\activate
-
Install the dependencies:
pip install -r requirements.txt
python3 main.py -c ./config/2024.json PROJECT_PATH
Where PROJECT_PATH
is the path to the project you want to grade.
Link to the documentation here