-
Notifications
You must be signed in to change notification settings - Fork 290
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
Conversation
Adds fields to system_information and station_information to describe times and dates of operation using OSM opening_hours format. Deprecates system_hours and system_calendar endpoints.
Updates files table noting deprecation of system_hours and system_calendar
Thanks! The spec looks neater having system_hours and system_calendar endpoints removed. Questions:
|
We're planning to call a vote on this proposal soon and we would like to understand the level of support for this change. There are other proposals coming up that depend on the passing of this PR. This is a breaking change that would become part of v3.0. Please let us know the following:
I'm tagging those who have expressed interest in this or related issues. |
@mplsmitch This looks great to me! |
We'd support this change. Thanks @mplsmitch |
IBI Group is supportive of this change. |
Adds guidance on the use of opening_hours for systems and stations
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.
Just some typos/formatting in the JSON examples.
Fix typos Co-authored-by: Daniel <[email protected]>
Following up on @josee-sabourin mail here. Though we are publishing the existing feeds for all our systems, we only have two with limited opening hours, so practical usage is rather low. About a year ago I spent a quite some time to implement some kind of conversion from OSM opening hours format to GBFS format, as we started to use (a subset of the) OSM format internally for defining the opening hours. (As a producer) we'll happily throw that away again and just go with publishing what we have anyways - so I guess we support the proposal in general. I can't evaluate how this consumers will like this change. The OSM format allows some pretty tricky stuff (well, reality is complex). On the other hand, there are some libraries available e.g. to clarify "is it open right now?", but the current format definitely answers this question more easily without using 3rd party library. Answering this question for the OSM format eventually requires (depending on the used features) additional context, e.g. coordinates, country and state, for example to evaluate whether or not today is a public holiday or when sunrise/sunset is. This change also means that validating a GBFS feed in theory also means to validate the opening hours. |
Co-authored-by: Daniel <[email protected]>
I hereby call a vote on this proposal. Voting will be open for 10 full calendar days until 11:59PM UTC on December 9, 2021. Please vote for or against the proposal, and include the organization for which you are voting in your comment. Please note if you can commit to implementing the proposal. |
This pull requests mixes 'the proposal' and 'formatting fixes'. I would suggest not to do so. |
+1 from Transit |
gbfs.md
Outdated
* [OSM opening_hours validation tool](https://openingh.openstreetmap.de/evaluation_tool/) | ||
* [OSM opening_hours project and code libraries](https://github.com/opening-hours) | ||
|
||
Hours and dates of operation SHOULD be published even in cases where services are continuously available 24/7. During periods when a system or station is outside of opening hours, stations SHOULD be set to `is_renting = false`. During these periods, `station_status.json.num_bikes_available` and `station_status.json.num_docks_available` SHOULD reflect the number of vehicles and docks that would be available if the system or station were open. |
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.
Also, in this paragraph stations SHOULD be set to is_returning=false too outside of opening hours.
Actually this is not the case - systems typically allow you to end a rental and/or return vehicles 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.
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. In station_status
, the num_bikes_available
and num_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 to num_bikes_available
in free_bike_status
but there's also no where that it says there should be no bikes in free_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 in free_bike_status
when opening_hours
evaluates to closed
, 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
and num_docks_available
are the number of functional bikes/docks that would be available if is_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.
+1 from Stae |
Entur supports this proposal |
+1 from nextbike |
Voting on this PR closes in 2 calendar days. Please vote for or against the proposal, and include the organization for which you are voting in your comment. Please note if you can commit to implementing the proposal. |
+1 from Spin on this proposal. |
This vote has now closed, and it passes! Votes in favor: There were no votes against. We'll update the documentation as discussed, and then we will tag and merge this into v3.0-RC2 in the coming weeks. |
Updates is_disabled definition and adds information regarding setting or hours and dates of operation
## Problem The files system_hours.json and system_calendar.json were removed in #328. However, the spec says these files were “deprecated”, which usually means permitted, but discouraged. ## Solution Replace "deprecated” with "removed" for the files system_hours.json and system_calendar.json in the spec.
## Problem The files system_hours.json and system_calendar.json were removed in #328. However, the spec says these files were “deprecated”, which usually means permitted, but discouraged. ## Solution Replace "deprecated” with "removed" for the files system_hours.json and system_calendar.json in the spec.
commit e0c48b2 Author: Fabien Richard-Allouard <[email protected]> Date: Mon Apr 29 11:13:47 2024 +0200 Clarify vehicle_id persistence rule (MobilityData#632) This PR: - Makes the rule about vehicle_id persistence more explicit: rotation is between rentals (not every time the feed is loaded) - Updates a forgotten reference to free_bike_status.json (now vehicle_status.json) Thanks @testower for flagging! commit 73d135d Author: Fabien Richard-Allouard <[email protected]> Date: Tue Apr 16 15:22:18 2024 +0200 Set the migration guide as the v3.0 Release Notes (MobilityData#628) This PR sets the migration guide article as the v3.0 Release Notes: https://mobilitydata.org/how-to-upgrade-to-gbfs-v3-0/ commit 457cb71 Author: Fabien Richard-Allouard <[email protected]> Date: Thu Apr 11 14:19:32 2024 +0200 Update current version to v3.0 (MobilityData#625) * Withdraw PR MobilityData#546 Floating Interval in price * Withdraw PR MobilityData#457 Reservation Price * Remove -RC and -RC2 from the spec * Update current version number in spec * Fix earlier version URLs * Update current version in README to v3.0 * Set version history URL to Release Notes commit f4dc269 Author: Mitch Vars <[email protected]> Date: Thu Apr 11 01:10:58 2024 -0500 Correction systems.csv (MobilityData#623) Fix missing csv comma commit 940cd63 Author: Mitch Vars <[email protected]> Date: Tue Apr 9 11:11:26 2024 -0500 Update systems.csv to remove dead feeds (MobilityData#622) * Update systems.csv Remove obsolete feeds * Update systems.csv * Add 4 feeds that now return status code 200 --------- Co-authored-by: Fabien Richard-Allouard <[email protected]> commit a77c5c2 Author: Fabien Richard-Allouard <[email protected]> Date: Tue Apr 9 15:40:21 2024 +0200 Mark system_hours and system_calendar as removed (MobilityData#621) ## Problem The files system_hours.json and system_calendar.json were removed in MobilityData#328. However, the spec says these files were “deprecated”, which usually means permitted, but discouraged. ## Solution Replace "deprecated” with "removed" for the files system_hours.json and system_calendar.json in the spec. commit 45e944a Author: indigotachizawa <[email protected]> Date: Mon Apr 8 21:01:42 2024 +0900 add new service 'kotobike' (MobilityData#620) commit 2f5aaad Author: Fabien Richard-Allouard <[email protected]> Date: Wed Mar 20 17:07:56 2024 +0100 Authentication information for Voi Brussels (MobilityData#613) This PR adds authentication information for Voi Brussels. > Access and usage of Voi’s GBFS data is subject to the following licensing terms: https://www.voi.com/voi-licencing-agreement. More info on the Belgium NAP: https://www.transportdata.be/dataset/voi commit a72d597 Author: Mitch Vars <[email protected]> Date: Wed Mar 13 12:03:36 2024 -0500 Update Nextbike URLs (MobilityData#610) * Update Nextbike URLs * Update 4 additional Nextbike URLs --------- Co-authored-by: Fabien Richard-Allouard <[email protected]> commit 4b4d3f7 Author: Fabien Richard-Allouard <[email protected]> Date: Wed Mar 13 14:31:38 2024 +0100 Fix FAQ URL in issue template (MobilityData#609) This PR fixes the FAQ URL in the issue template. Before | After -- | -- https://gbfs.mobilitydata.org/faq | https://gbfs.org/learn/faq/ commit b286e95 Author: Fabien Richard-Allouard <[email protected]> Date: Fri Mar 1 17:06:20 2024 +0100 Update roadmap URL in README (MobilityData#605) This PR updates the roadmap URL in the README: - Before: Github wiki - After: https://portal.productboard.com/26qpteg4wct9px3jts94uqv8/tabs/99-planned commit bea68ce Author: Fabien Richard-Allouard <[email protected]> Date: Tue Feb 27 16:03:23 2024 +0100 Delete obselete feed Donkey Republic Barcelona (MobilityData#599) commit b9d8390 Author: Fabien Richard-Allouard <[email protected]> Date: Wed Feb 14 12:54:14 2024 +0100 Fix geofencing examples (MobilityData#595) * Remove overlapping polygon from example * Change rule to override global rules in example commit 6a9150c Author: Fabien Richard-Allouard <[email protected]> Date: Mon Jan 29 14:16:55 2024 +0100 Fix markdown formatting (MobilityData#596) This PR fixes the markdown formatting when governance.md is imported on https://gbfs.org/specification/process/ commit a3d68f6 Author: Fabien Richard-Allouard <[email protected]> Date: Thu Jan 25 17:08:37 2024 +0100 Syncs systems.csv with transport.data.gouv (MobilityData#593) * Syncs systems.csv with transport.data.gouv * Move public keys to Authentication Info column * Update Authentication Info description in README * Rephrase Authentication Info description in README commit 0775ee4 Author: Fabien Richard-Allouard <[email protected]> Date: Tue Jan 23 17:39:47 2024 +0100 Label global_rules field as added in v3.0-RC (MobilityData#594) This editorial change adds a missing label under the field `global_rules` to explain that the field was added in v3.0-RC. commit e9fc5aa Author: Ortwin Gentz, FutureTap <[email protected]> Date: Mon Jan 22 15:39:26 2024 +0100 gbfs.md: Fix language about iOS links (MobilityData#585) commit 411b4f4 Author: Fabien Richard-Allouard <[email protected]> Date: Mon Jan 15 15:44:59 2024 +0100 README.md: Add link to v2.3 Release Notes (MobilityData#592) This PR adds the link to the [v2.3 Release Notes](https://github.com/MobilityData/gbfs/releases/tag/v2.3) in the Current Version table of the [README.md](https://github.com/MobilityData/gbfs/blob/master/README.md). commit 32ccae4 Author: Fabien Richard-Allouard <[email protected]> Date: Mon Jan 15 15:00:59 2024 +0100 GBFS Governance Revisions (MobilityData#579) * Add release cycles to the governance * Link README to governance.md for Release Cycles * Simplify MINOR version release line * Update stale bot * Typo commit 4e9c72f Author: Merja Kajava <[email protected]> Date: Thu Jan 11 17:49:29 2024 +0200 Updated location names in systems.csv (MobilityData#590) commit 43b9be7 Author: Fabien Richard-Allouard <[email protected]> Date: Thu Jan 11 14:39:23 2024 +0100 Add country name when location is empty (MobilityData#589) commit 3806cdc Author: Merja Kajava <[email protected]> Date: Thu Jan 11 12:37:46 2024 +0200 Removed nextbike_fo from systems.csv (MobilityData#588) commit f6a9c56 Author: Fabien Richard-Allouard <[email protected]> Date: Wed Jan 10 16:54:59 2024 +0100 Location formatting recommendation in systems.csv (MobilityData#587) * Location formatting recommendation in systems.csv This PR adds a recommendation in README.md about the formatting of the system location in systems.csv. * Remove country code from formatting recommendation * Remove country code from Location column commit a36a103 Author: Fabien Richard-Allouard <[email protected]> Date: Wed Jan 10 14:52:57 2024 +0100 Update VéloZef (Brest, FR) system_id (MobilityData#586) This PR updates the system_id of VéloZef (Brest, FR) to match the system_id from the [feed](https://api.prod.partners-fs37hd8.zoov.eu/gbfs/2.2/brest/en/system_information.json?&key=OGNhZDNjMDQtYTA0Yi00NzU2LWE0MTItOGJlYzE1Y2E4NGEx): `velozef`. Thanks to @XioNoX for noticing ❤️
Adds fields to system_information and station_information to describe times and dates of operation using OSM opening_hours format. Deprecates system_hours and system_calendar endpoints.
What problem does your proposal solve? Please begin with the relevant issue number. If there is no existing issue, please also describe alternative solutions you have considered.
Currently GBFS sues a proprietary format to describe hours and dates of service. This format lacks flexibility to address new use cases such as setting hours for individual stations.
What is the proposal?
This proposal changes the format used to describe hours and dates of operation from the current GBFS proprietary formats to Open Street Map’s opening_hours format. Changing to this format adds additional functionality and is supported by existing code libraries and tools. This change will allow support for calendar exceptions such as holidays and allows operators to set different operating hours per station.
This change was initially discussed in #6 . A detailed writeup of this proposal is contained in this document. The need for different hours per station was covered in #98 . This change may also facilitate a future proposal to set valid times and dates for pricing plans as discussed in #298 .
Is this a breaking change?
Which files are affected by this change?
gbfs.md: