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

[FEATURE] Handle GTFS times > 24 hours #347

Open
e-lo opened this issue Apr 16, 2024 · 2 comments
Open

[FEATURE] Handle GTFS times > 24 hours #347

e-lo opened this issue Apr 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@e-lo
Copy link
Collaborator

e-lo commented Apr 16, 2024

User Story

As a user with GTFS which spans midnight I'd like to be able to input times>24 hours.

Resolution Ideas

  • Right now v1.0 uses pd.Timestamp which can't be > 24 hours in a day.
  • Could change to use Timedelta from "service day midnight".
@e-lo e-lo added the enhancement New feature or request label Apr 16, 2024
@e-lo
Copy link
Collaborator Author

e-lo commented Jul 17, 2024

Fixed in selection-refactor branch and released in v1.0-alpha.1 but needs to be tested.

@e-lo e-lo self-assigned this Aug 28, 2024
@e-lo e-lo added this to the v1.1 milestone Aug 28, 2024
@e-lo
Copy link
Collaborator Author

e-lo commented Sep 3, 2024

I tried working on this using a pandera parser but gave up after running into a lot of issues.

Specifically, the parser should be coercing the string HH:MM data to a datetime and if time is >=24:00 it should add a day to the date. The parser is working, but then if we have a time >24 hours it also seems to be having an issue with the Timestamp type for the series and not allowing times > 24 hours 🤔 . I can't seem to figure out what is going on and since the parsers are a new(er) feature of Pandera there isn't a ton of support yet. It might be worth submitting a ticket but don't want to hold up 1.0 for that.

This can be tested with test_coerce_over24hr_times() which is currently skipped.

@e-lo e-lo added the bug Something isn't working label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant