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

fix issue # 643 #645

Closed
wants to merge 2 commits into from
Closed

fix issue # 643 #645

wants to merge 2 commits into from

Conversation

architec
Copy link

@architec architec commented May 9, 2020

Fixes #643

@architec
Copy link
Author

architec commented May 9, 2020

@EddyIonescu

Copy link
Member

@EddyIonescu EddyIonescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the PR and sorry for the delay in reviewing it; I'll be sure to be more responsive over the next few days (also since it's a long-weekend) for reviewing your changes.

So there are two issues:

  1. While it downloads the feed, it doesn't find the feed, which was part of the ticket. It's fine if you want to leave it as a TODO for another PR. For example, in backend/agencies you'd add a "transitfeed_url" to the yaml file of each agency, then you'd make an API call to that URL as to get the feed versions.
  2. The goal isn't to always get the latest version but to get the latest version as of a given date. For example, if the date given is 2020-04-01 and there are GTFS feeds from 2020-05-01, 2020-03-01, and 2020-01-01, we'd want the one from 2020-03-01. Same as above, it's fine if you want to leave it as a TODO for another PR.
    From the issue description, the start function should take in two arguments: an agency ID (name of the agency that corresponds to the yaml files in backend/agencies, like ttc or muni).

backend/download_transitfeed_gtfs.py Outdated Show resolved Hide resolved
backend/download_transitfeed_gtfs.py Outdated Show resolved Hide resolved
:param transitfeed_key: transitfeeds API key
:param feedID: feed ID from transitfeed
:param S3bucket_name: S3 bucket name
:return: True if file was uploaded, else False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EddyIonescu could you set this as another PR?

backend/download_transitfeed_gtfs.py Outdated Show resolved Hide resolved
backend/download_transitfeed_gtfs.py Outdated Show resolved Hide resolved
backend/download_transitfeed_gtfs.py Outdated Show resolved Hide resolved
backend/download_transitfeed_gtfs.py Outdated Show resolved Hide resolved
:param feed: the unique ID of the feed
:return: filename after download
"""
replacefeed = feed.replace("/", "%2F")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't use feed after this, so you could just assign the result to feed instead of adding another variable name.

backend/download_transitfeed_gtfs.py Show resolved Hide resolved
backend/download_transitfeed_gtfs.py Outdated Show resolved Hide resolved
@architec
Copy link
Author

architec commented May 17, 2020

@EddyIonescu, could you make point 1 and 2 in your comment as another PR? I will get back to it when I have time if no one else is interested.

@EddyIonescu
Copy link
Member

@arctdav the issue with not doing #1 and #2 is that then there's nothing to really use the script for. If another contributor picks up the ticket up they can start off from your branch.

Copy link
Member

@hathix hathix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make changes based on Eddy's feedback.

@architec architec closed this Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Historic Route/Schedules: Download Transitfeed GTFS
4 participants