Implement update feed endpoint for GTFS and GTFS-RT
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start with the existing writeToSheet Firebase function to see how update requests and GitHub issue creation work today, and with the operations API PUT to see how feed data is validated. Define the new public endpoint in the OpenAPI spec, then implement it so it validates the feed and request body and stores a pending update request linked to the feed and user without modifying the feed or the spreadsheet. Done when a request for a GTFS or GTFS-RT feed creates a pending record and a linked GitHub issue.
Written by the indexing model from the issue text.
Description
Describe the problem
Update requests for existing feeds come from the website through the writeToSheet Firebase function. The team then applies the changes by hand. The operations API PUT is an internal admin tool and is not meant for contributor-submitted changes.
Proposed solution
Add an endpoint to the public API that accepts update requests for existing GTFS and GTFS-RT feeds.
- Validate that the feed exists and validate the request body.
- Store the submission as a feed request of type
updatewith statuspending, linked to the existing feed. Attach the user ID to the request. - Do not change the feed. The changes are applied when the request is approved.
- Create the GitHub issue the same way it is done today and link it to the request.
- Do not write to the spreadsheet.
Acceptance criteria
- Endpoint is defined in the OpenAPI spec and implemented.
- Update requests for GTFS and GTFS-RT feeds create a
pendingupdate request linked to the feed and the user. - A GitHub issue is created for each update request.
Out of scope
- Approving a request and applying the changes to the feed.
- Update the web app to call the new endpoint, then retire
writeToSheet. This will be done in its own issue when all required issues are addressed.
Alternatives you've considered
Extend the operations API PUT to handle contributor updates. That mixes admin edits with contributor requests that still need review.
Additional context
No response
- Dominant language
- Python
- Stars
- 34
- Forks
- 7
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 21
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MobilityData/mobility-feed-api
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MobilityData/mobility-feed-api#1927 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
MobilityData/mobility-feed-api#1846 ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
MobilityData/mobility-feed-api#1755 · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MobilityData/mobility-feed-api#1647 ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MobilityData/mobility-feed-api#836 ·
Maintainers usually reply within 2 days
All issues in MobilityData/mobility-feed-api
Similar issues
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ARTPARK-SAHAI-ORG/calibrate-frontend#919 ·
Maintainers usually reply within 1 day
-
CI: MSYS2 jobs fail — mingw python3 package renamed upstream to pythonPossibly taken @ronaldtse claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
pydantic/pytest-examples#102 · 1 comment ·