diff --git a/.gitignore b/.gitignore index 6479890..34d5dda 100644 --- a/.gitignore +++ b/.gitignore @@ -145,6 +145,7 @@ data/gtfs/ data/grfs data/tmp data/users/** +data/** #these files are under app/static but they get copied to the outside directory on startup logging.conf diff --git a/amarillo/routers/carpool.py b/amarillo/routers/carpool.py index 8dbd53c..4a70c85 100644 --- a/amarillo/routers/carpool.py +++ b/amarillo/routers/carpool.py @@ -135,7 +135,7 @@ async def save_carpool(carpool, folder: str = 'data/carpool'): async def assert_agency_exists(agency_id: str): - agency_exists = os.path.exists(f"conf/agency/{agency_id}.json") + agency_exists = os.path.exists(f"data/agency/{agency_id}.json") if not agency_exists: raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, diff --git a/amarillo/services/agencies.py b/amarillo/services/agencies.py index 47baa5a..e7450aa 100644 --- a/amarillo/services/agencies.py +++ b/amarillo/services/agencies.py @@ -12,8 +12,7 @@ class AgencyService: def __init__(self): self.agencies: Dict[str, Agency] = {} - - for agency_file_name in glob('conf/agency/*.json'): + for agency_file_name in glob('data/agency/*.json'): with open(agency_file_name) as agency_file: dict = json.load(agency_file) agency = Agency(**dict) diff --git a/amarillo/services/config.py b/amarillo/services/config.py index 2417715..316e95a 100644 --- a/amarillo/services/config.py +++ b/amarillo/services/config.py @@ -7,6 +7,6 @@ class Config(BaseSettings): ride2go_query_data: str env: str = 'DEV' graphhopper_base_url: str = 'https://api.mfdz.de/gh' - stop_sources_file: str = 'conf/stop_sources.json' + stop_sources_file: str = 'data/stop_sources.json' config = Config(_env_file='config', _env_file_encoding='utf-8') diff --git a/amarillo/services/regions.py b/amarillo/services/regions.py index 8be79e0..425b3ac 100644 --- a/amarillo/services/regions.py +++ b/amarillo/services/regions.py @@ -9,8 +9,7 @@ class RegionService: def __init__(self): self.regions: Dict[str, Region] = {} - - for region_file_name in glob('conf/region/*.json'): + for region_file_name in glob('data/region/*.json'): with open(region_file_name) as region_file: dict = json.load(region_file) region = Region(**dict)