added the start state and other templates
This commit is contained in:
@@ -8,6 +8,7 @@ Run:
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
APP_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
@@ -34,10 +35,21 @@ from student_wise_template import generate_student_wise_templates # noqa: E402
|
||||
from teacher_wise_template import generate_teacher_wise_templates # noqa: E402
|
||||
|
||||
RESULT_DIR = os.path.join(ROOT_DIR, "result", "templates")
|
||||
VIEW_NAMES = ["batch-wise", "department-wise", "room-wise", "student-wise", "teacher-wise"]
|
||||
|
||||
|
||||
def clear_result_dir():
|
||||
"""Removes every previous run's output so stale files never linger."""
|
||||
for view_name in VIEW_NAMES:
|
||||
output_dir = os.path.join(RESULT_DIR, view_name)
|
||||
if os.path.exists(output_dir):
|
||||
shutil.rmtree(output_dir)
|
||||
os.makedirs(output_dir, exist_ok=True)
|
||||
|
||||
|
||||
def main():
|
||||
reset_log()
|
||||
clear_result_dir()
|
||||
|
||||
data_csv_marker = os.path.join(ROOT_DIR, "data", "dummy", "blocks", "rooms.csv")
|
||||
if not os.path.exists(data_csv_marker):
|
||||
|
||||
Reference in New Issue
Block a user