Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
bf-schedule-creator
Initializing search
    bf-dev
    • Home
    • Product Capabilities
    • Process
    • Current Work
    • System Design
    • Software Reference
    • Operations
    bf-dev
    • Home
      • Overview
      • Manage
      • Overview
      • Product Engineering Workflow
      • Product Engineering Delivery
      • Product Engineering Workflow in Linear
        • GitLab Feature Flags
        • In-App Docs Authoring
        • Release Notes
      • Templates
      • Publishing
      • Workflow Companions
      • Overview
      • Active Artifacts
      • Backlog Artifacts
      • Archived Artifacts
      • Overview
      • Microgrid
      • OSCP
        • Challenge
        • Specification
        • Spec
        • Architecture
        • Overview
        • Script Runtime Model
        • Compose Profiles and Modes
        • Repo Topology
        • CI and Release Integration
        • Overview
        • Internal Application Diagrams
          • Overview
          • Web Model
          • Core Model
        • Service Interaction Flows
        • Data and State
          • Index
          • bf-manage-web
          • bf-manage-core
          • bf-manage-connect
          • bf-manage-sitepwrmon
          • bf-manage-incidents
          • bf-telematics
          • bf-depot-sim
          • bf-manage-roaming
          • bf-support-microsite
          • bf-digital-twin
          • bf-schedule-creator
        • Overview
        • Internal Application Diagrams
        • Migration and Flags
        • Simulation Request Lifecycle
          • Index
          • bf-bnl-ui
          • bf-bnl-settings
          • bf-bnl-schedule-analysis-compute
          • bf-route-modelling
          • bf-schedule-creator
            • What this service is
            • Code anatomy
            • Architectural characteristics
            • Documentation and tests in-repo
            • Internal request lifecycle
          • bf-digital-twin
        • Overview
        • Secrets and Env Strategy
        • Vendors and Local Dependencies
        • ADRs
        • Service Matrix
        • Cloud Dependencies
        • Ports and URLs
      • Onboarding
      • Daily Operations Runbook
        • Overview
        • Staging Hotfix Release
        • Production Hotfix Release
        • Terraform Plan Dry Runs
      • Troubleshooting
      • Testing Guide
    • What this service is
    • Code anatomy
    • Architectural characteristics
    • Documentation and tests in-repo
    • Internal request lifecycle

    bf-schedule-creator (Plan Role)¶

    What this service is¶

    bf-schedule-creator is the schedule parsing/conversion backend for Plan. It transforms raw operator schedules plus enrichment data (GTFS/TXC/TIMS-style inputs) into modelling-ready outputs.

    Code anatomy¶

    • src/main.py: FastAPI app factory and route wiring.
    • src/service_schedule_creator/*: application-level schedule creation services.
    • src/service_schedule_creator/gtfs and src/service_schedule_creator/schedule: GTFS-specific and schedule orchestration modules.
    • src/lib/formatter/*: input normalization/format standardization.
    • src/lib/plugins/*: enrichment plugin abstraction boundary.
    • src/transxchange/*: TransXChange parsing adapters.

    Architectural characteristics¶

    • Plugin-based enrichment architecture allowing multiple data source formats.
    • Clear separation between formatter, parser/plugin, and output generation concerns.

    Documentation and tests in-repo¶

    • README contains extensive parsing terminology, assumptions, and flow diagrams.
    • Deep fixture-driven parser tests across GTFS/TXC/lib/middleware/schedule areas.

    Internal request lifecycle¶

    sequenceDiagram
      participant Client
      participant Api as creator api
      participant Formatter as formatter layer
      participant Parser as parser layer
      participant Plugin as enrichment plugin
      participant S3 as aws s3
    
      Client->>Api: upload or parse request
      Api->>Formatter: normalize input format
      Formatter->>Parser: provide normalized schedule rows
      Parser->>Plugin: request enrichment data
      Plugin-->>Parser: route and stop enrichment
      Parser->>S3: persist parsed outputs and supporting payloads
      Parser-->>Api: schedule outputs
      Api-->>Client: output files or response payload
    Made with Material for MkDocs