-
Notifications
You must be signed in to change notification settings - Fork 64
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
Update workflow to store and pull streetview images from GCS subdirectory #894
base: staging
Are you sure you want to change the base?
Update workflow to store and pull streetview images from GCS subdirectory #894
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@nlebovits the "PR Checks Backend" is failing. A formatting or linting issue might be causing this. Can you take a look? Thanks! |
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 @nlebovits this PR is running into formatting or linting issues. Can you take a look?
@CodeWritingCow yep! on it |
url = f"https://maps.googleapis.com/maps/api/streetview/metadata?location={quote(address)}, Philadelphia, PA&key={key}" | ||
response = requests.get(url) | ||
return response.json() | ||
url = f"http://example.com/metadata/{address}" |
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.
This looks like an incorrect url, it used to be maps.googleapis.com
metadata = get_streetview_metadata(row["address"]) | ||
upload_image_with_metadata(blob, image_content, metadata) | ||
# Check if file already exists | ||
if not blob.exists(): |
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.
This is contrary to comment above.
|
||
|
||
# Function to retry failed addresses until all succeed | ||
def retry_failed_addresses(): |
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.
has this been tested?
|
||
|
||
# Retry failed addresses sequentially until | ||
def process_failed_addresses_sequentially(): |
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.
has this been tested?
@zigouras thanks for the review. there are a number of errors in the code--I took a break from working on it on Thursday but expect to get back to it this week. |
f168877
to
c5092c6
Compare
@CodeWritingCow can you review the front end pieces of this commit and lmk if you see where my code is going wrong and what I can fix. No worries if not--I need to put more time into this one. |
This PR has been marked as stale because it has been open for 7 days with no activity. |
To better organize GCS, this PR adds a subdirectory in which to store streerview images, and also updates the front end to pull the images correctly from that directory. Addresses #717 .