# feat(schedule): implement full GTFS import pipeline for Schedule module #6#7
Open
# feat(schedule): implement full GTFS import pipeline for Schedule module #6#7
Conversation
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.
Gepacam
added a commit
that referenced
this pull request
Nov 7, 2025
…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.
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
agency.txt,routes.txt,stops.txt,trips.txt,calendar.txt,calendar_dates.txt,stop_times.txt,shapes.txt, andfeed_info.txt.tests/test_import_full_gtfs.py) that auto-generates synthetic GTFS feed and verifies successful ingestion.Changes
gtfs/utils/schedule.py— full import pipeline supporting required + optional GTFS files.tests/test_import_full_gtfs.py— integration test creating 9 CSVs and ZIP intmp_gtfs/.test_import_gtfs.pyas a lightweight smoke test for minimal GTFS feeds.Subissue
Checklist
Note: A minimal version of this importer (supporting 4 models only) is still available under
tests/test_import_gtfs.pyfor lightweight validation. It is fully optional and removable once CI integration is complete.