diff --git a/Controller.py b/Controller.py index 9aaf45f..132b637 100644 --- a/Controller.py +++ b/Controller.py @@ -5,7 +5,7 @@ from sqlalchemy import union -from main import PREBUILTS_DIRECTORY +PREBUILTS_DIRECTORY="database/prebuilts/" from sdk.schema.BaseModels import Course, Semester from sdk.schema.CourseAttribute import CourseAttributeDB diff --git a/api.py b/api.py index afdc602..b3ffa49 100644 --- a/api.py +++ b/api.py @@ -36,7 +36,11 @@ from sdk.schema_built.ApiResponses import IndexCourse, IndexCourseList, IndexSemesterList, PaginationPage from sdk.schema_built.CourseMax import CourseMax, CourseMaxAPI, CourseMaxAPIOnlyTransfers, CourseMaxDB -from main import ARCHIVES_DIRECTORY, DB_LOCATION, PREBUILTS_DIRECTORY + +DB_LOCATION="database/database.db" +CACHE_DB_LOCATION="database/cache/cache.db" +PREBUILTS_DIRECTORY="database/prebuilts/" +ARCHIVES_DIRECTORY="database/archives/" from dotenv import load_dotenv load_dotenv() diff --git a/main.py b/main.py index 848f6b2..5bc4b90 100644 --- a/main.py +++ b/main.py @@ -14,10 +14,7 @@ -DB_LOCATION="database/database.db" -CACHE_DB_LOCATION="database/cache/cache.db" -PREBUILTS_DIRECTORY="database/prebuilts/" -ARCHIVES_DIRECTORY="database/archives/" + if __name__ == "__main__": diff --git a/sdk/scrapers/DownloadLangaraInfo.py b/sdk/scrapers/DownloadLangaraInfo.py index e3c06fc..7ff1114 100644 --- a/sdk/scrapers/DownloadLangaraInfo.py +++ b/sdk/scrapers/DownloadLangaraInfo.py @@ -12,7 +12,7 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: - from main import CACHE_DB_LOCATION + from api import CACHE_DB_LOCATION def getSubjectsFromWeb(year:int, semester:int, use_cache=False) -> list | None: # get available subjects (ie ABST, ANTH, APPL, etc) diff --git a/sdk/scrapers/DownloadTransferInfo.py b/sdk/scrapers/DownloadTransferInfo.py index fdde893..12d8da9 100644 --- a/sdk/scrapers/DownloadTransferInfo.py +++ b/sdk/scrapers/DownloadTransferInfo.py @@ -22,7 +22,7 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: - from main import CACHE_DB_LOCATION + from api import CACHE_DB_LOCATION headers = {