1111
1212PST = timezone ("US/Pacific" )
1313
14+ DEFAULT_EMAIL_SIGNATURE = "DATA 000 Staff"
15+ DEFAULT_EMAIL_SUBJECT = "[DATA 000] Extension Request Update"
16+
1417
1518def cast_bool (cell : str ) -> bool :
1619 cell = str (cell ).strip ()
@@ -83,18 +86,22 @@ def get(key: str) -> Any:
8386 @staticmethod
8487 def get_email_from () -> str :
8588 return str (Environment .get ("EMAIL_FROM" ))
89+
90+ @staticmethod
91+ def get_email_cc () -> Optional [str ]:
92+ return Environment .safe_get ("EMAIL_CC" )
8693
8794 @staticmethod
8895 def get_email_signature () -> str :
89- return str ( Environment .safe_get ("EMAIL_SIGNATURE" , "Data 000 Staff" ) )
96+ return Environment .safe_get ("EMAIL_SIGNATURE" , DEFAULT_EMAIL_SIGNATURE )
9097
9198 @staticmethod
9299 def get_email_subject () -> str :
93- return str ( Environment .safe_get ("EMAIL_SUBJECT" , "[DATA 000] Extension Request Update" ) )
100+ return Environment .safe_get ("EMAIL_SUBJECT" , DEFAULT_EMAIL_SUBJECT )
94101
95102 @staticmethod
96103 def get_email_reply_to () -> str :
97- return str ( Environment .get ("EMAIL_REPLY_TO" ) )
104+ return Environment .get ("EMAIL_REPLY_TO" )
98105
99106 @staticmethod
100107 def get_auto_approve_threshold () -> int :
@@ -114,14 +121,38 @@ def get_max_total_requested_extensions_threshold() -> int:
114121 # If this number is 0, then reject all extensions.
115122 # If this number is > 0, then reject extensions if the total number of extensions requested exceeds this number.
116123 return int (Environment .safe_get ("MAX_TOTAL_REQUESTED_EXTENSIONS_THRESHOLD" , default = - 1 ))
124+
125+ @staticmethod
126+ def get_slack_endpoint () -> Optional [str ]:
127+ return Environment .safe_get ("SLACK_ENDPOINT" )
128+
129+ @staticmethod
130+ def get_slack_debug_endpoint () -> Optional [str ]:
131+ return Environment .safe_get ("SLACK_DEBUG_ENDPOINT" )
132+
133+ @staticmethod
134+ def get_slack_tag_list () -> Optional [str ]:
135+ return Environment .safe_get ("SLACK_TAG_LIST" )
117136
118137 @staticmethod
119138 def get_extend_gradescope_assignments () -> bool :
120139 return cast_bool (Environment .safe_get ("EXTEND_GRADESCOPE_ASSIGNMENTS" , "No" ))
140+
141+ @staticmethod
142+ def get_gradescope_email () -> Optional [str ]:
143+ return Environment .safe_get ("GRADESCOPE_EMAIL" )
144+
145+ @staticmethod
146+ def get_gradescope_password () -> Optional [str ]:
147+ return Environment .safe_get ("GRADESCOPE_PASSWORD" )
148+
149+ @staticmethod
150+ def get_spreadsheet_url () -> Optional [str ]:
151+ return Environment .safe_get ("SPREADSHEET_URL" )
121152
122153 @staticmethod
123- def get_course_name () -> str :
124- return str ( Environment .safe_get ("COURSE_NAME" , "" ) )
154+ def get_course_name () -> Optional [ str ] :
155+ return Environment .safe_get ("COURSE_NAME" )
125156
126157 @staticmethod
127158 def configure_env_vars (sheet : Sheet ):
0 commit comments