Skip to main content

A package to evaluate homework submissions in Python, SQL, PowerBI, and SSIS.

Project description

📘 HomeworkEvaluator

The HomeworkEvaluator is a Python-based evaluation engine designed to automatically assess student assignments across different technologies including Python, SQL, Power BI, and SSIS. It uses AI to parse and evaluate student-submitted answers against a set of markdown-formatted questions.


✨ Features

  • Supports multiple file types:
    • .py → Python
    • .sql → SQL
    • .zip → Power BI
    • .dtsx / .DTSX → SSIS
    • .txt / .md → Plain Text
  • Smart evaluator routing based on file extension.
  • AI-powered feedback generation and scoring.
  • Logging for each evaluation by file type and timestamp.
  • Automatic fallback to backup API keys when quota is exceeded.

📦 Folder Structure

.
├── homework_evaluator/
│   ├── homework_evaluator.py         # Main evaluator class
│   ├── python_evaluator.py           # Python evaluator logic
│   ├── sql_evaluator.py              # SQL evaluator logic
│   ├── powerbi_evaluator.py          # Power BI evaluator logic
│   ├── ssis_evaluator.py             # SSIS evaluator logic
│   └── logs/                         # Log files categorized by type and timestamp

🔧 Installation

Clone this repository and install the necessary dependencies:

git clone https://github.com/yourusername/homework-evaluator.git
cd homework-evaluator
pip install -r requirements.txt

🧠 Usage

from homework_evaluator import HomeworkEvaluator

evaluator = HomeworkEvaluator()

result = evaluator.evaluate_from_content(
    question_content=markdown_questions,
    answer_path="/path/to/answer/file.py",
    api_key="your-main-api-key",
    backup_api_keys=["backup-key-1", "backup-key-2"]
)

print(result["mark"])      # e.g., 85
print(result["feedback"])  # Structured feedback

🗂️ Question Format

The evaluator expects question_content as a Markdown-formatted string where each question is separated by a double newline (\n\n). Example:

### Q1
Write a Python function to reverse a string.

### Q2
Explain the purpose of list comprehensions in Python.

🛠️ Logging

All evaluations are logged under the logs/ directory, grouped by file type and timestamp.

logs/
├── python/
│   └── evaluation_2025-05-26_14-00-00.log
├── sql/
│   └── evaluation_2025-05-26_14-10-12.log

🧪 Exception Handling

  • If a file is not found or questions are malformed, an informative error is raised.
  • If the API quota is exceeded (429 errors or rate limits), it retries using backup keys.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss your ideas.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantumchecker-0.2.8.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quantumchecker-0.2.8-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file quantumchecker-0.2.8.tar.gz.

File metadata

  • Download URL: quantumchecker-0.2.8.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for quantumchecker-0.2.8.tar.gz
Algorithm Hash digest
SHA256 f6dca6b3139267892b72e7204999d7f0ee98c104785b6b25632e14ec125c46ee
MD5 2c3bd7b8a5ad89b26d3d831345bf54b7
BLAKE2b-256 28a07fab90620c98946170ae949840e619bb3d82549a7cf448e3d2746e8727e5

See more details on using hashes here.

File details

Details for the file quantumchecker-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: quantumchecker-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for quantumchecker-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 042457044dda96d90914eeb9491bc131adbc73702b38601da6c48563c9d1ad52
MD5 788be83afb4efc9ac85fa9eec2716016
BLAKE2b-256 bad5d7e1cc70e1e879585f53b18c20f5a0297d6f78f86b1c7563f75e42b7a026

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page