feat(schedule): add CRUD Schedule tests and disable CPKs per academic guidance #4#5
Open
feat(schedule): add CRUD Schedule tests and disable CPKs per academic guidance #4#5
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.
Gepacam
added a commit
that referenced
this pull request
Nov 5, 2025
…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`.
5 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
-[ ] Implements deterministic CRUD test coverage for GTFS Schedule models (
AgencySchedule,CalendarSchedule, andShapeSchedule), using an isolated in-memory SQLite database to ensure full independence from PostGIS extensions during CI or local test runs.Changes
tests/test_schedule_crud.pywith CRUD coverage for schedule models.schedule_tests.pyas a lightweight standalone test runner.settings.pyto conditionally disable GeoDjango during test execution.CHANGELOG.mddocumenting added coverage and test isolation.AgencySchedule,CalendarSchedule, andShapeSchedule.Subissue
Checklist