Skip to content
Snippets Groups Projects
Commit ad8dc02f authored by joshrandall8478's avatar joshrandall8478
Browse files

close to success

parent 859a0426
No related branches found
No related tags found
No related merge requests found
.venv
.vscode
.gitignore
docker-compose.yml
gradingscript.Dockerfile
\ No newline at end of file
services:
app:
image: gradingscript:latest
build:
context: .
dockerfile: ./gradingscript.dockerfile
environment:
ASSIGNMENT_TITLE: "Assignment Title"
SCORE_DEFAULT: 100
LATE_PENALTY: 8
DEFAULT_POINTS: "[[10],[15,20],[0]]"
DEFAULT_LABELS: "['Name', 'Steps', 'Extra Credit']"
\ No newline at end of file
# Use the official Python image from the Docker Hub
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install the dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy the rest of the application code into the container
COPY . .
# Specify the command to run the application
CMD ["python3", "main.py"]
\ No newline at end of file
...@@ -4,6 +4,7 @@ from colored import Fore, Style #Documentation: https://dslackw.gitlab.io/colore ...@@ -4,6 +4,7 @@ from colored import Fore, Style #Documentation: https://dslackw.gitlab.io/colore
from time import sleep from time import sleep
import os import os
import json
""" """
...@@ -28,8 +29,12 @@ Environment Variable Imports ...@@ -28,8 +29,12 @@ Environment Variable Imports
title = os.getenv("ASSIGNMENT_TITLE", default="Assignment Title") title = os.getenv("ASSIGNMENT_TITLE", default="Assignment Title")
scoreDefault = os.getenv("SCORE_DEFAULT", default=100) # What the score is out of scoreDefault = os.getenv("SCORE_DEFAULT", default=100) # What the score is out of
latePenalty = scoreDefault * float(os.getenv("LATE_PENALTY", default="0.1")) latePenalty = int(os.getenv("LATE_PENALTY", default="8"))
defaults = os.getenv("POINTS_FOR_RUNS", default=[10,20,0]) # defaults = os.getenv("POINTS_FOR_RUNS", default=[10,20,0])
defaults_env = os.getenv("DEFAULT_POINTS", default="[[10],[15,20],[0]]")
defaults = json.loads(defaults_env)
defaultLabels_env = os.getenv("DEFAULT_LABELS", default='["Name", "Steps", "Extra Credit"]')
defaultLabels = json.loads(defaultLabels_env)
""" """
* CHANGEABLE * CHANGEABLE
""" """
...@@ -43,16 +48,16 @@ defaults = os.getenv("POINTS_FOR_RUNS", default=[10,20,0]) ...@@ -43,16 +48,16 @@ defaults = os.getenv("POINTS_FOR_RUNS", default=[10,20,0])
# Default points stored for each run. Each list entry is a run. A default run score of 0 allows extra credit. # Default points stored for each run. Each list entry is a run. A default run score of 0 allows extra credit.
defaultLabels = ["Name", "Steps", "Extra Credit"] # defaultLabels = ["Name", "Steps", "Extra Credit"]
defaults = [ # defaults = [
[10], # [10],
[15,20], # [15,20],
[0]] # [0]]
# Late penalty if submission is late. 0 for no penalty # Late penalty if submission is late. 0 for no penalty
latePenalty = 8 # 10% of score default # latePenalty = 8 # 10% of score default
""" """
! NON CHANGEABLE ! NON CHANGEABLE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment