Skip to content

Major improvements and new features - #2

Merged
chtitux merged 2 commits into
mainfrom
claude/create-gtfs-sqljs-module-011CUpNnKLtuvzDDzXYZFyRm
Nov 5, 2025
Merged

chtitux merged 2 commits into
mainfrom
claude/create-gtfs-sqljs-module-011CUpNnKLtuvzDDzXYZFyRm

Conversation

@chtitux

@chtitux chtitux commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

CSV Parser:

  • Replace custom CSV parser with papaparse library
  • Better handling of malformed CSV files
  • Proper handling of missing/undefined values

New API Methods:

  • Add getTripsByDate() to get all trips for a given date
  • Add getStopsByTrip() to get stops for a trip (ordered by sequence)
  • Add getTripsByService() for internal use

Data Loading:

  • Fix ZIP loader to properly detect local file paths vs URLs
  • Improve error handling for undefined values in CSV data
  • Better type conversion handling for missing columns

Tests:

  • Add comprehensive sample feed tests using Google's official GTFS example
  • Include sample-feed.zip (Apache 2.0 licensed) in test fixtures
  • Add README with proper attribution for sample feed
  • All 59 tests passing

Documentation:

Dependencies:

  • Add papaparse for robust CSV parsing
  • Add @types/papaparse for TypeScript support

All tests pass, linting passes, TypeScript compiles successfully.

CSV Parser:
- Replace custom CSV parser with papaparse library
- Better handling of malformed CSV files
- Proper handling of missing/undefined values

New API Methods:
- Add getTripsByDate() to get all trips for a given date
- Add getStopsByTrip() to get stops for a trip (ordered by sequence)
- Add getTripsByService() for internal use

Data Loading:
- Fix ZIP loader to properly detect local file paths vs URLs
- Improve error handling for undefined values in CSV data
- Better type conversion handling for missing columns

Tests:
- Add comprehensive sample feed tests using Google's official GTFS example
- Include sample-feed.zip (Apache 2.0 licensed) in test fixtures
- Add README with proper attribution for sample feed
- All 59 tests passing

Documentation:
- Add contact email (contact@sys-dev-run.fr)
- Add website (https://www.sys-dev-run.fr/)
- Update API documentation

Dependencies:
- Add papaparse for robust CSV parsing
- Add @types/papaparse for TypeScript support

All tests pass, linting passes, TypeScript compiles successfully.
- Test specific agency: DTA (Demo Transit Authority)
- Test specific stops: BEATTY_AIRPORT, BULLFROG, etc. with exact coordinates
- Test specific routes: AB (route 10), BFC (route 20), CITY (route 40)
- Test calendar services: FULLW (full week) and WE (weekend only)
- Test specific trips: AB1, AB2, CITY1, CITY2, etc.
- Validate exact stop times and sequences
- Test weekday vs weekend service detection (Monday vs Saturday)
- Test journey planning with real data
- Test all 9 stops, 5 routes, 11 trips from sample feed

All 77 tests pass, validating actual data from Google's official sample feed.
Added .gitignore for extracted txt files.
@chtitux
chtitux merged commit 9cadb14 into main Nov 5, 2025
4 checks passed
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