-
Notifications
You must be signed in to change notification settings - Fork 61
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: new is_official tag for feeds #649
base: main
Are you sure you want to change the base?
Conversation
… to use the new is_official attribute
…ary functions in representations.py. Added test case in test_operations.py for get_sources_by_is_official function - Passed.
…y_is_official, test_has_is_official for both GtfsScheduleSource and GtfsRealtimeSource. All passed.
|
Thanks for this great contribution @lawrencefan506! Our team will be taking a look shortly. |
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 @lawrencefan506, thanks for your contribution! Please update your branch with the latest from main and I added a minor comment before approving. Thanks again!
@@ -124,7 +129,8 @@ def update_gtfs_realtime_source( | |||
note (str, optional): Additional notes regarding the source. Defaults to None. | |||
status (str, optional): The status of the GTFS Realtime source. Defaults to None. | |||
features (list, optional): A list of features of the GTFS Realtime source. Defaults to None. | |||
|
|||
s_official (str, optional): Flag indicating if the source comes from the agency itself or not. Defaults to None. |
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.
[picky]: fix typo
s_official (str, optional): Flag indicating if the source comes from the agency itself or not. Defaults to None. | |
is_official (str, optional): Flag indicating if the source comes from the agency itself or not. Defaults to None. |
Adding a new optional tag called 'is_official' for feeds as requested in issue #356.
Changes:
schemas/gtfs_realtime_source_schema.json
andschemas/gtfs_schedule_source_schema.json
to include this tag.tools/representations.py
, adding this tag to theSource
class.tools/representations.py
, ahas_is_official
method for theGtfsScheduleSource
andGtfsRealtimeSource
classes and aget_sources_by_is_official
method for theSourcesCatalog
class.tools/tests/test_representations.py
for each new method listed above. All passed locally.get_sources_by_is_official
method intools/operations.py
.tools/tests/test_operations.py
for the new method listed above. Passed locally.README.md
schemas to include this tag.