diff options
| -rw-r--r-- | .github/workflows/deploy.yml | 12 | ||||
| -rw-r--r-- | Costasdev.Busurbano.sln.DotSettings.user | 15 | ||||
| -rw-r--r-- | Costasdev.Busurbano.slnx | 7 | ||||
| -rw-r--r-- | Enmarcha.slnx | 8 | ||||
| -rw-r--r-- | Taskfile.yml | 15 | ||||
| -rw-r--r-- | route-planning.prompt.md | 25 | ||||
| -rw-r--r-- | src/Costasdev.Busurbano.Backend/Configuration/AppConfiguration.cs | 25 | ||||
| -rw-r--r-- | src/Costasdev.Busurbano.Backend/Controllers/VigoController.cs | 147 | ||||
| -rw-r--r-- | src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/DirectionId.cs | 7 | ||||
| -rw-r--r-- | src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/ExceptionType.cs | 7 | ||||
| -rw-r--r-- | src/Costasdev.Busurbano.ServiceViewer/Views/_ViewImports.cshtml | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/.gitignore (renamed from src/Costasdev.Busurbano.Backend/.gitignore) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Configuration/AppConfiguration.cs | 7 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/ArrivalsController.cs (renamed from src/Costasdev.Busurbano.Backend/Controllers/ArrivalsController.cs) | 18 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/RoutePlannerController.cs (renamed from src/Costasdev.Busurbano.Backend/Controllers/RoutePlannerController.cs) | 12 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/TileController.cs (renamed from src/Costasdev.Busurbano.Backend/Controllers/TileController.cs) | 18 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/TrafficDataController.cs (renamed from src/Costasdev.Busurbano.Backend/Controllers/TrafficDataController.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/TransitController.cs (renamed from src/Costasdev.Busurbano.Backend/Controllers/TransitController.cs) | 16 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Controllers/VigoController.cs | 69 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Data/xunta_fares.csv (renamed from src/Costasdev.Busurbano.Backend/Data/xunta_fares.csv) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Enmarcha.Backend.csproj (renamed from src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj) | 6 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Extensions/StopScheduleExtensions.cs (renamed from src/Costasdev.Busurbano.Backend/Extensions/StopScheduleExtensions.cs) | 9 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Helpers/ContrastHelper.cs (renamed from src/Costasdev.Busurbano.Backend/Helpers/ContrastHelper.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Helpers/SortingHelper.cs (renamed from src/Costasdev.Busurbano.Backend/Helpers/SortingHelper.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Program.cs (renamed from src/Costasdev.Busurbano.Backend/Program.cs) | 11 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Properties/launchSettings.json (renamed from src/Costasdev.Busurbano.Backend/Properties/launchSettings.json) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/ArrivalsPipeline.cs (renamed from src/Costasdev.Busurbano.Backend/Services/ArrivalsPipeline.cs) | 6 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/FareService.cs (renamed from src/Costasdev.Busurbano.Backend/Services/FareService.cs) | 16 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/FeedService.cs (renamed from src/Costasdev.Busurbano.Backend/Services/FeedService.cs) | 10 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/IGeocodingService.cs (renamed from src/Costasdev.Busurbano.Backend/Services/IGeocodingService.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/LineFormatterService.cs (renamed from src/Costasdev.Busurbano.Backend/Services/LineFormatterService.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/NominatimGeocodingService.cs (renamed from src/Costasdev.Busurbano.Backend/Services/NominatimGeocodingService.cs) | 10 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/OtpService.cs (renamed from src/Costasdev.Busurbano.Backend/Services/OtpService.cs) | 14 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/AbstractProcessor.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Processors/AbstractProcessor.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/CorunaRealTimeProcessor.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Processors/CorunaRealTimeProcessor.cs) | 19 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/FeedConfigProcessor.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Processors/FeedConfigProcessor.cs) | 6 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/FilterAndSortProcessor.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Processors/FilterAndSortProcessor.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/MarqueeProcessor.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Processors/MarqueeProcessor.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/NextStopsProcessor.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Processors/NextStopsProcessor.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/SantiagoRealTimeProcessor.cs | 88 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/ShapeProcessor.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Processors/ShapeProcessor.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Processors/VitrasaRealTimeProcessor.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Processors/VitrasaRealTimeProcessor.cs) | 10 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Providers/ITransitProvider.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Providers/ITransitProvider.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Providers/RenfeTransitProvider.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Providers/RenfeTransitProvider.cs) | 24 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Providers/VitrasaTransitProvider.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Providers/VitrasaTransitProvider.cs) | 64 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/Providers/XuntaFareProvider.cs (renamed from src/Costasdev.Busurbano.Backend/Services/Providers/XuntaFareProvider.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Services/ShapeTraversalService.cs (renamed from src/Costasdev.Busurbano.Backend/Services/ShapeTraversalService.cs) | 66 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/Arrivals/Arrival.cs (renamed from src/Costasdev.Busurbano.Backend/Types/Arrivals/Arrival.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/Arrivals/StopArrivalsResponse.cs (renamed from src/Costasdev.Busurbano.Backend/Types/Arrivals/StopArrivalsResponse.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/ConsolidatedCirculation.cs (renamed from src/Costasdev.Busurbano.Backend/Types/ConsolidatedCirculation.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/Nominatim/NominatimModels.cs (renamed from src/Costasdev.Busurbano.Backend/Types/Nominatim/NominatimModels.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/Otp/OtpModels.cs (renamed from src/Costasdev.Busurbano.Backend/Types/Otp/OtpModels.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/Planner/PlannerResponse.cs (renamed from src/Costasdev.Busurbano.Backend/Types/Planner/PlannerResponse.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/StopSchedule.cs (renamed from src/Costasdev.Busurbano.Backend/Types/StopSchedule.cs) | 42 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/Transit/RouteDtos.cs (renamed from src/Costasdev.Busurbano.Backend/Types/Transit/RouteDtos.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/Types/VigoSchedules.cs (renamed from src/Costasdev.Busurbano.Backend/Types/VigoSchedules.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/appsettings.Development.json (renamed from src/Costasdev.Busurbano.Backend/appsettings.Development.json) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Backend/appsettings.json (renamed from src/Costasdev.Busurbano.Backend/appsettings.json) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/.gitignore (renamed from src/Costasdev.Busurbano.ServiceViewer/.gitignore) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/AppDbContextDesignTimeFactory.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/AppDbContextDesignTimeFactory.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Controllers/ServicesController.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Controllers/ServicesController.cs) | 12 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Controllers/StylesheetController.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Controllers/StylesheetController.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/AppDbContext.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/AppDbContext.cs) | 6 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Extensions/TimeExtensions.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Extensions/TimeExtensions.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/DirectionId.cs | 7 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/ExceptionType.cs | 7 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/RouteType.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/RouteType.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/TripBikesAllowed.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/TripBikesAllowed.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/TripWheelchairAccessible.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/TripWheelchairAccessible.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/WheelchairBoarding.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/WheelchairBoarding.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Feed.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Feed.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsAgency.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsAgency.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendar.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsRoute.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsRoute.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsStop.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsStop.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsStopTime.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsStopTime.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsTrip.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsTrip.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/20251211153852_Initial.Designer.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/20251211153852_Initial.Designer.cs) | 54 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/20251211153852_Initial.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/20251211153852_Initial.cs) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/AppDbContextModelSnapshot.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/AppDbContextModelSnapshot.cs) | 54 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Data/QueryExtensions/GtfsCalendarQueryExtensions.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Data/QueryExtensions/GtfsCalendarQueryExtensions.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Enmarcha.Experimental.ServiceViewer.csproj (renamed from src/Costasdev.Busurbano.ServiceViewer/Costasdev.Busurbano.ServiceViewer.csproj) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Program.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Program.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Properties/launchSettings.json (renamed from src/Costasdev.Busurbano.ServiceViewer/Properties/launchSettings.json) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/Services/DaysInFeed.cshtml (renamed from src/Costasdev.Busurbano.ServiceViewer/Views/Services/DaysInFeed.cshtml) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/Services/DaysInFeed.cshtml.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Views/Services/DaysInFeed.cshtml.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServiceDetails.cshtml (renamed from src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServiceDetails.cshtml) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServiceDetails.cshtml.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServiceDetails.cshtml.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServicesInDay.cshtml (renamed from src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServicesInDay.cshtml) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServicesInDay.cshtml.cs (renamed from src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServicesInDay.cshtml.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/Shared/_Layout.cshtml (renamed from src/Costasdev.Busurbano.ServiceViewer/Views/Shared/_Layout.cshtml) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/_ViewImports.cshtml | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/Views/_ViewStart.cshtml (renamed from src/Costasdev.Busurbano.ServiceViewer/Views/_ViewStart.cshtml) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/appsettings.json (renamed from src/Costasdev.Busurbano.ServiceViewer/appsettings.json) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/common.css (renamed from src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/common.css) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/days_in_feed.css (renamed from src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/days_in_feed.css) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/service_details.css (renamed from src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/service_details.css) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/services_in_day.css (renamed from src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/services_in_day.css) | 0 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/Enmarcha.Sources.OpenTripPlannerGql.csproj (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Costasdev.Busurbano.Sources.OpenTripPlannerGql.csproj) | 1 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/OpenTripPlannerClient.cs (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/OpenTripPlannerClient.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/Queries/PlanConnectionContent.cs (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/PlanConnectionContent.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/Queries/RouteDetailsContent.cs (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/RouteDetailsContent.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/Queries/RoutesListContent.cs (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/RoutesListContent.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/Queries/StopTile.cs (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/StopTile.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/Queries/StopsInfo.cs (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/StopsInfo.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.OpenTripPlannerGql/ResponseTypes.cs (renamed from src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/ResponseTypes.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.TranviasCoruna/CorunaRealtimeEstimatesProvider.cs (renamed from src/Costasdev.Busurbano.Sources.TranviasCoruna/CorunaRealtimeEstimatesProvider.cs) | 4 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.TranviasCoruna/Enmarcha.Sources.TranviasCoruna.csproj | 10 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.TranviasCoruna/Response.cs (renamed from src/Costasdev.Busurbano.Sources.TranviasCoruna/Response.cs) | 2 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.Tussa/Enmarcha.Sources.Tussa.csproj (renamed from src/Costasdev.Busurbano.Sources.TranviasCoruna/Costasdev.Busurbano.Sources.TranviasCoruna.csproj) | 1 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.Tussa/Response.cs | 34 | ||||
| -rw-r--r-- | src/Enmarcha.Sources.Tussa/SantiagoRealtimeEstimatesProvider.cs | 40 | ||||
| -rw-r--r-- | src/frontend/app/components/layout/Header.tsx | 2 | ||||
| -rw-r--r-- | src/frontend/app/contexts/PageTitleContext.tsx | 8 | ||||
| -rw-r--r-- | src/frontend/app/i18n/locales/en-GB.json | 4 | ||||
| -rw-r--r-- | src/frontend/app/i18n/locales/es-ES.json | 4 | ||||
| -rw-r--r-- | src/frontend/app/i18n/locales/gl-ES.json | 4 | ||||
| -rw-r--r-- | src/frontend/app/root.tsx | 2 | ||||
| -rw-r--r-- | src/frontend/app/routes/map.tsx | 4 | ||||
| -rw-r--r-- | src/frontend/app/routes/routes.tsx | 2 | ||||
| -rw-r--r-- | src/frontend/public/maps/spritesheet/sprite.json | 8 | ||||
| -rw-r--r-- | src/frontend/public/maps/spritesheet/sprite@2x.json | 8 |
124 files changed, 588 insertions, 653 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c8beb83..827a510 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,7 +28,7 @@ jobs: frontend: - 'src/frontend/**' backend: - - 'src/Costasdev.Busurbano.Backend/**' + - 'src/Enmarcha.Backend/**' - 'src/common/**' stops-script: - 'src/gtfs_perstop_report/**' @@ -84,7 +84,7 @@ jobs: with: dotnet-version: '9.0.x' - name: Build backend - run: dotnet publish -c Release -r linux-arm64 --self-contained false src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj -o dist/backend + run: dotnet publish -c Release -r linux-arm64 --self-contained false src/Enmarcha.Backend/Enmarcha.Backend.csproj -o dist/backend - name: Archive Backend Artifact uses: actions/upload-artifact@v5 with: @@ -167,19 +167,19 @@ jobs: - name: Stop service if: needs.detect-changes.outputs.backend == 'true' - run: ssh ${{ secrets.TARGET_USER }}@${{ secrets.TARGET_HOST }} "echo ${{ secrets.TARGET_PASSWORD }} | sudo -S /usr/bin/systemctl stop busurbano" + run: ssh ${{ secrets.TARGET_USER }}@${{ secrets.TARGET_HOST }} "echo ${{ secrets.TARGET_PASSWORD }} | sudo -S /usr/bin/systemctl stop enmarcha" - name: Upload backend if: needs.detect-changes.outputs.backend == 'true' - run: scp -r dist/backend/* app@${{ secrets.TARGET_HOST }}:/opt/busurbano/ + run: scp -r dist/backend/* app@${{ secrets.TARGET_HOST }}:/opt/enmarcha/ - name: Allow execution if: needs.detect-changes.outputs.backend == 'true' - run: ssh ${{ secrets.TARGET_USER }}@${{ secrets.TARGET_HOST }} "chmod +x /opt/busurbano/Costasdev.Busurbano.Backend" + run: ssh ${{ secrets.TARGET_USER }}@${{ secrets.TARGET_HOST }} "chmod +x /opt/enmarcha/Enmarcha.Backend" - name: Start service if: needs.detect-changes.outputs.backend == 'true' - run: ssh ${{ secrets.TARGET_USER }}@${{ secrets.TARGET_HOST }} "echo ${{ secrets.TARGET_PASSWORD }} | sudo -S /usr/bin/systemctl start busurbano" + run: ssh ${{ secrets.TARGET_USER }}@${{ secrets.TARGET_HOST }} "echo ${{ secrets.TARGET_PASSWORD }} | sudo -S /usr/bin/systemctl start enmarcha" - name: Deploy stop report script if: needs.detect-changes.outputs.stops-script == 'true' diff --git a/Costasdev.Busurbano.sln.DotSettings.user b/Costasdev.Busurbano.sln.DotSettings.user deleted file mode 100644 index c62ff99..0000000 --- a/Costasdev.Busurbano.sln.DotSettings.user +++ /dev/null @@ -1,15 +0,0 @@ -<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABadHttpRequestException_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003Feb8b15bbd87dbaf43f5fb0ed7c8c509858fe1f6d315ee4b847c19e57cea9c7_003FBadHttpRequestException_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACsvReader_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FSourcesCache_003Ff7b87edd534764eebf2388a77d49e5cd9c6d49eb6788dca9b1c07d4545412715_003FCsvReader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADebugger_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FSourcesCache_003F5af9fc9e4e9656f37613efe36625f832168e8333f86d484aaca47099ae6238_003FDebugger_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADefaultInterpolatedStringHandler_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F41cc61bcbc19425f8f9018ba4b79c072e8e918_003F55_003F213eba6d_003FDefaultInterpolatedStringHandler_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGroupBySplitQueryingEnumerable_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F4fab889b74c635b27f28546ab8e2217d71cbe9b7a1a9b18c88e5a54afc1681a_003FGroupBySplitQueryingEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AHttpResponseMessage_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F4cfeb8b377bc81e1fbb5f7d7a02492cb6ac23e88c8c9d7155944f0716f3d4b_003FHttpResponseMessage_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonSerializerOptions_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F5ef7f3c9db445621211faddebc3c1c9bb48a942f1b8cba4caa2501466f85f_003FJsonSerializerOptions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARoute_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F964445ad83964c2a929a3455c240c018d2928_003F8d_003F69210310_003FRoute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARoute_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fa7b3f1f181ee7e5fc0b7f39db191c0ac4557ecb954e7ee3dcad60d6181c165_003FRoute_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASingleQueryingEnumerable_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F413341ec7da6e42cb630e52ba9208edacb2e7267da1d9296f51628fcd35e81d9_003FSingleQueryingEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATimeOnly_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003F9ef1339c59fbf37dc6e64e8aed649711d2db7354d1141113de1c43ac6325b32_003FTimeOnly_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AVigoTransitApiClient_002Ecs_002Fl_003AC_0021_003FUsers_003Fariel_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F124c78a45c0043088c5af452a969bf098400_003F02_003Fe7a1a74c_003FVigoTransitApiClient_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> - - </wpf:ResourceDictionary>
\ No newline at end of file diff --git a/Costasdev.Busurbano.slnx b/Costasdev.Busurbano.slnx deleted file mode 100644 index b01dea8..0000000 --- a/Costasdev.Busurbano.slnx +++ /dev/null @@ -1,7 +0,0 @@ -<Solution> - <Project Path="src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Costasdev.Busurbano.Sources.OpenTripPlannerGql.csproj" /> - <Project Path="src/Costasdev.Busurbano.Sources.TranviasCoruna/Costasdev.Busurbano.Sources.TranviasCoruna.csproj" /> - <Project Path="src\Costasdev.Busurbano.Backend\Costasdev.Busurbano.Backend.csproj" /> - <Project Path="src\Costasdev.Busurbano.ServiceViewer\Costasdev.Busurbano.ServiceViewer.csproj" /> - <Project Path="src\frontend\frontend.esproj" /> -</Solution> diff --git a/Enmarcha.slnx b/Enmarcha.slnx new file mode 100644 index 0000000..fbe16a7 --- /dev/null +++ b/Enmarcha.slnx @@ -0,0 +1,8 @@ +<Solution> + <Project Path="src/Enmarcha.Backend/Enmarcha.Backend.csproj" /> + <Project Path="src/Enmarcha.Experimental.ServiceViewer/Enmarcha.Experimental.ServiceViewer.csproj" /> + <Project Path="src/Enmarcha.Sources.OpenTripPlannerGql/Enmarcha.Sources.OpenTripPlannerGql.csproj" /> + <Project Path="src/Enmarcha.Sources.TranviasCoruna/Enmarcha.Sources.TranviasCoruna.csproj" /> + <Project Path="src/Enmarcha.Sources.Tussa/Enmarcha.Sources.Tussa.csproj" /> + <Project Path="src\frontend\frontend.esproj" /> +</Solution> diff --git a/Taskfile.yml b/Taskfile.yml index baf4a95..d75d109 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -4,7 +4,7 @@ tasks: dev-backend: desc: Run backend in watch mode. cmds: - - dotnet watch --project src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj + - dotnet watch --project src/Enmarcha.Backend/Enmarcha.Backend.csproj dev-frontend: desc: Run frontend development server. @@ -15,24 +15,29 @@ tasks: desc: Generates the protobuf bindings for C# and Python cmds: - protoc --python_out=./src/gtfs_perstop_report/src/proto --pyi_out=./src/gtfs_perstop_report/src/proto --proto_path=./src/common ./src/common/stop_schedule.proto - - protoc --csharp_out=./src/Costasdev.Busurbano.Backend/Types/ --proto_path=./src/common ./src/common/stop_schedule.proto + - protoc --csharp_out=./src/Enmarcha.Backend/Types/ --proto_path=./src/common ./src/common/stop_schedule.proto build-backend: desc: Publish backend in Release mode. cmds: - - dotnet publish -c Release -o ./dist/backend src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj + - dotnet publish -c Release -o ./dist/backend src/Enmarcha.Backend/Enmarcha.Backend.csproj + + build-backend-prod: + desc: Publish backend for Prod server + cmds: + - dotnet publish -c Release -r linux-arm64 --self-contained false src/Enmarcha.Backend/Enmarcha.Backend.csproj -o dist/backend build-frontend: desc: Build frontend bundle. cmds: - npm run build --prefix src/frontend - mkdir dist/frontend - - mv src/frontend/build/client/ dist/frontend/ + - cp -r src/frontend/build/client/* dist/frontend format: desc: Format backend solution. cmds: - - dotnet format --verbosity diagnostic src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj + - dotnet format --verbosity diagnostic src/Enmarcha.Backend/Enmarcha.Backend.csproj - npx prettier --write "src/frontend/**/*.{ts,tsx,css}" - uvx ruff format ./src/gtfs_perstop_report ./src/stop_downloader diff --git a/route-planning.prompt.md b/route-planning.prompt.md deleted file mode 100644 index 13cd1bf..0000000 --- a/route-planning.prompt.md +++ /dev/null @@ -1,25 +0,0 @@ -## Plan: Implement Route Planning with OTP Integration - -This plan introduces a route planning feature by creating a backend proxy for the Vigo OpenTripPlanner API. The backend will standardize responses and manage routing parameters, while the frontend will provide the search UI, map visualization, and local persistence of results. - -### Steps - -1. **Backend Config**: Update [AppConfiguration.cs](src/Costasdev.Busurbano.Backend/Configuration/AppConfiguration.cs) and `appsettings.json` with OTP URLs and default routing parameters (e.g., `walkSpeed`, `maxWalkDistance`). -2. **Backend Models**: Create `OtpResponse` models for deserialization and "Standardized" DTOs (`RoutePlan`, `Itinerary`, `Leg`) in `Types/` to decouple the API. - - _Note_: The Standardized DTO should convert OTP's "Encoded Polyline" geometry into standard GeoJSON LineStrings for easier consumption by the frontend. -3. **Backend Service**: Implement `OtpService` to fetch data from the 3 OTP endpoints (Autocomplete, Reverse, Plan) and map them to Standardized DTOs. - - _Caching_: Implement `IMemoryCache` for Autocomplete and Reverse Geocoding requests to reduce load on the city API. -4. **Backend Controller**: Create `RoutePlannerController` to expose `/api/planner/*` endpoints, injecting the configured parameters into OTP requests. -5. **Frontend API**: Create `app/data/PlannerApi.ts` to consume the new backend endpoints. -6. **Frontend Logic**: Implement a hook to manage route state and persist results to `localStorage` with an expiry check (1-2 hours). -7. **Frontend UI**: Create `app/routes/planner.tsx` handling three distinct states/views: - - **Planner Form**: Input for Origin, Destination, and Departure/Arrival time. - - **Results List**: A summary list of available itineraries (walking duration, bus lines, total time). - - **Result Detail**: A map view with a non-modal bottom sheet displaying precise step-by-step instructions (walk to X, take line Y, etc.). -8. **Frontend Routing**: Register the new `/planner` route in [app/routes.tsx](src/frontend/app/routes.tsx). - -### Further Considerations - -1. **Caching**: Confirmed. We will use `IMemoryCache` in the backend for geocoding services as a stopgap until a custom solution is built. -2. **Map Geometry**: The backend will handle the decoding of OTP's Encoded Polyline format, serving standard GeoJSON to the frontend. -3. **Error Handling**: In case of errors (no route found, service down), the UI will display a large, friendly explanatory message occupying the main content area. diff --git a/src/Costasdev.Busurbano.Backend/Configuration/AppConfiguration.cs b/src/Costasdev.Busurbano.Backend/Configuration/AppConfiguration.cs deleted file mode 100644 index 9e4d12f..0000000 --- a/src/Costasdev.Busurbano.Backend/Configuration/AppConfiguration.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace Costasdev.Busurbano.Backend.Configuration; - -public class AppConfiguration -{ - public required string VitrasaScheduleBasePath { get; set; } - public required string RenfeScheduleBasePath { get; set; } - - [Obsolete] - public required string OtpGeocodingBaseUrl { get; set; } = "https://planificador-rutas-api.vigo.org/v1"; - [Obsolete] - public required string OtpPlannerBaseUrl { get; set; } = "https://planificador-rutas.vigo.org/otp/routers/default"; - public required string OpenTripPlannerBaseUrl { get; set; } - public string NominatimBaseUrl { get; set; } = "https://nominatim.openstreetmap.org"; - - // Default Routing Parameters - public double WalkSpeed { get; set; } = 1.4; - public int MaxWalkDistance { get; set; } = 1000; - public int MaxWalkTime { get; set; } = 20; - public int NumItineraries { get; set; } = 4; - - // Comfort/Slack Parameters - public int TransferSlackSeconds { get; set; } = 120; // Extra buffer for transfers - public int MinTransferTimeSeconds { get; set; } = 120; // Minimum transfer time - public double WalkReluctance { get; set; } = 2.0; // Slightly penalize walking to add slack -} diff --git a/src/Costasdev.Busurbano.Backend/Controllers/VigoController.cs b/src/Costasdev.Busurbano.Backend/Controllers/VigoController.cs deleted file mode 100644 index 642cccb..0000000 --- a/src/Costasdev.Busurbano.Backend/Controllers/VigoController.cs +++ /dev/null @@ -1,147 +0,0 @@ -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Services; -using Costasdev.Busurbano.Backend.Services.Providers; -using Costasdev.VigoTransitApi; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Options; - -namespace Costasdev.Busurbano.Backend.Controllers; - -[ApiController] -[Route("api/vigo")] -public partial class VigoController : ControllerBase -{ - private readonly ILogger<VigoController> _logger; - private readonly VigoTransitApiClient _api; - private readonly AppConfiguration _configuration; - private readonly ShapeTraversalService _shapeService; - private readonly VitrasaTransitProvider _vitrasaProvider; - private readonly RenfeTransitProvider _renfeProvider; - - public VigoController( - HttpClient http, - IOptions<AppConfiguration> options, - ILogger<VigoController> logger, - ShapeTraversalService shapeService, - VitrasaTransitProvider vitrasaProvider, - RenfeTransitProvider renfeProvider) - { - _logger = logger; - _api = new VigoTransitApiClient(http); - _configuration = options.Value; - _shapeService = shapeService; - _vitrasaProvider = vitrasaProvider; - _renfeProvider = renfeProvider; - } - - [HttpGet("GetShape")] - public async Task<IActionResult> GetShape( - [FromQuery] string shapeId, - [FromQuery] int? startPointIndex = null, - [FromQuery] double? busLat = null, - [FromQuery] double? busLon = null, - [FromQuery] int? busShapeIndex = null, - [FromQuery] double? stopLat = null, - [FromQuery] double? stopLon = null, - [FromQuery] int? stopShapeIndex = null - ) - { - var path = await _shapeService.GetShapePathAsync(shapeId, 0); - if (path == null) - { - return NotFound(); - } - - // Determine bus point - object? busPoint = null; - if (busShapeIndex.HasValue && busShapeIndex.Value >= 0 && busShapeIndex.Value < path.Count) - { - var p = path[busShapeIndex.Value]; - busPoint = new { lat = p.Latitude, lon = p.Longitude, index = busShapeIndex.Value }; - } - else if (busLat.HasValue && busLon.HasValue) - { - var idx = await _shapeService.FindClosestPointIndexAsync(shapeId, busLat.Value, busLon.Value); - if (idx.HasValue && idx.Value >= 0 && idx.Value < path.Count) - { - var p = path[idx.Value]; - busPoint = new { lat = p.Latitude, lon = p.Longitude, index = idx.Value }; - } - } - else if (startPointIndex.HasValue && startPointIndex.Value >= 0 && startPointIndex.Value < path.Count) - { - var p = path[startPointIndex.Value]; - busPoint = new { lat = p.Latitude, lon = p.Longitude, index = startPointIndex.Value }; - } - - // Determine stop point - object? stopPoint = null; - if (stopShapeIndex.HasValue && stopShapeIndex.Value >= 0 && stopShapeIndex.Value < path.Count) - { - var p = path[stopShapeIndex.Value]; - stopPoint = new { lat = p.Latitude, lon = p.Longitude, index = stopShapeIndex.Value }; - } - else if (stopLat.HasValue && stopLon.HasValue) - { - var idx = await _shapeService.FindClosestPointIndexAsync(shapeId, stopLat.Value, stopLon.Value); - if (idx.HasValue && idx.Value >= 0 && idx.Value < path.Count) - { - var p = path[idx.Value]; - stopPoint = new { lat = p.Latitude, lon = p.Longitude, index = idx.Value }; - } - } - - // Convert to GeoJSON LineString - var coordinates = path.Select(p => new[] { p.Longitude, p.Latitude }).ToList(); - - var geoJson = new - { - type = "Feature", - geometry = new - { - type = "LineString", - coordinates = coordinates - }, - properties = new - { - busPoint, - stopPoint - } - }; - - return Ok(geoJson); - } - - [HttpGet("GetConsolidatedCirculations")] - public async Task<IActionResult> GetConsolidatedCirculations( - [FromQuery] string stopId - ) - { - // Use Europe/Madrid timezone consistently to avoid UTC/local skew - var tz = TimeZoneInfo.FindSystemTimeZoneById("Europe/Madrid"); - var nowLocal = TimeZoneInfo.ConvertTime(DateTime.UtcNow, tz); - - ITransitProvider provider; - string effectiveStopId; - - if (stopId.StartsWith("renfe:")) - { - provider = _renfeProvider; - effectiveStopId = stopId.Substring("renfe:".Length); - } - else if (stopId.StartsWith("vitrasa:")) - { - provider = _vitrasaProvider; - effectiveStopId = stopId.Substring("vitrasa:".Length); - } - else - { - // Legacy/Default - provider = _vitrasaProvider; - effectiveStopId = stopId; - } - - var result = await provider.GetCirculationsAsync(effectiveStopId, nowLocal); - return Ok(result); - } -} diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/DirectionId.cs b/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/DirectionId.cs deleted file mode 100644 index cbcf80b..0000000 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/DirectionId.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Costasdev.ServiceViewer.Data.Gtfs.Enums; - -public enum DirectionId -{ - Outbound = 0, - Inbound = 1 -} diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/ExceptionType.cs b/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/ExceptionType.cs deleted file mode 100644 index 0ad0345..0000000 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/ExceptionType.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Costasdev.ServiceViewer.Data.Gtfs.Enums; - -public enum ExceptionType -{ - Added = 1, - Removed = 2 -} diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/_ViewImports.cshtml b/src/Costasdev.Busurbano.ServiceViewer/Views/_ViewImports.cshtml deleted file mode 100644 index 785dc40..0000000 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/_ViewImports.cshtml +++ /dev/null @@ -1,2 +0,0 @@ -@using Costasdev.ServiceViewer.Views.Services -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/src/Costasdev.Busurbano.Backend/.gitignore b/src/Enmarcha.Backend/.gitignore index ff5b00c..ff5b00c 100644 --- a/src/Costasdev.Busurbano.Backend/.gitignore +++ b/src/Enmarcha.Backend/.gitignore diff --git a/src/Enmarcha.Backend/Configuration/AppConfiguration.cs b/src/Enmarcha.Backend/Configuration/AppConfiguration.cs new file mode 100644 index 0000000..e86ac39 --- /dev/null +++ b/src/Enmarcha.Backend/Configuration/AppConfiguration.cs @@ -0,0 +1,7 @@ +namespace Enmarcha.Backend.Configuration; + +public class AppConfiguration +{ + public required string OpenTripPlannerBaseUrl { get; set; } + public string NominatimBaseUrl { get; set; } = "https://nominatim.openstreetmap.org"; +} diff --git a/src/Costasdev.Busurbano.Backend/Controllers/ArrivalsController.cs b/src/Enmarcha.Backend/Controllers/ArrivalsController.cs index a0e8505..7260fb4 100644 --- a/src/Costasdev.Busurbano.Backend/Controllers/ArrivalsController.cs +++ b/src/Enmarcha.Backend/Controllers/ArrivalsController.cs @@ -1,16 +1,16 @@ using System.Net; -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Helpers; -using Costasdev.Busurbano.Backend.Services; -using Costasdev.Busurbano.Backend.Types; -using Costasdev.Busurbano.Backend.Types.Arrivals; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Helpers; +using Enmarcha.Backend.Services; +using Enmarcha.Backend.Types; +using Enmarcha.Backend.Types.Arrivals; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; -namespace Costasdev.Busurbano.Backend.Controllers; +namespace Enmarcha.Backend.Controllers; [ApiController] [Route("api/stops")] @@ -174,7 +174,7 @@ public partial class ArrivalsController : ControllerBase { string feedId = id.Split(':', 2)[0]; - if (feedId is "vitrasa" or "coruna") + if (feedId is "vitrasa" or "tranvias" or "tussa") { return 0; } diff --git a/src/Costasdev.Busurbano.Backend/Controllers/RoutePlannerController.cs b/src/Enmarcha.Backend/Controllers/RoutePlannerController.cs index a7faf44..c7201b0 100644 --- a/src/Costasdev.Busurbano.Backend/Controllers/RoutePlannerController.cs +++ b/src/Enmarcha.Backend/Controllers/RoutePlannerController.cs @@ -1,13 +1,13 @@ using System.Net; -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Services; -using Costasdev.Busurbano.Backend.Types.Planner; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Services; +using Enmarcha.Backend.Types.Planner; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; -namespace Costasdev.Busurbano.Backend.Controllers; +namespace Enmarcha.Backend.Controllers; [ApiController] [Route("api/planner")] diff --git a/src/Costasdev.Busurbano.Backend/Controllers/TileController.cs b/src/Enmarcha.Backend/Controllers/TileController.cs index 0e550a3..3459997 100644 --- a/src/Costasdev.Busurbano.Backend/Controllers/TileController.cs +++ b/src/Enmarcha.Backend/Controllers/TileController.cs @@ -6,14 +6,14 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Caching.Memory; using System.Text.Json; -using Costasdev.Busurbano.Backend.Helpers; -using Costasdev.Busurbano.Backend.Services; -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Helpers; +using Enmarcha.Backend.Services; using Microsoft.Extensions.Options; -namespace Costasdev.Busurbano.Backend.Controllers; +namespace Enmarcha.Backend.Controllers; [ApiController] [Route("api/tiles")] @@ -170,8 +170,8 @@ public class TileController : ControllerBase return feedId switch { "vitrasa" => "stop-vitrasa", - "santiago" => "stop-santiago", - "coruna" => "stop-coruna", + "tussa" => "stop-tussa", + "tranvias" => "stop-tranvias", "xunta" => "stop-xunta", "renfe" => "stop-renfe", "feve" => "stop-feve", @@ -183,7 +183,7 @@ public class TileController : ControllerBase { return feedId switch { - "vitrasa" or "santiago" or "coruna" => "bus", + "vitrasa" or "tussa" or "tranvias" => "bus", "xunta" => "coach", "renfe" or "feve" => "train", _ => "unknown", diff --git a/src/Costasdev.Busurbano.Backend/Controllers/TrafficDataController.cs b/src/Enmarcha.Backend/Controllers/TrafficDataController.cs index 0542054..6a95d49 100644 --- a/src/Costasdev.Busurbano.Backend/Controllers/TrafficDataController.cs +++ b/src/Enmarcha.Backend/Controllers/TrafficDataController.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Caching.Memory; using NetTopologySuite.Features; using NetTopologySuite.IO; -namespace Costasdev.Busurbano.Backend.Controllers; +namespace Enmarcha.Backend.Controllers; [ApiController] [Route("api")] diff --git a/src/Costasdev.Busurbano.Backend/Controllers/TransitController.cs b/src/Enmarcha.Backend/Controllers/TransitController.cs index b519ea7..62b3725 100644 --- a/src/Costasdev.Busurbano.Backend/Controllers/TransitController.cs +++ b/src/Enmarcha.Backend/Controllers/TransitController.cs @@ -1,14 +1,14 @@ -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Helpers; -using Costasdev.Busurbano.Backend.Services; -using Costasdev.Busurbano.Backend.Types.Transit; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Helpers; +using Enmarcha.Backend.Services; +using Enmarcha.Backend.Types.Transit; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; -namespace Costasdev.Busurbano.Backend.Controllers; +namespace Enmarcha.Backend.Controllers; [ApiController] [Route("api/transit")] @@ -40,7 +40,7 @@ public class TransitController : ControllerBase { if (feeds.Length == 0) { - feeds = ["santiago", "vitrasa", "coruna", "feve"]; + feeds = ["tussa", "vitrasa", "tranvias", "feve"]; } var serviceDate = DateTime.Now.ToString("yyyy-MM-dd"); diff --git a/src/Enmarcha.Backend/Controllers/VigoController.cs b/src/Enmarcha.Backend/Controllers/VigoController.cs new file mode 100644 index 0000000..4199251 --- /dev/null +++ b/src/Enmarcha.Backend/Controllers/VigoController.cs @@ -0,0 +1,69 @@ +using Costasdev.VigoTransitApi; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Services; +using Enmarcha.Backend.Services.Providers; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; + +namespace Enmarcha.Backend.Controllers; + +[ApiController] +[Route("api/vigo")] +public partial class VigoController : ControllerBase +{ + private readonly ILogger<VigoController> _logger; + private readonly VigoTransitApiClient _api; + private readonly AppConfiguration _configuration; + private readonly ShapeTraversalService _shapeService; + private readonly VitrasaTransitProvider _vitrasaProvider; + private readonly RenfeTransitProvider _renfeProvider; + + public VigoController( + HttpClient http, + IOptions<AppConfiguration> options, + ILogger<VigoController> logger, + ShapeTraversalService shapeService, + VitrasaTransitProvider vitrasaProvider, + RenfeTransitProvider renfeProvider) + { + _logger = logger; + _api = new VigoTransitApiClient(http); + _configuration = options.Value; + _shapeService = shapeService; + _vitrasaProvider = vitrasaProvider; + _renfeProvider = renfeProvider; + } + + [HttpGet("GetConsolidatedCirculations")] + public async Task<IActionResult> GetConsolidatedCirculations( + [FromQuery] string stopId + ) + { + // Use Europe/Madrid timezone consistently to avoid UTC/local skew + var tz = TimeZoneInfo.FindSystemTimeZoneById("Europe/Madrid"); + var nowLocal = TimeZoneInfo.ConvertTime(DateTime.UtcNow, tz); + + ITransitProvider provider; + string effectiveStopId; + + if (stopId.StartsWith("renfe:")) + { + provider = _renfeProvider; + effectiveStopId = stopId.Substring("renfe:".Length); + } + else if (stopId.StartsWith("vitrasa:")) + { + provider = _vitrasaProvider; + effectiveStopId = stopId.Substring("vitrasa:".Length); + } + else + { + // Legacy/Default + provider = _vitrasaProvider; + effectiveStopId = stopId; + } + + var result = await provider.GetCirculationsAsync(effectiveStopId, nowLocal); + return Ok(result); + } +} diff --git a/src/Costasdev.Busurbano.Backend/Data/xunta_fares.csv b/src/Enmarcha.Backend/Data/xunta_fares.csv index 4bb32ab..4bb32ab 100644 --- a/src/Costasdev.Busurbano.Backend/Data/xunta_fares.csv +++ b/src/Enmarcha.Backend/Data/xunta_fares.csv diff --git a/src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj b/src/Enmarcha.Backend/Enmarcha.Backend.csproj index cf35f53..463d985 100644 --- a/src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj +++ b/src/Enmarcha.Backend/Enmarcha.Backend.csproj @@ -3,7 +3,6 @@ <TargetFramework>net10.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> - <RootNamespace>Costasdev.Busurbano.Backend</RootNamespace> <UserSecretsId>0eff397c-f98e-4c3a-95ec-9d900f1b938c</UserSecretsId> <NeutralLanguage>es</NeutralLanguage> @@ -24,8 +23,9 @@ </ItemGroup> <ItemGroup> - <ProjectReference Include="..\Costasdev.Busurbano.Sources.OpenTripPlannerGql\Costasdev.Busurbano.Sources.OpenTripPlannerGql.csproj" /> - <ProjectReference Include="..\Costasdev.Busurbano.Sources.TranviasCoruna\Costasdev.Busurbano.Sources.TranviasCoruna.csproj" /> + <ProjectReference Include="..\Enmarcha.Sources.OpenTripPlannerGql\Enmarcha.Sources.OpenTripPlannerGql.csproj" /> + <ProjectReference Include="..\Enmarcha.Sources.TranviasCoruna\Enmarcha.Sources.TranviasCoruna.csproj" /> + <ProjectReference Include="..\Enmarcha.Sources.Tussa\Enmarcha.Sources.Tussa.csproj" /> </ItemGroup> <ItemGroup> diff --git a/src/Costasdev.Busurbano.Backend/Extensions/StopScheduleExtensions.cs b/src/Enmarcha.Backend/Extensions/StopScheduleExtensions.cs index b435158..bbf0e4b 100644 --- a/src/Costasdev.Busurbano.Backend/Extensions/StopScheduleExtensions.cs +++ b/src/Enmarcha.Backend/Extensions/StopScheduleExtensions.cs @@ -1,15 +1,16 @@ -using static Costasdev.Busurbano.Backend.Types.StopArrivals.Types; +using Enmarcha.Backend.Types; +using static Enmarcha.Backend.Types.StopArrivals.Types; -namespace Costasdev.Busurbano.Backend.Extensions; +namespace Enmarcha.Backend.Extensions; public static class StopScheduleExtensions { - public static DateTime? StartingDateTime(this ScheduledArrival stop, DateTime baseDate) + public static DateTime? StartingDateTime(this StopArrivals.Types.ScheduledArrival stop, DateTime baseDate) { return ParseGtfsTime(stop.StartingTime, baseDate); } - public static DateTime? CallingDateTime(this ScheduledArrival stop, DateTime baseDate) + public static DateTime? CallingDateTime(this StopArrivals.Types.ScheduledArrival stop, DateTime baseDate) { return ParseGtfsTime(stop.CallingTime, baseDate); } diff --git a/src/Costasdev.Busurbano.Backend/Helpers/ContrastHelper.cs b/src/Enmarcha.Backend/Helpers/ContrastHelper.cs index f9fd5f2..abc3dba 100644 --- a/src/Costasdev.Busurbano.Backend/Helpers/ContrastHelper.cs +++ b/src/Enmarcha.Backend/Helpers/ContrastHelper.cs @@ -1,4 +1,4 @@ -namespace Costasdev.Busurbano.Backend.Helpers; +namespace Enmarcha.Backend.Helpers; using System; using System.Globalization; diff --git a/src/Costasdev.Busurbano.Backend/Helpers/SortingHelper.cs b/src/Enmarcha.Backend/Helpers/SortingHelper.cs index 472a56f..c70dab2 100644 --- a/src/Costasdev.Busurbano.Backend/Helpers/SortingHelper.cs +++ b/src/Enmarcha.Backend/Helpers/SortingHelper.cs @@ -1,4 +1,4 @@ -namespace Costasdev.Busurbano.Backend.Helpers; +namespace Enmarcha.Backend.Helpers; public class SortingHelper { diff --git a/src/Costasdev.Busurbano.Backend/Program.cs b/src/Enmarcha.Backend/Program.cs index 97e7354..4450da6 100644 --- a/src/Costasdev.Busurbano.Backend/Program.cs +++ b/src/Enmarcha.Backend/Program.cs @@ -1,9 +1,9 @@ using System.Text.Json.Serialization; -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Services; -using Costasdev.Busurbano.Backend.Services.Processors; -using Costasdev.Busurbano.Backend.Services.Providers; -using Costasdev.Busurbano.Sources.TranviasCoruna; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Services; +using Enmarcha.Backend.Services.Processors; +using Enmarcha.Backend.Services.Providers; +using Enmarcha.Sources.TranviasCoruna; var builder = WebApplication.CreateBuilder(args); @@ -28,6 +28,7 @@ builder.Services.AddSingleton<LineFormatterService>(); builder.Services.AddScoped<IArrivalsProcessor, VitrasaRealTimeProcessor>(); builder.Services.AddScoped<IArrivalsProcessor, CorunaRealTimeProcessor>(); +builder.Services.AddScoped<IArrivalsProcessor, SantiagoRealTimeProcessor>(); builder.Services.AddScoped<IArrivalsProcessor, FilterAndSortProcessor>(); builder.Services.AddScoped<IArrivalsProcessor, NextStopsProcessor>(); diff --git a/src/Costasdev.Busurbano.Backend/Properties/launchSettings.json b/src/Enmarcha.Backend/Properties/launchSettings.json index 74f9522..c64bd2f 100644 --- a/src/Costasdev.Busurbano.Backend/Properties/launchSettings.json +++ b/src/Enmarcha.Backend/Properties/launchSettings.json @@ -1,13 +1,13 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", "profiles": { - "busurbano": { + "enmarcha": { "commandName": "Project", "dotnetRunMessages": true, "applicationUrl": "https://localhost:7240", "hotReloadEnabled": true, "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_ENVIRONMENT": "Development" } } } diff --git a/src/Costasdev.Busurbano.Backend/Services/ArrivalsPipeline.cs b/src/Enmarcha.Backend/Services/ArrivalsPipeline.cs index 3c9368c..57a46e1 100644 --- a/src/Costasdev.Busurbano.Backend/Services/ArrivalsPipeline.cs +++ b/src/Enmarcha.Backend/Services/ArrivalsPipeline.cs @@ -1,7 +1,7 @@ -using Costasdev.Busurbano.Backend.Types; -using Costasdev.Busurbano.Backend.Types.Arrivals; +using Enmarcha.Backend.Types; +using Enmarcha.Backend.Types.Arrivals; -namespace Costasdev.Busurbano.Backend.Services; +namespace Enmarcha.Backend.Services; public class ArrivalsContext { diff --git a/src/Costasdev.Busurbano.Backend/Services/FareService.cs b/src/Enmarcha.Backend/Services/FareService.cs index c08d1d5..bf85f03 100644 --- a/src/Costasdev.Busurbano.Backend/Services/FareService.cs +++ b/src/Enmarcha.Backend/Services/FareService.cs @@ -1,9 +1,9 @@ -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Services.Providers; -using Costasdev.Busurbano.Backend.Types.Planner; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Services.Providers; +using Enmarcha.Backend.Types.Planner; using Microsoft.Extensions.Options; -namespace Costasdev.Busurbano.Backend.Services; +namespace Enmarcha.Backend.Services; public record FareResult(decimal CashFareEuro, bool CashFareIsTotal, decimal CardFareEuro, bool CardFareIsTotal); @@ -62,10 +62,10 @@ public class FareService { switch (leg.FeedId) { - case "santiago": + case "tussa": total += SantiagoCashFare; break; - case "coruna": + case "tranvias": total += CorunaCashFare; break; case "vitrasa": @@ -116,12 +116,12 @@ public class FareService maxUsages = 3; initialFare = VitrasaCardFare; break; - case "coruna": + case "tranvias": maxMinutes = 45; maxUsages = 2; initialFare = CorunaCardFare; break; - case "santiago": + case "tussa": maxMinutes = 60; maxUsages = 2; initialFare = SantiagoCardFare; diff --git a/src/Costasdev.Busurbano.Backend/Services/FeedService.cs b/src/Enmarcha.Backend/Services/FeedService.cs index 3ef079c..8b0d3e7 100644 --- a/src/Costasdev.Busurbano.Backend/Services/FeedService.cs +++ b/src/Enmarcha.Backend/Services/FeedService.cs @@ -1,7 +1,7 @@ using System.Text.RegularExpressions; -using Costasdev.Busurbano.Backend.Types.Arrivals; +using Enmarcha.Backend.Types.Arrivals; -namespace Costasdev.Busurbano.Backend.Services; +namespace Enmarcha.Backend.Services; public class FeedService { @@ -38,8 +38,8 @@ public class FeedService return feed switch { "vitrasa" => ("#81D002", "#000000"), - "santiago" => ("#508096", "#FFFFFF"), - "coruna" => ("#E61C29", "#FFFFFF"), + "tussa" => ("#508096", "#FFFFFF"), + "tranvias" => ("#E61C29", "#FFFFFF"), "xunta" => ("#007BC4", "#FFFFFF"), "renfe" => ("#870164", "#FFFFFF"), "feve" => ("#EE3D32", "#FFFFFF"), @@ -139,7 +139,7 @@ public class FeedService { if (nextStops.Count == 0) return null; - if (feedId == "vitrasa" || feedId == "coruna") + if (feedId is "vitrasa" or "tranvias" or "tussa") { var streets = nextStops .Select(GetStreetName) diff --git a/src/Costasdev.Busurbano.Backend/Services/IGeocodingService.cs b/src/Enmarcha.Backend/Services/IGeocodingService.cs index 3ac29d6..5c1b19e 100644 --- a/src/Costasdev.Busurbano.Backend/Services/IGeocodingService.cs +++ b/src/Enmarcha.Backend/Services/IGeocodingService.cs @@ -1,6 +1,6 @@ -using Costasdev.Busurbano.Backend.Types.Planner; +using Enmarcha.Backend.Types.Planner; -namespace Costasdev.Busurbano.Backend.Services; +namespace Enmarcha.Backend.Services; public interface IGeocodingService { diff --git a/src/Costasdev.Busurbano.Backend/Services/LineFormatterService.cs b/src/Enmarcha.Backend/Services/LineFormatterService.cs index db9f2a5..d3b6109 100644 --- a/src/Costasdev.Busurbano.Backend/Services/LineFormatterService.cs +++ b/src/Enmarcha.Backend/Services/LineFormatterService.cs @@ -1,6 +1,6 @@ -using Costasdev.Busurbano.Backend.Types; +using Enmarcha.Backend.Types; -namespace Costasdev.Busurbano.Backend.Services; +namespace Enmarcha.Backend.Services; public class LineFormatterService { diff --git a/src/Costasdev.Busurbano.Backend/Services/NominatimGeocodingService.cs b/src/Enmarcha.Backend/Services/NominatimGeocodingService.cs index 01e57f1..8c4b8a5 100644 --- a/src/Costasdev.Busurbano.Backend/Services/NominatimGeocodingService.cs +++ b/src/Enmarcha.Backend/Services/NominatimGeocodingService.cs @@ -1,11 +1,11 @@ using System.Globalization; -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Types.Nominatim; -using Costasdev.Busurbano.Backend.Types.Planner; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Types.Nominatim; +using Enmarcha.Backend.Types.Planner; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; -namespace Costasdev.Busurbano.Backend.Services; +namespace Enmarcha.Backend.Services; public class NominatimGeocodingService : IGeocodingService { @@ -26,7 +26,7 @@ public class NominatimGeocodingService : IGeocodingService // Nominatim requires a User-Agent if (!_httpClient.DefaultRequestHeaders.Contains("User-Agent")) { - _httpClient.DefaultRequestHeaders.Add("User-Agent", "Busurbano/1.0 (https://github.com/arielcostas/Busurbano)"); + _httpClient.DefaultRequestHeaders.Add("User-Agent", "Enmarcha/0.1 testing only, will replace soon. Written 2025-12-28 (https://enmarcha.app)"); } } diff --git a/src/Costasdev.Busurbano.Backend/Services/OtpService.cs b/src/Enmarcha.Backend/Services/OtpService.cs index fb7413c..e4b4846 100644 --- a/src/Costasdev.Busurbano.Backend/Services/OtpService.cs +++ b/src/Enmarcha.Backend/Services/OtpService.cs @@ -1,14 +1,14 @@ using System.Globalization; -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Helpers; -using Costasdev.Busurbano.Backend.Types.Otp; -using Costasdev.Busurbano.Backend.Types.Planner; -using Costasdev.Busurbano.Backend.Types.Transit; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Helpers; +using Enmarcha.Backend.Types.Otp; +using Enmarcha.Backend.Types.Planner; +using Enmarcha.Backend.Types.Transit; using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Options; -namespace Costasdev.Busurbano.Backend.Services; +namespace Enmarcha.Backend.Services; public class OtpService { diff --git a/src/Costasdev.Busurbano.Backend/Services/Processors/AbstractProcessor.cs b/src/Enmarcha.Backend/Services/Processors/AbstractProcessor.cs index 343f511..d6b420f 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Processors/AbstractProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/AbstractProcessor.cs @@ -1,4 +1,4 @@ -using Costasdev.Busurbano.Backend.Services; +using Enmarcha.Backend.Services; public abstract class AbstractRealTimeProcessor : IArrivalsProcessor { diff --git a/src/Costasdev.Busurbano.Backend/Services/Processors/CorunaRealTimeProcessor.cs b/src/Enmarcha.Backend/Services/Processors/CorunaRealTimeProcessor.cs index 587917e..ca3f91d 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Processors/CorunaRealTimeProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/CorunaRealTimeProcessor.cs @@ -1,10 +1,10 @@ -using Costasdev.Busurbano.Backend.Types; -using Costasdev.Busurbano.Backend.Types.Arrivals; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; -using Costasdev.Busurbano.Sources.TranviasCoruna; -using Arrival = Costasdev.Busurbano.Backend.Types.Arrivals.Arrival; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.TranviasCoruna; +using Enmarcha.Backend.Types; +using Enmarcha.Backend.Types.Arrivals; +using Arrival = Enmarcha.Backend.Types.Arrivals.Arrival; -namespace Costasdev.Busurbano.Backend.Services.Processors; +namespace Enmarcha.Backend.Services.Processors; public class CorunaRealTimeProcessor : AbstractRealTimeProcessor { @@ -27,16 +27,13 @@ public class CorunaRealTimeProcessor : AbstractRealTimeProcessor public override async Task ProcessAsync(ArrivalsContext context) { - if (!context.StopId.StartsWith("coruna:")) return; + if (!context.StopId.StartsWith("tranvias:")) return; - var normalizedCode = _feedService.NormalizeStopCode("coruna", context.StopCode); + var normalizedCode = _feedService.NormalizeStopCode("tranvias", context.StopCode); if (!int.TryParse(normalizedCode, out var numericStopId)) return; try { - // Load schedule - var todayDate = context.NowLocal.Date.ToString("yyyy-MM-dd"); - Epsg25829? stopLocation = null; if (context.StopLocation != null) { diff --git a/src/Costasdev.Busurbano.Backend/Services/Processors/FeedConfigProcessor.cs b/src/Enmarcha.Backend/Services/Processors/FeedConfigProcessor.cs index fde3e0a..2d5f5d9 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Processors/FeedConfigProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/FeedConfigProcessor.cs @@ -1,7 +1,7 @@ -using Costasdev.Busurbano.Backend.Helpers; -using Costasdev.Busurbano.Backend.Types.Arrivals; +using Enmarcha.Backend.Helpers; +using Enmarcha.Backend.Types.Arrivals; -namespace Costasdev.Busurbano.Backend.Services.Processors; +namespace Enmarcha.Backend.Services.Processors; public class FeedConfigProcessor : IArrivalsProcessor { diff --git a/src/Costasdev.Busurbano.Backend/Services/Processors/FilterAndSortProcessor.cs b/src/Enmarcha.Backend/Services/Processors/FilterAndSortProcessor.cs index c209db5..7df00fa 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Processors/FilterAndSortProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/FilterAndSortProcessor.cs @@ -1,6 +1,6 @@ -using Costasdev.Busurbano.Backend.Types.Arrivals; +using Enmarcha.Backend.Types.Arrivals; -namespace Costasdev.Busurbano.Backend.Services.Processors; +namespace Enmarcha.Backend.Services.Processors; /// <summary> /// Filters and sorts the arrivals based on the feed and the requested limit. diff --git a/src/Costasdev.Busurbano.Backend/Services/Processors/MarqueeProcessor.cs b/src/Enmarcha.Backend/Services/Processors/MarqueeProcessor.cs index ec65493..9e620c2 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Processors/MarqueeProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/MarqueeProcessor.cs @@ -1,4 +1,4 @@ -namespace Costasdev.Busurbano.Backend.Services.Processors; +namespace Enmarcha.Backend.Services.Processors; public class MarqueeProcessor : IArrivalsProcessor { diff --git a/src/Costasdev.Busurbano.Backend/Services/Processors/NextStopsProcessor.cs b/src/Enmarcha.Backend/Services/Processors/NextStopsProcessor.cs index a00a68a..5d02066 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Processors/NextStopsProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/NextStopsProcessor.cs @@ -1,6 +1,6 @@ -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; -namespace Costasdev.Busurbano.Backend.Services.Processors; +namespace Enmarcha.Backend.Services.Processors; public class NextStopsProcessor : IArrivalsProcessor { diff --git a/src/Enmarcha.Backend/Services/Processors/SantiagoRealTimeProcessor.cs b/src/Enmarcha.Backend/Services/Processors/SantiagoRealTimeProcessor.cs new file mode 100644 index 0000000..28b38a9 --- /dev/null +++ b/src/Enmarcha.Backend/Services/Processors/SantiagoRealTimeProcessor.cs @@ -0,0 +1,88 @@ +using Enmarcha.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.TranviasCoruna; +using Enmarcha.Backend.Types; +using Enmarcha.Backend.Types.Arrivals; +using Enmarcha.Sources.Tussa; +using Arrival = Enmarcha.Backend.Types.Arrivals.Arrival; + +namespace Enmarcha.Backend.Services.Processors; + +public class SantiagoRealTimeProcessor : AbstractRealTimeProcessor +{ + private readonly SantiagoRealtimeEstimatesProvider _realtime; + private readonly FeedService _feedService; + private readonly ILogger<SantiagoRealTimeProcessor> _logger; + + public SantiagoRealTimeProcessor( + HttpClient http, + FeedService feedService, + ILogger<SantiagoRealTimeProcessor> logger) + { + _realtime = new SantiagoRealtimeEstimatesProvider(http); + _feedService = feedService; + _logger = logger; + } + + public override async Task ProcessAsync(ArrivalsContext context) + { + if (!context.StopId.StartsWith("tussa:")) return; + + var normalizedCode = _feedService.NormalizeStopCode("tussa", context.StopCode); + if (!int.TryParse(normalizedCode, out var numericStopId)) return; + + try + { + var realtime = await _realtime.GetEstimatesForStop(numericStopId); + + var usedTripIds = new HashSet<string>(); + var newArrivals = new List<Arrival>(); + + foreach (var estimate in realtime) + { + var bestMatch = context.Arrivals + .Where(a => !usedTripIds.Contains(a.TripId)) + .Where(a => a.Route.RouteIdInGtfs.Trim() == estimate.RouteId.Trim()) + .Select(a => + { + return new + { + Arrival = a, + TimeDiff = estimate.Minutes - a.Estimate.Minutes, // RealTime - Schedule + RouteMatch = true + }; + }) + .Where(x => x.RouteMatch) // Strict route matching + .Where(x => x.TimeDiff >= -7 && x.TimeDiff <= 75) // Allow 7m early (RealTime < Schedule) or 75m late (RealTime > Schedule) + .OrderBy(x => Math.Abs(x.TimeDiff)) // Best time fit + .FirstOrDefault(); + + if (bestMatch == null) + { + continue; + } + + var arrival = bestMatch.Arrival; + + var scheduledMinutes = arrival.Estimate.Minutes; + arrival.Estimate.Minutes = estimate.Minutes; + arrival.Estimate.Precision = ArrivalPrecision.Confident; + + // Calculate delay badge + var delayMinutes = estimate.Minutes - scheduledMinutes; + if (delayMinutes != 0) + { + arrival.Delay = new DelayBadge { Minutes = delayMinutes }; + } + + usedTripIds.Add(arrival.TripId); + } + + context.Arrivals.AddRange(newArrivals); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error fetching Vitrasa real-time data for stop {StopId}", context.StopId); + } + } + +} diff --git a/src/Costasdev.Busurbano.Backend/Services/Processors/ShapeProcessor.cs b/src/Enmarcha.Backend/Services/Processors/ShapeProcessor.cs index 40bc508..f3af3a5 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Processors/ShapeProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/ShapeProcessor.cs @@ -1,6 +1,6 @@ -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; -namespace Costasdev.Busurbano.Backend.Services.Processors; +namespace Enmarcha.Backend.Services.Processors; public class ShapeProcessor : IArrivalsProcessor { diff --git a/src/Costasdev.Busurbano.Backend/Services/Processors/VitrasaRealTimeProcessor.cs b/src/Enmarcha.Backend/Services/Processors/VitrasaRealTimeProcessor.cs index f3a8d91..5d44995 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Processors/VitrasaRealTimeProcessor.cs +++ b/src/Enmarcha.Backend/Services/Processors/VitrasaRealTimeProcessor.cs @@ -1,11 +1,11 @@ -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Types; -using Costasdev.Busurbano.Backend.Types.Arrivals; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; using Costasdev.VigoTransitApi; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Types; +using Enmarcha.Backend.Types.Arrivals; using Microsoft.Extensions.Options; -namespace Costasdev.Busurbano.Backend.Services.Processors; +namespace Enmarcha.Backend.Services.Processors; public class VitrasaRealTimeProcessor : AbstractRealTimeProcessor { diff --git a/src/Costasdev.Busurbano.Backend/Services/Providers/ITransitProvider.cs b/src/Enmarcha.Backend/Services/Providers/ITransitProvider.cs index f0440e4..77f6341 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Providers/ITransitProvider.cs +++ b/src/Enmarcha.Backend/Services/Providers/ITransitProvider.cs @@ -1,6 +1,6 @@ -using Costasdev.Busurbano.Backend.Types; +using Enmarcha.Backend.Types; -namespace Costasdev.Busurbano.Backend.Services.Providers; +namespace Enmarcha.Backend.Services.Providers; public interface ITransitProvider { diff --git a/src/Costasdev.Busurbano.Backend/Services/Providers/RenfeTransitProvider.cs b/src/Enmarcha.Backend/Services/Providers/RenfeTransitProvider.cs index 1793ada..036c9b1 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Providers/RenfeTransitProvider.cs +++ b/src/Enmarcha.Backend/Services/Providers/RenfeTransitProvider.cs @@ -1,10 +1,10 @@ -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Extensions; -using Costasdev.Busurbano.Backend.Types; +using Enmarcha.Backend.Extensions; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Types; using Microsoft.Extensions.Options; using SysFile = System.IO.File; -namespace Costasdev.Busurbano.Backend.Services.Providers; +namespace Enmarcha.Backend.Services.Providers; [Obsolete] public class RenfeTransitProvider : ITransitProvider @@ -21,7 +21,7 @@ public class RenfeTransitProvider : ITransitProvider public async Task<List<ConsolidatedCirculation>> GetCirculationsAsync(string stopId, DateTime nowLocal) { var todayDate = nowLocal.Date.ToString("yyyy-MM-dd"); - var stopArrivals = await LoadStopArrivalsProto(stopId, todayDate); + StopArrivals stopArrivals = null!; if (stopArrivals == null) { @@ -61,18 +61,4 @@ public class RenfeTransitProvider : ITransitProvider return consolidatedCirculations; } - - private async Task<StopArrivals?> LoadStopArrivalsProto(string stopId, string dateString) - { - var file = Path.Combine(_configuration.RenfeScheduleBasePath, dateString, stopId + ".pb"); - if (!SysFile.Exists(file)) - { - _logger.LogWarning("Stop arrivals proto file not found: {File}", file); - return null; - } - - var contents = await SysFile.ReadAllBytesAsync(file); - var stopArrivals = StopArrivals.Parser.ParseFrom(contents); - return stopArrivals; - } } diff --git a/src/Costasdev.Busurbano.Backend/Services/Providers/VitrasaTransitProvider.cs b/src/Enmarcha.Backend/Services/Providers/VitrasaTransitProvider.cs index a736652..8a05fc6 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Providers/VitrasaTransitProvider.cs +++ b/src/Enmarcha.Backend/Services/Providers/VitrasaTransitProvider.cs @@ -1,14 +1,14 @@ using System.Globalization; using System.Text; -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Extensions; -using Costasdev.Busurbano.Backend.Types; +using Enmarcha.Backend.Extensions; using Costasdev.VigoTransitApi; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Types; using Microsoft.Extensions.Options; -using static Costasdev.Busurbano.Backend.Types.StopArrivals.Types; +using static Enmarcha.Backend.Types.StopArrivals.Types; using SysFile = System.IO.File; -namespace Costasdev.Busurbano.Backend.Services.Providers; +namespace Enmarcha.Backend.Services.Providers; [Obsolete] public class VitrasaTransitProvider : ITransitProvider @@ -114,7 +114,7 @@ public class VitrasaTransitProvider : ITransitProvider .OrderBy(c => c.CallingDateTime(nowLocal.Date)!.Value) .ToArray(); - ScheduledArrival? closestCirculation = null; + StopArrivals.Types.ScheduledArrival? closestCirculation = null; const int maxEarlyArrivalMinutes = 7; @@ -164,37 +164,6 @@ public class VitrasaTransitProvider : ITransitProvider int? stopShapeIndex = null; bool usePreviousShape = false; - // Calculate bus position for realtime trips - if (!string.IsNullOrEmpty(closestCirculation.ShapeId)) - { - double distOnPrevTrip = estimate.Meters - closestCirculation.ShapeDistTraveled; - usePreviousShape = !isRunning && - !string.IsNullOrEmpty(closestCirculation.PreviousTripShapeId) && - distOnPrevTrip > 0; - - if (usePreviousShape) - { - var prevShape = await _shapeService.LoadShapeAsync(closestCirculation.PreviousTripShapeId); - if (prevShape != null && prevShape.Points.Count > 0) - { - var lastPoint = prevShape.Points[prevShape.Points.Count - 1]; - var result = _shapeService.GetBusPosition(prevShape, lastPoint, (int)distOnPrevTrip); - currentPosition = result.BusPosition; - stopShapeIndex = result.StopIndex; - } - } - else - { - var shape = await _shapeService.LoadShapeAsync(closestCirculation.ShapeId); - if (shape != null && stopLocation != null) - { - var result = _shapeService.GetBusPosition(shape, stopLocation, estimate.Meters); - currentPosition = result.BusPosition; - stopShapeIndex = result.StopIndex; - } - } - } - consolidatedCirculations.Add(new ConsolidatedCirculation { Line = estimate.Line, @@ -272,16 +241,17 @@ public class VitrasaTransitProvider : ITransitProvider private async Task<StopArrivals?> LoadStopArrivalsProto(string stopId, string dateString) { - var file = Path.Combine(_configuration.VitrasaScheduleBasePath, dateString, stopId + ".pb"); - if (!SysFile.Exists(file)) - { - _logger.LogWarning("Stop arrivals proto file not found: {File}", file); - return null; - } - - var contents = await SysFile.ReadAllBytesAsync(file); - var stopArrivals = StopArrivals.Parser.ParseFrom(contents); - return stopArrivals; + return new StopArrivals(); + // var file = Path.Combine(_configuration.VitrasaScheduleBasePath, dateString, stopId + ".pb"); + // if (!SysFile.Exists(file)) + // { + // _logger.LogWarning("Stop arrivals proto file not found: {File}", file); + // return null; + // } + // + // var contents = await SysFile.ReadAllBytesAsync(file); + // var stopArrivals = StopArrivals.Parser.ParseFrom(contents); + // return stopArrivals; } private static string NormalizeRouteName(string route) diff --git a/src/Costasdev.Busurbano.Backend/Services/Providers/XuntaFareProvider.cs b/src/Enmarcha.Backend/Services/Providers/XuntaFareProvider.cs index 7536c69..4bb60e2 100644 --- a/src/Costasdev.Busurbano.Backend/Services/Providers/XuntaFareProvider.cs +++ b/src/Enmarcha.Backend/Services/Providers/XuntaFareProvider.cs @@ -3,7 +3,7 @@ using System.Globalization; using CsvHelper; using CsvHelper.Configuration.Attributes; -namespace Costasdev.Busurbano.Backend.Services.Providers; +namespace Enmarcha.Backend.Services.Providers; public class PriceRecord { diff --git a/src/Costasdev.Busurbano.Backend/Services/ShapeTraversalService.cs b/src/Enmarcha.Backend/Services/ShapeTraversalService.cs index c3c66f4..221a975 100644 --- a/src/Costasdev.Busurbano.Backend/Services/ShapeTraversalService.cs +++ b/src/Enmarcha.Backend/Services/ShapeTraversalService.cs @@ -1,11 +1,11 @@ -using Costasdev.Busurbano.Backend.Configuration; -using Costasdev.Busurbano.Backend.Types; +using Enmarcha.Backend.Configuration; +using Enmarcha.Backend.Types; using Microsoft.Extensions.Options; using ProjNet.CoordinateSystems; using ProjNet.CoordinateSystems.Transformations; using SysFile = System.IO.File; -namespace Costasdev.Busurbano.Backend.Services; +namespace Enmarcha.Backend.Services; /// <summary> /// Service for loading shapes and calculating remaining path from a given stop point @@ -35,66 +35,6 @@ public class ShapeTraversalService _transformation = ctFactory.CreateFromCoordinateSystems(source, target); } - /// <summary> - /// Loads a shape from disk - /// </summary> - public async Task<Shape?> LoadShapeAsync(string shapeId) - { - var file = Path.Combine(_configuration.VitrasaScheduleBasePath, "shapes", shapeId + ".pb"); - if (!SysFile.Exists(file)) - { - _logger.LogWarning("Shape file not found: {ShapeId}", shapeId); - return null; - } - - try - { - var contents = await SysFile.ReadAllBytesAsync(file); - var shape = Shape.Parser.ParseFrom(contents); - return shape; - } - catch (Exception ex) - { - _logger.LogError(ex, "Error loading shape {ShapeId}", shapeId); - return null; - } - } - - public async Task<List<Position>?> GetShapePathAsync(string shapeId, int startIndex) - { - var shape = await LoadShapeAsync(shapeId); - if (shape == null) return null; - - var result = new List<Position>(); - // Ensure startIndex is within bounds - if (startIndex < 0) startIndex = 0; - // If startIndex is beyond the end, return empty list - if (startIndex >= shape.Points.Count) return result; - - for (int i = startIndex; i < shape.Points.Count; i++) - { - var pos = TransformToLatLng(shape.Points[i]); - pos.ShapeIndex = i; - result.Add(pos); - } - return result; - } - - public async Task<int?> FindClosestPointIndexAsync(string shapeId, double lat, double lon) - { - var shape = await LoadShapeAsync(shapeId); - if (shape == null) return null; - - // Transform input WGS84 to EPSG:25829 - // Input is [Longitude, Latitude] - var inverseTransform = _transformation.MathTransform.Inverse(); - var transformed = inverseTransform.Transform(new[] { lon, lat }); - - var location = new Epsg25829 { X = transformed[0], Y = transformed[1] }; - - return FindClosestPointIndex(shape.Points, location); - } - public Shape CreateShapeFromWgs84(List<Position> points) { var shape = new Shape(); diff --git a/src/Costasdev.Busurbano.Backend/Types/Arrivals/Arrival.cs b/src/Enmarcha.Backend/Types/Arrivals/Arrival.cs index f13babf..e99baa7 100644 --- a/src/Costasdev.Busurbano.Backend/Types/Arrivals/Arrival.cs +++ b/src/Enmarcha.Backend/Types/Arrivals/Arrival.cs @@ -1,7 +1,7 @@ using System.Text.Json.Serialization; -using Costasdev.Busurbano.Backend.Types; +using Enmarcha.Backend.Types; -namespace Costasdev.Busurbano.Backend.Types.Arrivals; +namespace Enmarcha.Backend.Types.Arrivals; public class Arrival { diff --git a/src/Costasdev.Busurbano.Backend/Types/Arrivals/StopArrivalsResponse.cs b/src/Enmarcha.Backend/Types/Arrivals/StopArrivalsResponse.cs index 9a2cec7..4d2f481 100644 --- a/src/Costasdev.Busurbano.Backend/Types/Arrivals/StopArrivalsResponse.cs +++ b/src/Enmarcha.Backend/Types/Arrivals/StopArrivalsResponse.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Backend.Types.Arrivals; +namespace Enmarcha.Backend.Types.Arrivals; public class StopArrivalsResponse { diff --git a/src/Costasdev.Busurbano.Backend/Types/ConsolidatedCirculation.cs b/src/Enmarcha.Backend/Types/ConsolidatedCirculation.cs index 5b6373d..55d6e87 100644 --- a/src/Costasdev.Busurbano.Backend/Types/ConsolidatedCirculation.cs +++ b/src/Enmarcha.Backend/Types/ConsolidatedCirculation.cs @@ -1,4 +1,4 @@ -namespace Costasdev.Busurbano.Backend.Types; +namespace Enmarcha.Backend.Types; public class ConsolidatedCirculation { diff --git a/src/Costasdev.Busurbano.Backend/Types/Nominatim/NominatimModels.cs b/src/Enmarcha.Backend/Types/Nominatim/NominatimModels.cs index a73cdd2..442e3bb 100644 --- a/src/Costasdev.Busurbano.Backend/Types/Nominatim/NominatimModels.cs +++ b/src/Enmarcha.Backend/Types/Nominatim/NominatimModels.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Backend.Types.Nominatim; +namespace Enmarcha.Backend.Types.Nominatim; public class NominatimSearchResult { diff --git a/src/Costasdev.Busurbano.Backend/Types/Otp/OtpModels.cs b/src/Enmarcha.Backend/Types/Otp/OtpModels.cs index 2c076a2..d735a81 100644 --- a/src/Costasdev.Busurbano.Backend/Types/Otp/OtpModels.cs +++ b/src/Enmarcha.Backend/Types/Otp/OtpModels.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Backend.Types.Otp; +namespace Enmarcha.Backend.Types.Otp; public class OtpResponse { diff --git a/src/Costasdev.Busurbano.Backend/Types/Planner/PlannerResponse.cs b/src/Enmarcha.Backend/Types/Planner/PlannerResponse.cs index a0cf754..7713029 100644 --- a/src/Costasdev.Busurbano.Backend/Types/Planner/PlannerResponse.cs +++ b/src/Enmarcha.Backend/Types/Planner/PlannerResponse.cs @@ -1,4 +1,4 @@ -namespace Costasdev.Busurbano.Backend.Types.Planner; +namespace Enmarcha.Backend.Types.Planner; public class RoutePlan { diff --git a/src/Costasdev.Busurbano.Backend/Types/StopSchedule.cs b/src/Enmarcha.Backend/Types/StopSchedule.cs index 5c3e607..2a143ea 100644 --- a/src/Costasdev.Busurbano.Backend/Types/StopSchedule.cs +++ b/src/Enmarcha.Backend/Types/StopSchedule.cs @@ -9,7 +9,7 @@ using pb = global::Google.Protobuf; using pbc = global::Google.Protobuf.Collections; using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; -namespace Costasdev.Busurbano.Backend.Types { +namespace Enmarcha.Backend.Types { /// <summary>Holder for reflection information generated from stop_schedule.proto</summary> public static partial class StopScheduleReflection { @@ -43,9 +43,9 @@ namespace Costasdev.Busurbano.Backend.Types { descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Costasdev.Busurbano.Backend.Types.Epsg25829), global::Costasdev.Busurbano.Backend.Types.Epsg25829.Parser, new[]{ "X", "Y" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Costasdev.Busurbano.Backend.Types.StopArrivals), global::Costasdev.Busurbano.Backend.Types.StopArrivals.Parser, new[]{ "StopId", "Location", "Arrivals" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Costasdev.Busurbano.Backend.Types.StopArrivals.Types.ScheduledArrival), global::Costasdev.Busurbano.Backend.Types.StopArrivals.Types.ScheduledArrival.Parser, new[]{ "ServiceId", "TripId", "Line", "Route", "ShapeId", "ShapeDistTraveled", "StopSequence", "NextStreets", "StartingCode", "StartingName", "StartingTime", "CallingTime", "CallingSsm", "TerminusCode", "TerminusName", "TerminusTime", "PreviousTripShapeId" }, null, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Costasdev.Busurbano.Backend.Types.Shape), global::Costasdev.Busurbano.Backend.Types.Shape.Parser, new[]{ "ShapeId", "Points" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Enmarcha.Backend.Types.Epsg25829), global::Enmarcha.Backend.Types.Epsg25829.Parser, new[]{ "X", "Y" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enmarcha.Backend.Types.StopArrivals), global::Enmarcha.Backend.Types.StopArrivals.Parser, new[]{ "StopId", "Location", "Arrivals" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Enmarcha.Backend.Types.StopArrivals.Types.ScheduledArrival), global::Enmarcha.Backend.Types.StopArrivals.Types.ScheduledArrival.Parser, new[]{ "ServiceId", "TripId", "Line", "Route", "ShapeId", "ShapeDistTraveled", "StopSequence", "NextStreets", "StartingCode", "StartingName", "StartingTime", "CallingTime", "CallingSsm", "TerminusCode", "TerminusName", "TerminusTime", "PreviousTripShapeId" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Enmarcha.Backend.Types.Shape), global::Enmarcha.Backend.Types.Shape.Parser, new[]{ "ShapeId", "Points" }, null, null, null, null) })); } #endregion @@ -66,7 +66,7 @@ namespace Costasdev.Busurbano.Backend.Types { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Costasdev.Busurbano.Backend.Types.StopScheduleReflection.Descriptor.MessageTypes[0]; } + get { return global::Enmarcha.Backend.Types.StopScheduleReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -292,7 +292,7 @@ namespace Costasdev.Busurbano.Backend.Types { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Costasdev.Busurbano.Backend.Types.StopScheduleReflection.Descriptor.MessageTypes[1]; } + get { return global::Enmarcha.Backend.Types.StopScheduleReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -338,10 +338,10 @@ namespace Costasdev.Busurbano.Backend.Types { /// <summary>Field number for the "location" field.</summary> public const int LocationFieldNumber = 3; - private global::Costasdev.Busurbano.Backend.Types.Epsg25829 location_; + private global::Enmarcha.Backend.Types.Epsg25829 location_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Costasdev.Busurbano.Backend.Types.Epsg25829 Location { + public global::Enmarcha.Backend.Types.Epsg25829 Location { get { return location_; } set { location_ = value; @@ -350,12 +350,12 @@ namespace Costasdev.Busurbano.Backend.Types { /// <summary>Field number for the "arrivals" field.</summary> public const int ArrivalsFieldNumber = 5; - private static readonly pb::FieldCodec<global::Costasdev.Busurbano.Backend.Types.StopArrivals.Types.ScheduledArrival> _repeated_arrivals_codec - = pb::FieldCodec.ForMessage(42, global::Costasdev.Busurbano.Backend.Types.StopArrivals.Types.ScheduledArrival.Parser); - private readonly pbc::RepeatedField<global::Costasdev.Busurbano.Backend.Types.StopArrivals.Types.ScheduledArrival> arrivals_ = new pbc::RepeatedField<global::Costasdev.Busurbano.Backend.Types.StopArrivals.Types.ScheduledArrival>(); + private static readonly pb::FieldCodec<global::Enmarcha.Backend.Types.StopArrivals.Types.ScheduledArrival> _repeated_arrivals_codec + = pb::FieldCodec.ForMessage(42, global::Enmarcha.Backend.Types.StopArrivals.Types.ScheduledArrival.Parser); + private readonly pbc::RepeatedField<global::Enmarcha.Backend.Types.StopArrivals.Types.ScheduledArrival> arrivals_ = new pbc::RepeatedField<global::Enmarcha.Backend.Types.StopArrivals.Types.ScheduledArrival>(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField<global::Costasdev.Busurbano.Backend.Types.StopArrivals.Types.ScheduledArrival> Arrivals { + public pbc::RepeatedField<global::Enmarcha.Backend.Types.StopArrivals.Types.ScheduledArrival> Arrivals { get { return arrivals_; } } @@ -467,7 +467,7 @@ namespace Costasdev.Busurbano.Backend.Types { } if (other.location_ != null) { if (location_ == null) { - Location = new global::Costasdev.Busurbano.Backend.Types.Epsg25829(); + Location = new global::Enmarcha.Backend.Types.Epsg25829(); } Location.MergeFrom(other.Location); } @@ -493,7 +493,7 @@ namespace Costasdev.Busurbano.Backend.Types { } case 26: { if (location_ == null) { - Location = new global::Costasdev.Busurbano.Backend.Types.Epsg25829(); + Location = new global::Enmarcha.Backend.Types.Epsg25829(); } input.ReadMessage(Location); break; @@ -523,7 +523,7 @@ namespace Costasdev.Busurbano.Backend.Types { } case 26: { if (location_ == null) { - Location = new global::Costasdev.Busurbano.Backend.Types.Epsg25829(); + Location = new global::Enmarcha.Backend.Types.Epsg25829(); } input.ReadMessage(Location); break; @@ -556,7 +556,7 @@ namespace Costasdev.Busurbano.Backend.Types { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Costasdev.Busurbano.Backend.Types.StopArrivals.Descriptor.NestedTypes[0]; } + get { return global::Enmarcha.Backend.Types.StopArrivals.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1334,7 +1334,7 @@ namespace Costasdev.Busurbano.Backend.Types { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Costasdev.Busurbano.Backend.Types.StopScheduleReflection.Descriptor.MessageTypes[2]; } + get { return global::Enmarcha.Backend.Types.StopScheduleReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1379,12 +1379,12 @@ namespace Costasdev.Busurbano.Backend.Types { /// <summary>Field number for the "points" field.</summary> public const int PointsFieldNumber = 3; - private static readonly pb::FieldCodec<global::Costasdev.Busurbano.Backend.Types.Epsg25829> _repeated_points_codec - = pb::FieldCodec.ForMessage(26, global::Costasdev.Busurbano.Backend.Types.Epsg25829.Parser); - private readonly pbc::RepeatedField<global::Costasdev.Busurbano.Backend.Types.Epsg25829> points_ = new pbc::RepeatedField<global::Costasdev.Busurbano.Backend.Types.Epsg25829>(); + private static readonly pb::FieldCodec<global::Enmarcha.Backend.Types.Epsg25829> _repeated_points_codec + = pb::FieldCodec.ForMessage(26, global::Enmarcha.Backend.Types.Epsg25829.Parser); + private readonly pbc::RepeatedField<global::Enmarcha.Backend.Types.Epsg25829> points_ = new pbc::RepeatedField<global::Enmarcha.Backend.Types.Epsg25829>(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField<global::Costasdev.Busurbano.Backend.Types.Epsg25829> Points { + public pbc::RepeatedField<global::Enmarcha.Backend.Types.Epsg25829> Points { get { return points_; } } diff --git a/src/Costasdev.Busurbano.Backend/Types/Transit/RouteDtos.cs b/src/Enmarcha.Backend/Types/Transit/RouteDtos.cs index 816e43d..3904555 100644 --- a/src/Costasdev.Busurbano.Backend/Types/Transit/RouteDtos.cs +++ b/src/Enmarcha.Backend/Types/Transit/RouteDtos.cs @@ -1,4 +1,4 @@ -namespace Costasdev.Busurbano.Backend.Types.Transit; +namespace Enmarcha.Backend.Types.Transit; public class RouteDto { diff --git a/src/Costasdev.Busurbano.Backend/Types/VigoSchedules.cs b/src/Enmarcha.Backend/Types/VigoSchedules.cs index 49f48ce..ee7930f 100644 --- a/src/Costasdev.Busurbano.Backend/Types/VigoSchedules.cs +++ b/src/Enmarcha.Backend/Types/VigoSchedules.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Backend.Types; +namespace Enmarcha.Backend.Types; public class ScheduledStop { diff --git a/src/Costasdev.Busurbano.Backend/appsettings.Development.json b/src/Enmarcha.Backend/appsettings.Development.json index 2b38630..85fef2f 100644 --- a/src/Costasdev.Busurbano.Backend/appsettings.Development.json +++ b/src/Enmarcha.Backend/appsettings.Development.json @@ -1,7 +1,7 @@ { "Logging": { "LogLevel": { - "Costasdev.Busurbano.Backend": "Debug" + "Enmarcha.Backend": "Debug" } }, "AllowedHosts": "*" diff --git a/src/Costasdev.Busurbano.Backend/appsettings.json b/src/Enmarcha.Backend/appsettings.json index d09e564..d09e564 100644 --- a/src/Costasdev.Busurbano.Backend/appsettings.json +++ b/src/Enmarcha.Backend/appsettings.json diff --git a/src/Costasdev.Busurbano.ServiceViewer/.gitignore b/src/Enmarcha.Experimental.ServiceViewer/.gitignore index ff5b00c..ff5b00c 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/.gitignore +++ b/src/Enmarcha.Experimental.ServiceViewer/.gitignore diff --git a/src/Costasdev.Busurbano.ServiceViewer/AppDbContextDesignTimeFactory.cs b/src/Enmarcha.Experimental.ServiceViewer/AppDbContextDesignTimeFactory.cs index 919c131..4dcd320 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/AppDbContextDesignTimeFactory.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/AppDbContextDesignTimeFactory.cs @@ -1,8 +1,8 @@ -using Costasdev.ServiceViewer.Data; +using Enmarcha.Experimental.ServiceViewer.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; -namespace Costasdev.ServiceViewer; +namespace Enmarcha.Experimental.ServiceViewer; public class AppDbContextDesignTimeFactory : IDesignTimeDbContextFactory<AppDbContext> { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Controllers/ServicesController.cs b/src/Enmarcha.Experimental.ServiceViewer/Controllers/ServicesController.cs index bfb2a99..1da38aa 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Controllers/ServicesController.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Controllers/ServicesController.cs @@ -1,12 +1,12 @@ -using Costasdev.ServiceViewer.Data; -using Costasdev.ServiceViewer.Data.Gtfs; -using Costasdev.ServiceViewer.Data.Gtfs.Enums; -using Costasdev.ServiceViewer.Data.QueryExtensions; -using Costasdev.ServiceViewer.Views.Services; +using Enmarcha.Experimental.ServiceViewer.Data; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; +using Enmarcha.Experimental.ServiceViewer.Data.QueryExtensions; +using Enmarcha.Experimental.ServiceViewer.Views.Services; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Controllers; +namespace Enmarcha.Experimental.ServiceViewer.Controllers; [Route("")] public class ServicesController : Controller diff --git a/src/Costasdev.Busurbano.ServiceViewer/Controllers/StylesheetController.cs b/src/Enmarcha.Experimental.ServiceViewer/Controllers/StylesheetController.cs index 00654db..7c0a9c2 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Controllers/StylesheetController.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Controllers/StylesheetController.cs @@ -1,9 +1,9 @@ using System.Text; -using Costasdev.ServiceViewer.Data; +using Enmarcha.Experimental.ServiceViewer.Data; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Controllers; +namespace Enmarcha.Experimental.ServiceViewer.Controllers; [Controller] [Route("")] diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/AppDbContext.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/AppDbContext.cs index 50f0791..bb3c6c8 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/AppDbContext.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/AppDbContext.cs @@ -1,8 +1,8 @@ -using Costasdev.ServiceViewer.Data.Gtfs; -using Costasdev.ServiceViewer.Data.Gtfs.Enums; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Data; +namespace Enmarcha.Experimental.ServiceViewer.Data; public class AppDbContext : DbContext { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Extensions/TimeExtensions.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Extensions/TimeExtensions.cs index 7fa487d..5f79b75 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Extensions/TimeExtensions.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Extensions/TimeExtensions.cs @@ -1,4 +1,4 @@ -namespace Costasdev.ServiceViewer.Data.Extensions; +namespace Enmarcha.Experimental.ServiceViewer.Data.Extensions; public static class TimeExtensions { diff --git a/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/DirectionId.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/DirectionId.cs new file mode 100644 index 0000000..6a41d1a --- /dev/null +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/DirectionId.cs @@ -0,0 +1,7 @@ +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; + +public enum DirectionId +{ + Outbound = 0, + Inbound = 1 +} diff --git a/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/ExceptionType.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/ExceptionType.cs new file mode 100644 index 0000000..02ab612 --- /dev/null +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/ExceptionType.cs @@ -0,0 +1,7 @@ +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; + +public enum ExceptionType +{ + Added = 1, + Removed = 2 +} diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/RouteType.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/RouteType.cs index e19d02a..e487c32 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/RouteType.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/RouteType.cs @@ -1,4 +1,4 @@ -namespace Costasdev.ServiceViewer.Data.Gtfs.Enums; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; public enum RouteType { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/TripBikesAllowed.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/TripBikesAllowed.cs index 838bc81..346b93a 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/TripBikesAllowed.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/TripBikesAllowed.cs @@ -1,4 +1,4 @@ -namespace Costasdev.ServiceViewer.Data.Gtfs.Enums; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; public enum TripBikesAllowed { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/TripWheelchairAccessible.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/TripWheelchairAccessible.cs index e84b699..6bcdb22 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/TripWheelchairAccessible.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/TripWheelchairAccessible.cs @@ -1,4 +1,4 @@ -namespace Costasdev.ServiceViewer.Data.Gtfs.Enums; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; public enum TripWheelchairAccessible { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/WheelchairBoarding.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/WheelchairBoarding.cs index 3cc550f..d62f60e 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Enums/WheelchairBoarding.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Enums/WheelchairBoarding.cs @@ -1,4 +1,4 @@ -namespace Costasdev.ServiceViewer.Data.Gtfs.Enums; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; public enum WheelchairBoarding { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Feed.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Feed.cs index 065250b..db9b283 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/Feed.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/Feed.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace Costasdev.ServiceViewer.Data.Gtfs; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs; [Table("feeds")] public class Feed diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsAgency.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsAgency.cs index 89b5518..8ce129c 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsAgency.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsAgency.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Data.Gtfs; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs; [Table("gtfs_agencies")] [PrimaryKey(nameof(Id), nameof(FeedId))] diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendar.cs index cfb144c..bcc7c39 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendar.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendar.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Data.Gtfs; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs; [Table("gtfs_calendar")] [PrimaryKey(nameof(ServiceId), nameof(FeedId))] diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs index 1543ef5..e9b5a92 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsCalendarDate.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Costasdev.ServiceViewer.Data.Gtfs.Enums; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Data.Gtfs; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs; [Table("gtfs_calendar_dates")] [PrimaryKey(nameof(ServiceId), nameof(Date), nameof(FeedId))] diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsRoute.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsRoute.cs index c34353c..80ef38a 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsRoute.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsRoute.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Costasdev.ServiceViewer.Data.Gtfs.Enums; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Data.Gtfs; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs; [Table("gtfs_routes")] [PrimaryKey(nameof(Id), nameof(FeedId))] diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsStop.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsStop.cs index f604c5f..6198ffa 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsStop.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsStop.cs @@ -1,10 +1,10 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Costasdev.ServiceViewer.Data.Gtfs.Enums; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; using Microsoft.EntityFrameworkCore; using NetTopologySuite.Geometries; -namespace Costasdev.ServiceViewer.Data.Gtfs; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs; [Table("gtfs_stops")] [PrimaryKey(nameof(Id), nameof(FeedId))] diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsStopTime.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsStopTime.cs index 9599947..2bed623 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsStopTime.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsStopTime.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Costasdev.ServiceViewer.Data.Extensions; +using Enmarcha.Experimental.ServiceViewer.Data.Extensions; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Data.Gtfs; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs; [Table("gtfs_stop_times")] [PrimaryKey(nameof(TripId), nameof(StopSequence), nameof(FeedId))] diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsTrip.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsTrip.cs index 3614120..8dd5271 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Gtfs/GtfsTrip.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Gtfs/GtfsTrip.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Costasdev.ServiceViewer.Data.Gtfs.Enums; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Enums; using Microsoft.EntityFrameworkCore; -namespace Costasdev.ServiceViewer.Data.Gtfs; +namespace Enmarcha.Experimental.ServiceViewer.Data.Gtfs; [Table("gtfs_trips")] [PrimaryKey(nameof(Id), nameof(FeedId))] diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/20251211153852_Initial.Designer.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/20251211153852_Initial.Designer.cs index 79f3e87..af6f5d9 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/20251211153852_Initial.Designer.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/20251211153852_Initial.Designer.cs @@ -1,6 +1,6 @@ // <auto-generated /> using System; -using Costasdev.ServiceViewer.Data; +using Enmarcha.Experimental.ServiceViewer.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; @@ -27,7 +27,7 @@ namespace Data.Migrations NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.Feed", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() @@ -63,7 +63,7 @@ namespace Data.Migrations b.ToTable("feeds"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsAgency", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsAgency", b => { b.Property<string>("Id") .HasMaxLength(255) @@ -120,7 +120,7 @@ namespace Data.Migrations b.ToTable("gtfs_agencies"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsCalendar", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsCalendar", b => { b.Property<string>("ServiceId") .HasMaxLength(32) @@ -174,7 +174,7 @@ namespace Data.Migrations b.ToTable("gtfs_calendar"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsCalendarDate", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsCalendarDate", b => { b.Property<string>("ServiceId") .HasMaxLength(32) @@ -200,7 +200,7 @@ namespace Data.Migrations b.ToTable("gtfs_calendar_dates"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsRoute", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsRoute", b => { b.Property<string>("Id") .HasMaxLength(255) @@ -266,7 +266,7 @@ namespace Data.Migrations b.ToTable("gtfs_routes"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsStop", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStop", b => { b.Property<string>("Id") .HasMaxLength(32) @@ -319,7 +319,7 @@ namespace Data.Migrations b.ToTable("gtfs_stops"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsStopTime", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStopTime", b => { b.Property<string>("TripId") .HasMaxLength(32) @@ -365,7 +365,7 @@ namespace Data.Migrations b.ToTable("gtfs_stop_times"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsTrip", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsTrip", b => { b.Property<string>("Id") .HasMaxLength(32) @@ -433,9 +433,9 @@ namespace Data.Migrations b.ToTable("gtfs_trips"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsAgency", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsAgency", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -444,9 +444,9 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsCalendar", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsCalendar", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -455,9 +455,9 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsCalendarDate", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsCalendarDate", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -466,15 +466,15 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsRoute", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsRoute", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.GtfsAgency", "Agency") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsAgency", "Agency") .WithMany() .HasForeignKey("AgencyId", "FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -485,9 +485,9 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsStop", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStop", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -496,21 +496,21 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsStopTime", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStopTime", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.GtfsStop", "GtfsStop") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStop", "GtfsStop") .WithMany() .HasForeignKey("StopId", "FeedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.GtfsTrip", "GtfsTrip") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsTrip", "GtfsTrip") .WithMany() .HasForeignKey("TripId", "FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -523,15 +523,15 @@ namespace Data.Migrations b.Navigation("GtfsTrip"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsTrip", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsTrip", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.GtfsRoute", "Route") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsRoute", "Route") .WithMany() .HasForeignKey("RouteId", "FeedId") .OnDelete(DeleteBehavior.Cascade) diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/20251211153852_Initial.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/20251211153852_Initial.cs index 5a75d40..5a75d40 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/20251211153852_Initial.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/20251211153852_Initial.cs diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/AppDbContextModelSnapshot.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/AppDbContextModelSnapshot.cs index feb3813..1932251 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/Migrations/AppDbContextModelSnapshot.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/Migrations/AppDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // <auto-generated /> using System; -using Costasdev.ServiceViewer.Data; +using Enmarcha.Experimental.ServiceViewer.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; @@ -24,7 +24,7 @@ namespace Data.Migrations NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.Feed", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() @@ -60,7 +60,7 @@ namespace Data.Migrations b.ToTable("feeds"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsAgency", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsAgency", b => { b.Property<string>("Id") .HasMaxLength(255) @@ -117,7 +117,7 @@ namespace Data.Migrations b.ToTable("gtfs_agencies"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsCalendar", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsCalendar", b => { b.Property<string>("ServiceId") .HasMaxLength(32) @@ -171,7 +171,7 @@ namespace Data.Migrations b.ToTable("gtfs_calendar"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsCalendarDate", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsCalendarDate", b => { b.Property<string>("ServiceId") .HasMaxLength(32) @@ -197,7 +197,7 @@ namespace Data.Migrations b.ToTable("gtfs_calendar_dates"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsRoute", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsRoute", b => { b.Property<string>("Id") .HasMaxLength(255) @@ -263,7 +263,7 @@ namespace Data.Migrations b.ToTable("gtfs_routes"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsStop", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStop", b => { b.Property<string>("Id") .HasMaxLength(32) @@ -316,7 +316,7 @@ namespace Data.Migrations b.ToTable("gtfs_stops"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsStopTime", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStopTime", b => { b.Property<string>("TripId") .HasMaxLength(32) @@ -362,7 +362,7 @@ namespace Data.Migrations b.ToTable("gtfs_stop_times"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsTrip", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsTrip", b => { b.Property<string>("Id") .HasMaxLength(32) @@ -430,9 +430,9 @@ namespace Data.Migrations b.ToTable("gtfs_trips"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsAgency", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsAgency", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -441,9 +441,9 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsCalendar", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsCalendar", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -452,9 +452,9 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsCalendarDate", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsCalendarDate", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -463,15 +463,15 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsRoute", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsRoute", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.GtfsAgency", "Agency") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsAgency", "Agency") .WithMany() .HasForeignKey("AgencyId", "FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -482,9 +482,9 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsStop", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStop", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -493,21 +493,21 @@ namespace Data.Migrations b.Navigation("Feed"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsStopTime", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStopTime", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.GtfsStop", "GtfsStop") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsStop", "GtfsStop") .WithMany() .HasForeignKey("StopId", "FeedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.GtfsTrip", "GtfsTrip") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsTrip", "GtfsTrip") .WithMany() .HasForeignKey("TripId", "FeedId") .OnDelete(DeleteBehavior.Cascade) @@ -520,15 +520,15 @@ namespace Data.Migrations b.Navigation("GtfsTrip"); }); - modelBuilder.Entity("Costasdev.ServiceViewer.Data.Gtfs.GtfsTrip", b => + modelBuilder.Entity("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsTrip", b => { - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.Feed", "Feed") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.Feed", "Feed") .WithMany() .HasForeignKey("FeedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Costasdev.ServiceViewer.Data.Gtfs.GtfsRoute", "Route") + b.HasOne("Enmarcha.Experimental.ServiceViewer.Data.Gtfs.GtfsRoute", "Route") .WithMany() .HasForeignKey("RouteId", "FeedId") .OnDelete(DeleteBehavior.Cascade) diff --git a/src/Costasdev.Busurbano.ServiceViewer/Data/QueryExtensions/GtfsCalendarQueryExtensions.cs b/src/Enmarcha.Experimental.ServiceViewer/Data/QueryExtensions/GtfsCalendarQueryExtensions.cs index f5fc2bb..5de48ce 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Data/QueryExtensions/GtfsCalendarQueryExtensions.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Data/QueryExtensions/GtfsCalendarQueryExtensions.cs @@ -1,6 +1,6 @@ -using Costasdev.ServiceViewer.Data.Gtfs; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs; -namespace Costasdev.ServiceViewer.Data.QueryExtensions; +namespace Enmarcha.Experimental.ServiceViewer.Data.QueryExtensions; public static class GtfsCalendarQueryExtensions { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Costasdev.Busurbano.ServiceViewer.csproj b/src/Enmarcha.Experimental.ServiceViewer/Enmarcha.Experimental.ServiceViewer.csproj index 426621c..2d0c1e1 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Costasdev.Busurbano.ServiceViewer.csproj +++ b/src/Enmarcha.Experimental.ServiceViewer/Enmarcha.Experimental.ServiceViewer.csproj @@ -4,7 +4,7 @@ <TargetFramework>net10.0</TargetFramework> <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> - <RootNamespace>Costasdev.ServiceViewer</RootNamespace> + <RootNamespace>Enmarcha.Experimental.ServiceViewer</RootNamespace> <UserSecretsId>17600c95-53dd-43b7-9116-24ed4d24eae0</UserSecretsId> </PropertyGroup> diff --git a/src/Costasdev.Busurbano.ServiceViewer/Program.cs b/src/Enmarcha.Experimental.ServiceViewer/Program.cs index 847f9d5..952b273 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Program.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Program.cs @@ -1,5 +1,5 @@ -using Costasdev.ServiceViewer; -using Costasdev.ServiceViewer.Data; +using Enmarcha.Experimental.ServiceViewer; +using Enmarcha.Experimental.ServiceViewer.Data; using Microsoft.EntityFrameworkCore; var builder = WebApplication.CreateBuilder(args); diff --git a/src/Costasdev.Busurbano.ServiceViewer/Properties/launchSettings.json b/src/Enmarcha.Experimental.ServiceViewer/Properties/launchSettings.json index 34eab40..34eab40 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Properties/launchSettings.json +++ b/src/Enmarcha.Experimental.ServiceViewer/Properties/launchSettings.json diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/DaysInFeed.cshtml b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/DaysInFeed.cshtml index 84f30a3..4e252dc 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/DaysInFeed.cshtml +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/DaysInFeed.cshtml @@ -1,4 +1,4 @@ -@model Costasdev.ServiceViewer.Views.Services.DaysInFeedModel +@model Enmarcha.Experimental.ServiceViewer.Views.Services.DaysInFeedModel @{ ViewData["Title"] = "Fechas con datos"; } diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/DaysInFeed.cshtml.cs b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/DaysInFeed.cshtml.cs index 02fe5b0..e633fcb 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/DaysInFeed.cshtml.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/DaysInFeed.cshtml.cs @@ -1,4 +1,4 @@ -namespace Costasdev.ServiceViewer.Views.Services; +namespace Enmarcha.Experimental.ServiceViewer.Views.Services; public class DaysInFeedModel { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServiceDetails.cshtml b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServiceDetails.cshtml index 8eae631..969e0dd 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServiceDetails.cshtml +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServiceDetails.cshtml @@ -1,7 +1,7 @@ -@using Costasdev.ServiceViewer.Data.Gtfs +@using Enmarcha.Experimental.ServiceViewer.Data.Gtfs @using Humanizer @using Humanizer.Localisation -@model Costasdev.ServiceViewer.Views.Services.ServiceDetailsModel +@model Enmarcha.Experimental.ServiceViewer.Views.Services.ServiceDetailsModel @{ ViewData["Title"] = Model.ServiceName; } diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServiceDetails.cshtml.cs b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServiceDetails.cshtml.cs index a89efae..dbe7ad8 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServiceDetails.cshtml.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServiceDetails.cshtml.cs @@ -1,4 +1,4 @@ -namespace Costasdev.ServiceViewer.Views.Services; +namespace Enmarcha.Experimental.ServiceViewer.Views.Services; public class ServiceDetailsModel { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServicesInDay.cshtml b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServicesInDay.cshtml index a5ac66f..2161410 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServicesInDay.cshtml +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServicesInDay.cshtml @@ -1,4 +1,4 @@ -@model Costasdev.ServiceViewer.Views.Services.ServiceInDayModel +@model Enmarcha.Experimental.ServiceViewer.Views.Services.ServiceInDayModel @{ ViewData["Title"] = "Servicios a realizar en " + Model.Date.ToString("dd 'de' MMMM 'de' yyyy"); } diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServicesInDay.cshtml.cs b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServicesInDay.cshtml.cs index b0c57c3..6b55e64 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/Services/ServicesInDay.cshtml.cs +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/Services/ServicesInDay.cshtml.cs @@ -1,6 +1,6 @@ -using Costasdev.ServiceViewer.Data.Gtfs; +using Enmarcha.Experimental.ServiceViewer.Data.Gtfs; -namespace Costasdev.ServiceViewer.Views.Services; +namespace Enmarcha.Experimental.ServiceViewer.Views.Services; public class ServiceInDayModel { diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/Shared/_Layout.cshtml b/src/Enmarcha.Experimental.ServiceViewer/Views/Shared/_Layout.cshtml index 88d5b83..88d5b83 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/Shared/_Layout.cshtml +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/Shared/_Layout.cshtml diff --git a/src/Enmarcha.Experimental.ServiceViewer/Views/_ViewImports.cshtml b/src/Enmarcha.Experimental.ServiceViewer/Views/_ViewImports.cshtml new file mode 100644 index 0000000..2cbb86c --- /dev/null +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/_ViewImports.cshtml @@ -0,0 +1,2 @@ +@using Enmarcha.Experimental.ServiceViewer.Views.Services +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/src/Costasdev.Busurbano.ServiceViewer/Views/_ViewStart.cshtml b/src/Enmarcha.Experimental.ServiceViewer/Views/_ViewStart.cshtml index a5f1004..a5f1004 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/Views/_ViewStart.cshtml +++ b/src/Enmarcha.Experimental.ServiceViewer/Views/_ViewStart.cshtml diff --git a/src/Costasdev.Busurbano.ServiceViewer/appsettings.json b/src/Enmarcha.Experimental.ServiceViewer/appsettings.json index 10f68b8..10f68b8 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/appsettings.json +++ b/src/Enmarcha.Experimental.ServiceViewer/appsettings.json diff --git a/src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/common.css b/src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/common.css index a0e0750..a0e0750 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/common.css +++ b/src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/common.css diff --git a/src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/days_in_feed.css b/src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/days_in_feed.css index b3c46d1..b3c46d1 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/days_in_feed.css +++ b/src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/days_in_feed.css diff --git a/src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/service_details.css b/src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/service_details.css index 570de3a..570de3a 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/service_details.css +++ b/src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/service_details.css diff --git a/src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/services_in_day.css b/src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/services_in_day.css index ce847ef..ce847ef 100644 --- a/src/Costasdev.Busurbano.ServiceViewer/wwwroot/styles/services_in_day.css +++ b/src/Enmarcha.Experimental.ServiceViewer/wwwroot/styles/services_in_day.css diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Costasdev.Busurbano.Sources.OpenTripPlannerGql.csproj b/src/Enmarcha.Sources.OpenTripPlannerGql/Enmarcha.Sources.OpenTripPlannerGql.csproj index 6d78b55..abbc46b 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Costasdev.Busurbano.Sources.OpenTripPlannerGql.csproj +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/Enmarcha.Sources.OpenTripPlannerGql.csproj @@ -4,6 +4,7 @@ <TargetFramework>net10.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> + <RootNamespace>Enmarcha.Sources.OpenTripPlannerGql</RootNamespace> </PropertyGroup> <ItemGroup> diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/OpenTripPlannerClient.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/OpenTripPlannerClient.cs index eed78d6..453a03e 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/OpenTripPlannerClient.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/OpenTripPlannerClient.cs @@ -1,8 +1,8 @@ using System.Net.Http.Json; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +using Enmarcha.Sources.OpenTripPlannerGql.Queries; using Microsoft.Extensions.Logging; -namespace Costasdev.Busurbano.Sources.OpenTripPlannerGql; +namespace Enmarcha.Sources.OpenTripPlannerGql; public class OpenTripPlannerClient { diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs index bce35a2..8338373 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/ArrivalsAtStop.cs @@ -1,8 +1,8 @@ using System.Globalization; using System.Text.Json.Serialization; -using Costasdev.Busurbano.Sources.OpenTripPlannerGql; +using Enmarcha.Sources.OpenTripPlannerGql; -namespace Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +namespace Enmarcha.Sources.OpenTripPlannerGql.Queries; public class ArrivalsAtStopContent : IGraphRequest<ArrivalsAtStopContent.Args> { diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/PlanConnectionContent.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/PlanConnectionContent.cs index db3de49..696d5c7 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/PlanConnectionContent.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/PlanConnectionContent.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +namespace Enmarcha.Sources.OpenTripPlannerGql.Queries; #pragma warning disable CS8618 diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/RouteDetailsContent.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/RouteDetailsContent.cs index 1ba85fa..59a0991 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/RouteDetailsContent.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/RouteDetailsContent.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +namespace Enmarcha.Sources.OpenTripPlannerGql.Queries; public class RouteDetailsContent : IGraphRequest<RouteDetailsContent.Args> { diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/RoutesListContent.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/RoutesListContent.cs index fc69452..71360ee 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/RoutesListContent.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/RoutesListContent.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +namespace Enmarcha.Sources.OpenTripPlannerGql.Queries; public class RoutesListContent : IGraphRequest<RoutesListContent.Args> { diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/StopTile.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/StopTile.cs index 792d19e..fad28eb 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/StopTile.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/StopTile.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +namespace Enmarcha.Sources.OpenTripPlannerGql.Queries; public class StopTileRequestContent : IGraphRequest<StopTileRequestContent.Bbox> { diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/StopsInfo.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/StopsInfo.cs index ce6a8c7..01557c0 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/Queries/StopsInfo.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/Queries/StopsInfo.cs @@ -1,7 +1,7 @@ using System.Globalization; using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Sources.OpenTripPlannerGql.Queries; +namespace Enmarcha.Sources.OpenTripPlannerGql.Queries; public class StopsInfoContent : IGraphRequest<StopsInfoContent.Args> { diff --git a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/ResponseTypes.cs b/src/Enmarcha.Sources.OpenTripPlannerGql/ResponseTypes.cs index 237537f..ec1fce8 100644 --- a/src/Costasdev.Busurbano.Sources.OpenTripPlannerGql/ResponseTypes.cs +++ b/src/Enmarcha.Sources.OpenTripPlannerGql/ResponseTypes.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Sources.OpenTripPlannerGql; +namespace Enmarcha.Sources.OpenTripPlannerGql; public class GraphClientRequest { diff --git a/src/Costasdev.Busurbano.Sources.TranviasCoruna/CorunaRealtimeEstimatesProvider.cs b/src/Enmarcha.Sources.TranviasCoruna/CorunaRealtimeEstimatesProvider.cs index 4bc7ef1..70449ce 100644 --- a/src/Costasdev.Busurbano.Sources.TranviasCoruna/CorunaRealtimeEstimatesProvider.cs +++ b/src/Enmarcha.Sources.TranviasCoruna/CorunaRealtimeEstimatesProvider.cs @@ -1,6 +1,6 @@ using System.Net.Http.Json; -namespace Costasdev.Busurbano.Sources.TranviasCoruna; +namespace Enmarcha.Sources.TranviasCoruna; public class CorunaRealtimeEstimatesProvider { @@ -41,7 +41,7 @@ public class CorunaRealtimeEstimatesProvider }).OrderBy(a => a.Minutes).ToList(); } - private string GetRequestUrl(string stopId) + private static string GetRequestUrl(string stopId) { return $"https://itranvias.com/queryitr_v3.php?&func=0&dato={stopId}"; } diff --git a/src/Enmarcha.Sources.TranviasCoruna/Enmarcha.Sources.TranviasCoruna.csproj b/src/Enmarcha.Sources.TranviasCoruna/Enmarcha.Sources.TranviasCoruna.csproj new file mode 100644 index 0000000..99efca8 --- /dev/null +++ b/src/Enmarcha.Sources.TranviasCoruna/Enmarcha.Sources.TranviasCoruna.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net10.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + <RootNamespace>Enmarcha.Sources.TranviasCoruna</RootNamespace> + </PropertyGroup> + +</Project> diff --git a/src/Costasdev.Busurbano.Sources.TranviasCoruna/Response.cs b/src/Enmarcha.Sources.TranviasCoruna/Response.cs index fe2a6cf..88dc4e2 100644 --- a/src/Costasdev.Busurbano.Sources.TranviasCoruna/Response.cs +++ b/src/Enmarcha.Sources.TranviasCoruna/Response.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Costasdev.Busurbano.Sources.TranviasCoruna; +namespace Enmarcha.Sources.TranviasCoruna; public class QueryitrResponse { diff --git a/src/Costasdev.Busurbano.Sources.TranviasCoruna/Costasdev.Busurbano.Sources.TranviasCoruna.csproj b/src/Enmarcha.Sources.Tussa/Enmarcha.Sources.Tussa.csproj index 237d661..0db72ca 100644 --- a/src/Costasdev.Busurbano.Sources.TranviasCoruna/Costasdev.Busurbano.Sources.TranviasCoruna.csproj +++ b/src/Enmarcha.Sources.Tussa/Enmarcha.Sources.Tussa.csproj @@ -4,6 +4,7 @@ <TargetFramework>net10.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> + <RootNamespace>Enmarcha.Sources.Tussa</RootNamespace> </PropertyGroup> </Project> diff --git a/src/Enmarcha.Sources.Tussa/Response.cs b/src/Enmarcha.Sources.Tussa/Response.cs new file mode 100644 index 0000000..df941b9 --- /dev/null +++ b/src/Enmarcha.Sources.Tussa/Response.cs @@ -0,0 +1,34 @@ +using System.Text.Json.Serialization; + +namespace Enmarcha.Sources.Tussa; + +public class MaisbusResponse +{ + [JsonPropertyName("id")] public string Id { get; set; } + [JsonPropertyName("codigo")] public string Code { get; set; } + [JsonPropertyName("nombre")] public string Name { get; set; } + [JsonPropertyName("coordenadas")] public Coordinates Coordinates { get; set; } + [JsonPropertyName("lineas")] public Route[] Routes { get; set; } +} + +public class Coordinates +{ + [JsonPropertyName("latitud")] + public double Latitude { get; set; } + [JsonPropertyName("longitud")] + public double Longitude { get; set; } +} + +public class Route +{ + [JsonPropertyName("id")] public string Id { get; set; } + [JsonPropertyName("sinoptico")] public string Sinoptico { get; set; } + [JsonPropertyName("nombre")] public string Name { get; set; } + [JsonPropertyName("estilo")] public string Colour { get; set; } + /// <example> + /// 2025-12-28 23:57 + /// </example> + [JsonPropertyName("proximoPaso")] public string NextArrival { get; set; } + [JsonPropertyName("minutosProximoPaso")] public int MinutesToArrive { get; set; } +} + diff --git a/src/Enmarcha.Sources.Tussa/SantiagoRealtimeEstimatesProvider.cs b/src/Enmarcha.Sources.Tussa/SantiagoRealtimeEstimatesProvider.cs new file mode 100644 index 0000000..7437a05 --- /dev/null +++ b/src/Enmarcha.Sources.Tussa/SantiagoRealtimeEstimatesProvider.cs @@ -0,0 +1,40 @@ +using System.Net.Http.Json; + +namespace Enmarcha.Sources.Tussa; + +public class SantiagoRealtimeEstimatesProvider +{ + private HttpClient _http; + + public SantiagoRealtimeEstimatesProvider(HttpClient http) + { + _http = http; + } + + public async Task<List<SantiagoEstimate>> GetEstimatesForStop(int stopId) + { + var url = GetRequestUrl(stopId.ToString()); + + var response = await _http.GetAsync(url); + var maisbusResponse = await response.Content.ReadFromJsonAsync<MaisbusResponse>(); + + if (maisbusResponse is null) + { + var responseString = await response.Content.ReadAsStringAsync(); + throw new Exception("Error parsing maisbus response: " + responseString); + } + + return maisbusResponse.Routes.Select(r => new SantiagoEstimate + ( + r.Id.ToString(), + r.MinutesToArrive + )).OrderBy(a => a.Minutes).ToList(); + } + + private static string GetRequestUrl(string stopId) + { + return $"https://tussa.gal/maisbus/api/stop/{stopId}"; + } +} + +public record SantiagoEstimate(string RouteId, int Minutes); diff --git a/src/frontend/app/components/layout/Header.tsx b/src/frontend/app/components/layout/Header.tsx index b8184f1..8235636 100644 --- a/src/frontend/app/components/layout/Header.tsx +++ b/src/frontend/app/components/layout/Header.tsx @@ -8,7 +8,7 @@ interface HeaderProps { } export const Header: React.FC<HeaderProps> = ({ - title = "Busurbano", + title = "Enmarcha", onMenuClick, className = "", }) => { diff --git a/src/frontend/app/contexts/PageTitleContext.tsx b/src/frontend/app/contexts/PageTitleContext.tsx index 4a13a8a..a7a3ad4 100644 --- a/src/frontend/app/contexts/PageTitleContext.tsx +++ b/src/frontend/app/contexts/PageTitleContext.tsx @@ -12,7 +12,7 @@ const PageTitleContext = createContext<PageTitleContextProps | undefined>( export const PageTitleProvider: React.FC<{ children: React.ReactNode }> = ({ children, }) => { - const [title, setTitle] = useState("Busurbano"); + const [title, setTitle] = useState("EnMarcha"); return ( <PageTitleContext.Provider value={{ title, setTitle }}> @@ -36,13 +36,9 @@ export const usePageTitle = (title: string) => { useEffect(() => { setTitle(title); - document.title = `${title} - Busurbano`; + document.title = `${title} - EnMarcha`; return () => { - // Optional: Reset title on unmount? - // Usually not needed as the next page will set its own title. - // But if we navigate to a page without usePageTitle, it might be stale. - // Let's leave it for now. }; }, [title, setTitle]); }; diff --git a/src/frontend/app/i18n/locales/en-GB.json b/src/frontend/app/i18n/locales/en-GB.json index 2a1cb24..0c4f24f 100644 --- a/src/frontend/app/i18n/locales/en-GB.json +++ b/src/frontend/app/i18n/locales/en-GB.json @@ -1,7 +1,7 @@ { "about": { - "title": "About BusUrbano", - "description": "Web app to find stops and arrival times for urban buses.", + "title": "About EnMarcha", + "description": "Progressive Web App to find transit information in Galicia.", "data_sources_title": "Data sources", "data_sources_intro": "This application uses data from multiple sources:", "data_gtfs": "Scheduled timetables", diff --git a/src/frontend/app/i18n/locales/es-ES.json b/src/frontend/app/i18n/locales/es-ES.json index d47a784..ff517a2 100644 --- a/src/frontend/app/i18n/locales/es-ES.json +++ b/src/frontend/app/i18n/locales/es-ES.json @@ -1,7 +1,7 @@ { "about": { - "title": "Sobre BusUrbano", - "description": "Aplicación web para encontrar paradas y tiempos de llegada de los autobuses urbanos.", + "title": "Sobre EnMarcha", + "description": "Aplicación Web Progresiva para obtener información sobre el transporte público en Galicia.", "data_sources_title": "Fuentes de datos", "data_sources_intro": "Esta aplicación utiliza datos de múltiples fuentes:", "data_gtfs": "Horarios programados", diff --git a/src/frontend/app/i18n/locales/gl-ES.json b/src/frontend/app/i18n/locales/gl-ES.json index e86088e..2d02e67 100644 --- a/src/frontend/app/i18n/locales/gl-ES.json +++ b/src/frontend/app/i18n/locales/gl-ES.json @@ -1,7 +1,7 @@ { "about": { - "title": "Sobre BusUrbano", - "description": "Aplicación web para atopar paradas e tempos de chegada dos autobuses urbanos.", + "title": "Sobre EnMarcha", + "description": "Aplicación Web Progresiva para obter información sobre o transporte público en Galiza.", "data_sources_title": "Fontes de datos", "data_sources_intro": "Esta aplicación utiliza datos de múltiples fontes:", "data_gtfs": "Horarios programados", diff --git a/src/frontend/app/root.tsx b/src/frontend/app/root.tsx index 87d7a9c..df62989 100644 --- a/src/frontend/app/root.tsx +++ b/src/frontend/app/root.tsx @@ -71,7 +71,7 @@ export function Layout({ children }: { children: React.ReactNode }) { <meta name="robots" content="noindex, nofollow" /> <meta name="googlebot" content="noindex, nofollow" /> - <title>Busurbano</title> + <title>Enmarcha</title> <Meta /> <Links /> </head> diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx index a651893..07a805d 100644 --- a/src/frontend/app/routes/map.tsx +++ b/src/frontend/app/routes/map.tsx @@ -333,9 +333,9 @@ export default function StopMap() { ["get", "feed"], "vitrasa", "#81D002", - "santiago", + "tussa", "#508096", - "coruna", + "tranvias", "#E61C29", "xunta", "#007BC4", diff --git a/src/frontend/app/routes/routes.tsx b/src/frontend/app/routes/routes.tsx index 2c11168..0c575d2 100644 --- a/src/frontend/app/routes/routes.tsx +++ b/src/frontend/app/routes/routes.tsx @@ -12,7 +12,7 @@ export default function RoutesPage() { const { data: routes, isLoading } = useQuery({ queryKey: ["routes"], - queryFn: () => fetchRoutes(["santiago", "vitrasa", "coruna", "feve"]), + queryFn: () => fetchRoutes(["tussa", "vitrasa", "tranvias", "feve"]), }); const routesByAgency = routes?.reduce( diff --git a/src/frontend/public/maps/spritesheet/sprite.json b/src/frontend/public/maps/spritesheet/sprite.json index ed037c0..3875080 100644 --- a/src/frontend/public/maps/spritesheet/sprite.json +++ b/src/frontend/public/maps/spritesheet/sprite.json @@ -7,16 +7,16 @@ "height": 32, "pixelRatio": 1 }, - "stop-santiago": { - "id": "stop-santiago", + "stop-tussa": { + "id": "stop-tussa", "x": 32, "y": 0, "width": 32, "height": 32, "pixelRatio": 1 }, - "stop-coruna": { - "id": "stop-coruna", + "stop-tranvias": { + "id": "stop-tranvias", "x": 64, "y": 0, "width": 32, diff --git a/src/frontend/public/maps/spritesheet/sprite@2x.json b/src/frontend/public/maps/spritesheet/sprite@2x.json index 5f652b9..ef3c53c 100644 --- a/src/frontend/public/maps/spritesheet/sprite@2x.json +++ b/src/frontend/public/maps/spritesheet/sprite@2x.json @@ -7,16 +7,16 @@ "height": 64, "pixelRatio": 2 }, - "stop-santiago": { - "id": "stop-santiago", + "stop-tussa": { + "id": "stop-tussa", "x": 64, "y": 0, "width": 64, "height": 64, "pixelRatio": 2 }, - "stop-coruna": { - "id": "stop-coruna", + "stop-tranvias": { + "id": "stop-tranvias", "x": 128, "y": 0, "width": 64, |
