Skip to content

Commit

Permalink
move away from main
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Jun 28, 2024
1 parent c3a9c1b commit ad4dd23
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 1 addition & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down
2 changes: 1 addition & 1 deletion sdk/scrapers/DownloadLangaraInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion sdk/scrapers/DownloadTransferInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit ad4dd23

Please sign in to comment.