From f9581e58493589b857d3b5afbff8aaf04ca8f779 Mon Sep 17 00:00:00 2001
From: joshrandall8478 <joshrandall8478@gmail.com>
Date: Thu, 3 Oct 2024 13:06:04 -0400
Subject: [PATCH] working on environment variables

---
 .env    |  4 ++++
 main.py | 16 ++++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 .env

diff --git a/.env b/.env
new file mode 100644
index 0000000..f6a1796
--- /dev/null
+++ b/.env
@@ -0,0 +1,4 @@
+ASSIGNMENT_TITLE=""
+# LATE_PENALTY=
+# SCORE_DEFAULT=
+POINTS_FOR_RUNS=[]
\ No newline at end of file
diff --git a/main.py b/main.py
index 58bfad1..da7a21a 100644
--- a/main.py
+++ b/main.py
@@ -20,24 +20,32 @@ global pointsForRun
 global title
 global defaults
 
+"""
+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"))
+defaults = os.getenv("POINTS_FOR_RUNS", default=[10,20,0])
 """
  * CHANGEABLE
 """
 # Student Variables
 
-scoreDefault = 100 # What the score is out of
+# scoreDefault = 100 # What the score is out of
 
 # Title of lab rubric
 
-title = "Name of Assignment"
+# title = "Name of Assignment"
 
 # Default points stored for each run. Each list entry is a run. A default run score of 0 allows extra credit.
 
-defaults = [10,15,20,0]
+# defaults = [10,15,20,0]
 
 # Late penalty if submission is late. 0 for no penalty
 
-latePenalty = scoreDefault * 0.1 # 10% of score default
+# latePenalty = scoreDefault * 0.1 # 10% of score default
 
 """
 ! NON CHANGEABLE
-- 
GitLab