From 908a13258a8c25570d5ab7d99c2ca9fa82b22732 Mon Sep 17 00:00:00 2001 From: Francia Csaba Date: Mon, 11 Dec 2023 11:35:18 +0100 Subject: [PATCH] Fixed imports --- amarillo/app/configuration.py | 12 ++++++------ amarillo/app/services/agencies.py | 2 +- amarillo/app/services/agencyconf.py | 4 ++-- amarillo/app/services/carpools.py | 4 ++-- amarillo/app/services/gtfs.py | 6 +++--- .../app/services/gtfsrt/realtime_extension_pb2.py | 2 +- amarillo/app/services/regions.py | 2 +- amarillo/app/services/stops.py | 2 +- amarillo/app/services/trips.py | 10 +++++----- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/amarillo/app/configuration.py b/amarillo/app/configuration.py index 2fc779c..befb7bc 100644 --- a/amarillo/app/configuration.py +++ b/amarillo/app/configuration.py @@ -1,14 +1,14 @@ # separate file so that it can be imported without initializing FastAPI -from app.utils.container import container +from amarillo.app.utils.container import container import logging -from app.services.agencyconf import AgencyConfService, agency_conf_directory -from app.services.agencies import AgencyService -from app.services.regions import RegionService +from amarillo.app.services.agencyconf import AgencyConfService, agency_conf_directory +from amarillo.app.services.agencies import AgencyService +from amarillo.app.services.regions import RegionService -from app.services.config import config +from amarillo.app.services.config import config -from app.utils.utils import assert_folder_exists +from amarillo.app.utils.utils import assert_folder_exists logger = logging.getLogger(__name__) diff --git a/amarillo/app/services/agencies.py b/amarillo/app/services/agencies.py index 0f3afae..269de78 100644 --- a/amarillo/app/services/agencies.py +++ b/amarillo/app/services/agencies.py @@ -2,7 +2,7 @@ import json from glob import glob from typing import Dict -from app.models.Carpool import Agency +from amarillo.app.models.Carpool import Agency # TODO FG HB this service should also listen to pyinotify # because the (updated) agencies are needed in the enhancer diff --git a/amarillo/app/services/agencyconf.py b/amarillo/app/services/agencyconf.py index 7d90a40..34601a6 100644 --- a/amarillo/app/services/agencyconf.py +++ b/amarillo/app/services/agencyconf.py @@ -6,8 +6,8 @@ import logging from fastapi import HTTPException, status -from app.models.AgencyConf import AgencyConf -from app.services.config import config +from amarillo.app.models.AgencyConf import AgencyConf +from amarillo.app.services.config import config logger = logging.getLogger(__name__) diff --git a/amarillo/app/services/carpools.py b/amarillo/app/services/carpools.py index 2f173eb..2ebfbca 100644 --- a/amarillo/app/services/carpools.py +++ b/amarillo/app/services/carpools.py @@ -2,8 +2,8 @@ import json import logging from datetime import datetime from typing import Dict -from app.models.Carpool import Carpool -from app.services.trips import TripStore +from amarillo.app.models.Carpool import Carpool +from amarillo.app.services.trips import TripStore from app.utils.utils import yesterday, is_older_than_days logger = logging.getLogger(__name__) diff --git a/amarillo/app/services/gtfs.py b/amarillo/app/services/gtfs.py index b3f0d70..f97fb1f 100644 --- a/amarillo/app/services/gtfs.py +++ b/amarillo/app/services/gtfs.py @@ -1,6 +1,6 @@ -import app.services.gtfsrt.gtfs_realtime_pb2 as gtfs_realtime_pb2 -import app.services.gtfsrt.realtime_extension_pb2 as mfdzrte -from app.services.gtfs_constants import * +import amarillo.app.services.gtfsrt.gtfs_realtime_pb2 as gtfs_realtime_pb2 +import amarillo.app.services.gtfsrt.realtime_extension_pb2 as mfdzrte +from amarillo.app.services.gtfs_constants import * from google.protobuf.json_format import MessageToDict from google.protobuf.json_format import ParseDict from datetime import datetime, timedelta diff --git a/amarillo/app/services/gtfsrt/realtime_extension_pb2.py b/amarillo/app/services/gtfsrt/realtime_extension_pb2.py index d6f5f7e..19a3261 100644 --- a/amarillo/app/services/gtfsrt/realtime_extension_pb2.py +++ b/amarillo/app/services/gtfsrt/realtime_extension_pb2.py @@ -11,7 +11,7 @@ from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() -import app.services.gtfsrt.gtfs_realtime_pb2 as gtfs__realtime__pb2 +import amarillo.app.services.gtfsrt.gtfs_realtime_pb2 as gtfs__realtime__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18realtime_extension.proto\x12\x10transit_realtime\x1a\x13gtfs-realtime.proto\"p\n\x1bMfdzTripDescriptorExtension\x12\x11\n\troute_url\x18\x01 \x01(\t\x12\x11\n\tagency_id\x18\x02 \x01(\t\x12\x17\n\x0froute_long_name\x18\x03 \x01(\t\x12\x12\n\nroute_type\x18\x04 \x01(\r\"\xb0\x02\n\x1fMfdzStopTimePropertiesExtension\x12X\n\x0bpickup_type\x18\x01 \x01(\x0e\x32\x43.transit_realtime.MfdzStopTimePropertiesExtension.DropOffPickupType\x12Y\n\x0c\x64ropoff_type\x18\x02 \x01(\x0e\x32\x43.transit_realtime.MfdzStopTimePropertiesExtension.DropOffPickupType\"X\n\x11\x44ropOffPickupType\x12\x0b\n\x07REGULAR\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x10\n\x0cPHONE_AGENCY\x10\x02\x12\x1a\n\x16\x43OORDINATE_WITH_DRIVER\x10\x03:i\n\x0ftrip_descriptor\x12 .transit_realtime.TripDescriptor\x18\xf5\x07 \x01(\x0b\x32-.transit_realtime.MfdzTripDescriptorExtension:\x90\x01\n\x14stop_time_properties\x12>.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties\x18\xf5\x07 \x01(\x0b\x32\x31.transit_realtime.MfdzStopTimePropertiesExtensionB\t\n\x07\x64\x65.mfdz') diff --git a/amarillo/app/services/regions.py b/amarillo/app/services/regions.py index dfb9c2c..2819652 100644 --- a/amarillo/app/services/regions.py +++ b/amarillo/app/services/regions.py @@ -2,7 +2,7 @@ import json from glob import glob from typing import Dict -from app.models.Carpool import Region +from amarillo.app.models.Carpool import Region class RegionService: diff --git a/amarillo/app/services/stops.py b/amarillo/app/services/stops.py index 948e489..baeb4fe 100644 --- a/amarillo/app/services/stops.py +++ b/amarillo/app/services/stops.py @@ -1,7 +1,7 @@ import csv import geopandas as gpd import pandas as pd -from app.models.Carpool import StopTime +from amarillo.app.models.Carpool import StopTime from contextlib import closing from shapely.geometry import Point, LineString from shapely.ops import transform diff --git a/amarillo/app/services/trips.py b/amarillo/app/services/trips.py index 0f87821..8899a0b 100644 --- a/amarillo/app/services/trips.py +++ b/amarillo/app/services/trips.py @@ -1,8 +1,8 @@ -from app.models.gtfs import GtfsTimeDelta, GtfsStopTime -from app.models.Carpool import MAX_STOPS_PER_TRIP, Carpool, Weekday, StopTime, PickupDropoffType -from app.services.gtfs_constants import * -from app.services.routing import RoutingService, RoutingException -from app.services.stops import is_carpooling_stop +from amarillo.app.models.gtfs import GtfsTimeDelta, GtfsStopTime +from amarillo.app.models.Carpool import MAX_STOPS_PER_TRIP, Carpool, Weekday, StopTime, PickupDropoffType +from amarillo.app.services.gtfs_constants import * +from amarillo.app.services.routing import RoutingService, RoutingException +from amarillo.app.services.stops import is_carpooling_stop from app.utils.utils import assert_folder_exists, is_older_than_days, yesterday, geodesic_distance_in_m from shapely.geometry import Point, LineString, box from geojson_pydantic.geometries import LineString as GeoJSONLineString