Skip to content

Conversation

@Gepacam
Copy link
Collaborator

@Gepacam Gepacam commented Nov 5, 2025

Description

  • Adds create_schedule_fixtures command to generate minimal deterministic GTFS Schedule fixtures.
  • Includes configurable --seed and --output options for reproducibility.
  • Integrates test coverage via tests/test_fixtures.py to validate fixture creation and loading.
  • Shapes use numeric PKs for ORM compatibility.
  • CPKs intentionally not implemented per academic guidance.

Changes

  • Added gtfs/management/commands/create_schedule_fixtures.py
  • Added tests/test_fixtures.py and fixture gtfs/fixtures/schedule_min.json
  • Updated CHANGELOG.md with new entries

Subissue


Checklist

  • Deterministic output with seed option
  • Configurable output path
  • Fixture loads via loaddata
  • All tests pass locally

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`.
@Gepacam Gepacam requested a review from fabianabarca November 5, 2025 04:50
@Gepacam Gepacam self-assigned this Nov 5, 2025
Gepacam added a commit that referenced this pull request Nov 6, 2025
#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.
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.

2 participants