This is a Python web application that partially evaluates the coding style of students' .cpp and .h files for CSCI 235, a computer science course at Charleston Southern University.
This is a fork of cppStyle, used at the University of Michigan.
Requires Python 3.12+. Dependencies are managed via pyproject.toml using standard Python packaging tools — no Pipenv or requirements.txt needed.
First, create and activate a virtual environment (recommended):
python -m venv .venv
# Linux / macOS
source .venv/bin/activate
# Windows (CMD)
.venv\Scripts\activateThen install the appropriate dependency set for your use case:
Installs the core dependencies (cpplint, pyparsing) needed to grade files from the command line:
pip install -e .Installs core dependencies plus Flask, Werkzeug, and Gunicorn:
pip install -e ".[web]"Installs everything including pytest:
pip install -e ".[web,dev]"python ./run_local.py path/to/file.cpp
python ./run_local_for_parsing.py path/to/file.cpppython ./run.pySET FLASK_APP=run.py
SET FLASK_DEBUG=1
python -m flask runexport FLASK_APP=run.py
export FLASK_DEBUG=1
python -m flask runInstall the dev extras (see above), then:
- Execute all the tests.
pytest - Stop at the first failed assertion.
pytest -x - Run one specific test.
pytest -k test_good_operator_spacing