Skip to content
SquadCommitPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EVAL – Automatic Grading Tool for Programming Assignments

Requirements

  • uv (manages Python and dependencies)
  • Git

Setup

1. Clone the repository

git clone https://git.uni-jena.de/fusion/teaching/project/2026sose/swep/eval/eval.git
cd eval

2. Install dependencies

uv sync

uv sync automatically creates a project-local .venv/, installs the matching Python version (3.14), and installs all dependencies pinned in uv.lock.

3. Set up environment variables

cp .env.example .env

Open .env and fill in the SECRET_KEY. Generate one with:

uv run python -c "import secrets; print(secrets.token_urlsafe(50))"

4. Create logging directory

Open settings.py and create LOG_DIR if it doesn't exist. Optionally, change it to a custom directory.

5. Start Docker

Docker is required to execute submission test runs. Before running submission tests, build the runner image(s) for the languages you use. The execution service expects one image per language, except that C and C++ share the same image (the gcc base ships gcc, g++, and Catch2):

  • Linux (systemd):
sudo systemctl start docker
# C and C++ / Catch2 (shared image)
docker build -t eval-runner-c:latest -f execution/dockerfiles/Dockerfile.c .
# Java / JUnit 5
docker build -t eval-runner-java:latest -f execution/dockerfiles/Dockerfile.java .
# Python / pytest
docker build -t eval-runner-python:latest -f execution/dockerfiles/Dockerfile.python .
# OCaml / OUnit2
docker build -t eval-runner-ocaml:latest -f execution/dockerfiles/Dockerfile.ocaml .
# Haskell / Tasty
docker build -t eval-runner-haskell:latest -f execution/dockerfiles/Dockerfile.haskell .

Java tests: the public test class must be named PublicTests and the private one PrivateTests (Java requires the file name to match the public class, so they are mounted as PublicTests.java / PrivateTests.java). JUnit's XML reports do not carry the source file path, so scope is derived from the class name: a class whose name contains Private is treated as private, every other class as public.

Python tests: test files are mounted as test_public.py / test_private.py and run with pytest; the student's submission is importable directly (it is on PYTHONPATH), so a solution.py is imported via from solution import .... Public/private scope is derived automatically from the test directory.

OCaml tests: each test file is a standalone OUnit2 program (let () = run_test_tt_main suite) that references the student's submission module (e.g. a solution.ml is used as Solution.add). Public and private tests are compiled and run as separate executables; scope is derived automatically.

Haskell tests: each test file is a standalone tasty Main program that enables XML output via the tasty-ant-xml ingredient (main = defaultMainWithIngredients (antXMLRunner : defaultIngredients) tests) and imports the student's submission module (e.g. a Solution.hs with module Solution is used as Solution.add). Public and private tests are compiled and run as separate executables; scope is derived automatically.

6. Run migrations

uv run python manage.py migrate

7. Load permission group fixtures

uv run python manage.py loaddata 0001_permission_group_lecturer.json 0002_permission_group_student_assistant_ready.json

8. Start the development server

uv run python manage.py runserver

The app is now available at http://127.0.0.1:8000

9. Start the job worker

Test execution runs asynchronously via Django-Q2. Start the worker in a separate terminal:

uv run python manage.py qcluster

The worker picks up queued test runs and executes them in Docker containers (2 in parallel by default). Without a running worker, submitted tests will stay in queued state indefinitely.

To access the admin panel, create a superuser first:

uv run python manage.py createsuperuser

The admin panel is then available at http://127.0.0.1:8000/backrooms

CSS / Frontend

The project uses Tailwind CSS v4 + DaisyUI v5, compiled via the Tailwind standalone CLI (no Node.js required). The source file is static/css/input.css, the output is static/css/output.css.

First-time setup: download the Tailwind CLI

Linux:

curl -sLo static/css/tailwindcss https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64
chmod +x static/css/tailwindcss

macOS (Apple Silicon):

curl -sLo static/css/tailwindcss https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-arm64
chmod +x static/css/tailwindcss

macOS (Intel):

curl -sLo static/css/tailwindcss https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-x64
chmod +x static/css/tailwindcss

Windows:

curl -sLo static/css/tailwindcss.exe https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-windows-x64.exe

The binary is listed in .gitignore and must be downloaded once per machine.

Build CSS once

static/css/tailwindcss -i static/css/input.css -o static/css/output.css

Watch mode (recommended during development)

Run this in a second terminal alongside manage.py runserver — it rebuilds output.css automatically whenever templates or input.css change:

static/css/tailwindcss -i static/css/input.css -o static/css/output.css --watch

Note: output.css is committed to the repository so that the app works without a CSS build step for those who are not changing any templates or styles.

Documentation

The project documentation is built with MkDocs (Material theme). The sources live in docs/, the configuration in mkdocs.yml.

Live preview

uv run mkdocs serve

This serves the docs at http://127.0.0.1:8000 with auto-reload on changes.

Note: MkDocs uses the same port as the Django dev server. If both run at once, point MkDocs to another port: uv run mkdocs serve -a 127.0.0.1:8001.

Build static HTML

uv run mkdocs build

The generated site is written to site/ (gitignored). Open site/index.html in a browser to view it.

Development Workflow

Add dependencies

uv add <package>

uv will automatically update pyproject.toml with the dependency and uv.lock with the version.

Run checks and fix formatting

uv run ruff check --fix .
uv run ruff format .

Run tests

uv run python manage.py test --noinput

Tip: activating the venv

If you prefer not to prefix every command with uv run, you can activate the project venv once per shell:

source .venv/bin/activate     # macOS/Linux
.venv\Scripts\activate        # Windows

After that, python manage.py ... and other tools work directly.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages