Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for timeframes.txt #158

Merged
merged 3 commits into from
Mar 29, 2024
Merged

feat: Add support for timeframes.txt #158

merged 3 commits into from
Mar 29, 2024

Conversation

emma-k-alexandra
Copy link
Contributor

WMATA here in DC started including the optional timeframes.txt to their GTFS datasets. Currently, node-gtfs doesn't import timeframes.txt into SQLite. timeframes.txt appears to be part of the standard GTFS Schedule dataset.

WMATA Rail GTFS Static details: https://developer.wmata.com/docs/services/gtfs/operations/5cdc5367acb52c9350f69753

Dataset with timeframes.txt included: wmata-gtfs-rail-static.zip

Note: When using VSCode, I had a bit of trouble getting linting and formatting to work. Apologies if there are any formatting mistakes here. It looks like the npm run lint command from the README doesn't work.

Comment on lines +19 to +27
it('should return empty array if no timeframes', () => {
const timeframeGroupId = 'not_real';

const results = getTimeframes({
timeframe_group_id: timeframeGroupId,
});
should.exists(results);
results.should.have.length(0);
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the included test dataset does not include timeframes.txt, so I was not able to write a test that confirms the actual database output of getTimeframes.

@brendannee
Copy link
Member

Excellent! Thanks for letting me know about this new GTFS file.

@brendannee brendannee merged commit 2d17e80 into BlinkTagInc:master Mar 29, 2024
2 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