diff --git a/.env b/.env index f6a1796dd420452a6bcc6ca634037d24be10d1b8..93be09c9b88debd91f692ce456a493de64a10509 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ ASSIGNMENT_TITLE="" -# LATE_PENALTY= -# SCORE_DEFAULT= +LATE_PENALTY="0.1" +SCORE_DEFAULT="100" POINTS_FOR_RUNS=[] \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000000000000000000000000000000..6b76b4fabc20a488b0a750c32ea100719ca322d1 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python Debugger: Current File", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal" + } + ] +} \ No newline at end of file diff --git a/main.py b/main.py index da7a21a6174ec646a1cacf3d386870fc6fa941c8..df7cb0980f27ae956e22c5c5a510ce29a78a99fe 100644 --- a/main.py +++ b/main.py @@ -2,8 +2,10 @@ from pyfiglet import Figlet from os import system from colored import Fore, Style #Documentation: https://dslackw.gitlab.io/colored/user_guide/user_guide/#user-guide from time import sleep +from dotenv import load_dotenv import os +load_dotenv("./.env") """ These are global variables, some can be changed. """ @@ -26,7 +28,7 @@ Environment Variable Imports title = os.getenv("ASSIGNMENT_TITLE", default="Assignment Title") scoreDefault = os.getenv("SCORE_DEFAULT", default=100) # What the score is out of -latePenalty = scoreDefault * int(os.getenv("LATE_PENALTY", default="1")) +latePenalty = scoreDefault * float(os.getenv("LATE_PENALTY", default="0.1")) defaults = os.getenv("POINTS_FOR_RUNS", default=[10,20,0]) """ * CHANGEABLE diff --git a/requirements.txt b/requirements.txt index c32cd1b13aac557152c6de9f9e3698b77b3e2c33..aae234a49171c03e72356c88846fd703d3dffa1b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pyfiglet -colored \ No newline at end of file +colored +python-dotenv \ No newline at end of file