From cddff3aea2391237ce563b338c6e911f8e6f9038 Mon Sep 17 00:00:00 2001 From: Francia Csaba Date: Mon, 5 Feb 2024 14:41:07 +0100 Subject: [PATCH] moved gtfs_constants.py to enhancer --- .../plugins/enhancer/services/gtfs_constants.py | 14 ++++++++++++++ amarillo/plugins/enhancer/services/gtfs_export.py | 2 +- amarillo/plugins/enhancer/services/trips.py | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 amarillo/plugins/enhancer/services/gtfs_constants.py diff --git a/amarillo/plugins/enhancer/services/gtfs_constants.py b/amarillo/plugins/enhancer/services/gtfs_constants.py new file mode 100644 index 0000000..1e8f3af --- /dev/null +++ b/amarillo/plugins/enhancer/services/gtfs_constants.py @@ -0,0 +1,14 @@ +# Constants + +NO_BIKES_ALLOWED = 2 +RIDESHARING_ROUTE_TYPE = 1551 +CALENDAR_DATES_EXCEPTION_TYPE_ADDED = 1 +CALENDAR_DATES_EXCEPTION_TYPE_REMOVED = 2 +STOP_TIMES_STOP_TYPE_REGULARLY = 0 +STOP_TIMES_STOP_TYPE_NONE = 1 +STOP_TIMES_STOP_TYPE_PHONE_AGENCY = 2 +STOP_TIMES_STOP_TYPE_COORDINATE_DRIVER = 3 +STOP_TIMES_TIMEPOINT_APPROXIMATE = 0 +STOP_TIMES_TIMEPOINT_EXACT = 1 + +MFDZ_DEFAULT_UNCERTAINITY = 600 \ No newline at end of file diff --git a/amarillo/plugins/enhancer/services/gtfs_export.py b/amarillo/plugins/enhancer/services/gtfs_export.py index fb39425..9c0c26e 100644 --- a/amarillo/plugins/enhancer/services/gtfs_export.py +++ b/amarillo/plugins/enhancer/services/gtfs_export.py @@ -10,7 +10,7 @@ import re from amarillo.utils.utils import assert_folder_exists from amarillo.models.gtfs import GtfsTimeDelta, GtfsFeedInfo, GtfsAgency, GtfsRoute, GtfsStop, GtfsStopTime, GtfsTrip, GtfsCalendar, GtfsCalendarDate, GtfsShape from amarillo.services.stops import is_carpooling_stop -from amarillo.services.gtfs_constants import * +from amarillo.plugins.enhancer.services.gtfs_constants import * logger = logging.getLogger(__name__) diff --git a/amarillo/plugins/enhancer/services/trips.py b/amarillo/plugins/enhancer/services/trips.py index eab61a3..6a59f1d 100644 --- a/amarillo/plugins/enhancer/services/trips.py +++ b/amarillo/plugins/enhancer/services/trips.py @@ -1,6 +1,6 @@ from amarillo.models.gtfs import GtfsTimeDelta, GtfsStopTime from amarillo.models.Carpool import MAX_STOPS_PER_TRIP, Carpool, Weekday, StopTime, PickupDropoffType -from amarillo.services.gtfs_constants import * +from amarillo.plugins.enhancer.services.gtfs_constants import * from amarillo.services.routing import RoutingService, RoutingException from amarillo.services.stops import is_carpooling_stop from amarillo.utils.utils import assert_folder_exists, is_older_than_days, yesterday, geodesic_distance_in_m