Skip to content

feat(schedule): ETA-based stop_times builder using Bytewax hooks #8#9

Open
Gepacam wants to merge 6 commits intomainfrom
feature/eta-builder-stop-times-#8
Open

feat(schedule): ETA-based stop_times builder using Bytewax hooks #8#9
Gepacam wants to merge 6 commits intomainfrom
feature/eta-builder-stop-times-#8

Conversation

@Gepacam
Copy link
Collaborator

@Gepacam Gepacam commented Nov 12, 2025

Description

  • Implements ETABuilder for deterministic stop_times generation.
  • Integrates optional Bytewax hooks for streaming ETA computation.
  • Adds management command build_stop_times to export GTFS-compliant stop_times.txt.
  • Provides synthetic test coverage via test_eta_builder.py.

Changes


Subissue


Checklist

  • Deterministic ETA output reproducible with seed
  • Bytewax integration optional and safe
  • Synthetic data validated under pytest
  • stop_times file exported successfully

Implements core GTFS Schedule entities (agency, routes, trips, stops, stop_times, shapes, calendar, calendar_dates, feed_info)
with ForeignKeys and UniqueConstraints as specified in GTFS v2.0.

Migrations were created and applied successfully under PostGIS backend.

Closes #3.
…CPKs per academic guidance

Implements deterministic CRUD test coverage for the GTFS Schedule module, ensuring referential integrity across
AgencySchedule, CalendarSchedule, and ShapeSchedule.
Composite Primary Keys (CPKs) were intentionally not implemented, per academic guidance from course instructor,
to maintain compatibility with Django ORM and simplify admin integration.
…gration #5

Adds management command `create_schedule_fixtures` to generate a minimal, deterministic GTFS Schedule dataset.
Includes --seed and --output options, produces a tiny, loaddata-friendly JSON, and is exercised by a pytest test.

- Shapes PKs are numeric to align with Django's AutoField/BigAutoField.
- Tests run without PostGIS by using the non-GIS test settings.
- Validated end-to-end via `pytest -v tests/test_fixtures.py`.
#6

Implements complete GTFS Schedule import pipeline supporting all 9 core files:
agency, routes, stops, trips, calendar, calendar_dates, stop_times, shapes, and feed_info.

Validates referential integrity across related models and performs bulk inserts under a single transaction.
Includes integration test (test_import_full_gtfs.py) generating synthetic GTFS ZIP in tmp_gtfs/ to verify end-to-end ingestion.
…validation #7

Implements export_gtfs_schedule() to serialize all Schedule models into GTFS v2.0-compliant text files and ZIP package.
Includes deterministic validation with synthetic data and metadata embedding.
MBTA feed import/export remains experimental due to dataset size.
…hooks (#8)

Add ETABuilder with deterministic ETA generation and Bytewax integration.
Includes management command to build stop_times.txt reproducibly and tests with synthetic data.
Fulfills Subissue #8 acceptance criteria (pluggable interface, deterministic output, synthetic testing).
@Gepacam Gepacam requested a review from fabianabarca November 12, 2025 16:28
@Gepacam Gepacam self-assigned this Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant