Fixed imports
This commit is contained in:
parent
2db04daa13
commit
908a13258a
|
|
@ -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__)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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__)
|
||||
|
||||
|
|
|
|||
|
|
@ -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__)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue