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

Historic Route/Schedules: Download Transitfeed GTFS #643

Open
EddyIonescu opened this issue May 7, 2020 · 9 comments
Open

Historic Route/Schedules: Download Transitfeed GTFS #643

EddyIonescu opened this issue May 7, 2020 · 9 comments
Labels
Backend Python and API stuff Good First Issue Good for newcomers

Comments

@EddyIonescu
Copy link
Member

Write a script that, given a date and agency, downloads the appropriate GTFS from TransitFeeds and uploads it to S3. It doesn't download anything from TransitFeeds if the GTFS is already in S3. This script would be deployed to run before save_routes does.

Is an extension of #642 but could be done concurrently

@EddyIonescu EddyIonescu added Good First Issue Good for newcomers Backend Python and API stuff labels May 7, 2020
@EddyIonescu
Copy link
Member Author

Once this and #642 are done modify save_routes to get the appropriate GTFS from S3 instead of downloading the latest directly from the agency by default (ie. when a date isn't provided, meaning it's the current date)

@architec
Copy link

architec commented May 7, 2020

hi I'm interested. Could you assign this issue to me?

@EddyIonescu
Copy link
Member Author

Hey @arctdav have you joined our Slack channel and Github organization? If so then you can assign it to yourself. Note that it'd have to be written in Python (and for this PR you could test it on your personal S3 until the PR's approved).
Note that a naming convention like the one in #638 should be used.

@architec
Copy link

architec commented May 7, 2020

@EddyIonescu joined Slack channel

@architec
Copy link

architec commented May 7, 2020

@EddyIonescu two questions

  1. what directory should the GTFS store after download?
  2. what file name should the script be?
  3. are there any existing helper function for API calls from TransitFeed for this project?

@architec
Copy link

architec commented May 8, 2020

Seems to me that transitfeeds.com/api/swagger/#!/default/getLatestFeedVersion isn't working. For example if I pass feed ID "aachener-verkehrsverbund/836" with my key, it says "no response from server". However I assume we use the URL this API responded to download file?

@architec
Copy link

architec commented May 8, 2020

@EddyIonescu @Brian-Lee

@Brian-Lee
Copy link
Contributor

@arctdav @EddyIonescu I think I know the problem. When using the "Try it out" button at https://transitfeeds.com/api/swagger/#!/default/getLatestFeedVersion, the result is "no content." This appears to be a bug. However, if you copy the link generated there in the "Request URL" field, you can successfully use that link by pasting it into a browser. It will go ahead and start a download of a gtfs zip file.

@architec
Copy link

architec commented May 9, 2020

@EddyIonescu PR created, waiting for review

@architec architec self-assigned this May 14, 2020
EddyIonescu added a commit that referenced this issue Jul 9, 2020
A previous PR (#643) broke viewing the frontend when
deployed on nginx by changing the homepage from frontend/build
to https://muni.opentransit.city. This PR resolves this by
setting the PUBLIC_URL environment variable to frontend/build
when running npm run build from the Dockerfile, which is used
for all server deployments including Google Cloud, Heroku, and
by future users who want to deploy OpenTransit on their own
server using our Docker setup.

The static S3 serverless approach continues to work for
muni.opentransit.city but requires
modifying the URLs in frontend/package.json and in
frontend/public/CNAME for deploying a static site for other agencies
or environments which we don't officially support or document
as of yet.
@architec architec removed their assignment Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Python and API stuff Good First Issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants