-
Notifications
You must be signed in to change notification settings - Fork 291
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
Change to OSM opening_hours format for times and dates #328
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5d6a6d1
Change to OSM opeing_hours format for times and dates
6210ac2
Update files table
f9cf803
Merge branch 'master' into Opening_hours
dcba6c5
guidance on opening_hours
0985465
Apply suggestions from code review
492b830
Fix missing comma typo
d8882ac
Merge branch 'master' into Opening_hours
a49bfa8
Update is_disabled definition
cd126a9
fix typo
33f5eef
Merge branch 'master' into Opening_hours
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, could this clarify how free_bike_status.json should behave wrt. opening hours since that feed doesn't have is_renting field? I.e. if a system is outside of opening hours, would there be no free bikes? Also, in this paragraph stations SHOULD be set to
is_returning=false
too outside of opening hours.We're trying to figure out whether we MUST check system_information.opening_hours when ingesting real-time feeds before surfacing bikes (i.e. this is a breaking proposal) or we can continue gating by is_renting=false, is_returning=false and no bikes in free_bike_status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if a system is outside of opening hours, there would not be any vehicles available for rent, including free floating bikes. This can be added to the system_information.opening_hours definition.
Actually this is not the case - systems typically allow you to end a rental and/or return vehicles outside of opening hours.
This one is harder to answer - It seems like for now, you would have to check
system_information.opening_hours
in the case of free bikes. Instation_status
, thenum_bikes_available
andnum_docks_available
fields give the numbers that would be available if the station were set to allow rentals. There's a long thread on how this came to be in #94 . The reason was so that you could plan a trip or reserve a vehicle at 5:45 when the system opened at 6:00. There's no equivalent tonum_bikes_available
infree_bike_status
but there's also no where that it says there should be no bikes infree_bike_status
when rentals aren't allowed, only when there are no bikes on the street. If there are bikes on the street, they could still appear infree_bike_status
whenopening_hours
evaluates toclosed
, that's no different from the current spec, it's just that the format and location of the hours of operation are different.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. There's also
is_disabled
field in free_bike_status which says "This field is used to indicate vehicles that are in the field but not available for rental." It sounds like this field should then be set to false outside of opening hours?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I agree with that. With station based ( docked) vehicles that's not really how it works and I think it should be the same for free floating. The numbers represented by
ststion_status.num_bikes_available
andnum_docks_available
are the number of functional bikes/docks that would be available ifis_renting
=true
. Suppose there's a free floating vehicle with a dead battery and you set 'is_disabled=
true' when the system is closed. In the above scenario where you're planning a trip at 5:45 for the system that opens at 6:00, it would appear that this vehicle will be available for rent at 6 but it won't be.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a separate PR to improve documentation / meaning of the is_disabled wrt opening hours.