# =============================================================================
# OMR Answer-Sheet Grader — Python dependencies
# =============================================================================
# Install everything with:
#
#     pip install -r requirements.txt
#
# Then run directly, e.g.:
#
#     python omr_grader.py scanned_answer_sheets/ --key Answers_keys.pdf
#
# Tested with Python 3.12.
# -----------------------------------------------------------------------------

# --- Core (required) ---------------------------------------------------------
numpy>=1.24            # array maths
opencv-python>=4.10    # image processing / mark detection (the `cv2` module)
PyMuPDF>=1.23          # render PDF sheets & read PDF answer keys (the `fitz` module)
onnxruntime>=1.16      # runs the MNIST CNN that reads the Unique Pupil Number
                       # (the ~26 KB model auto-downloads to ./models/ on first
                       #  use; needs internet access that one time)

# --- Optional ----------------------------------------------------------------
# Fallback OCR for the Unique Pupil Number when the MNIST reader can't read a
# sheet. Pure-Python install below, BUT it also needs the Tesseract program
# installed on the system separately:
#   Windows : https://github.com/UB-Mannheim/tesseract/wiki
#   macOS   : brew install tesseract
#   Linux   : sudo apt install tesseract-ocr
# The grader runs fine without it (MNIST handles the UPN); this only adds a
# last-resort fallback.
pytesseract>=0.3.10      # required for scanned/image-based answer key PDFs

# --- API Server -------------------------------------------------------------
fastapi>=0.110.0
uvicorn>=0.28.0
python-multipart>=0.0.9

# --- Database & Auth --------------------------------------------------------
mysql-connector-python>=8.3.0
bcrypt>=4.0.0
email-validator>=2.0.0

